Subversion Repositories SmartDukaan

Rev

Rev 6228 | Rev 6503 | 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
    /**
4600 varun.gupt 98
     * Get successful payment for a transaction. Will raise exception.
99
     * 
100
     * 
101
     * @param txnId
102
     */
103
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
104
 
105
    /**
695 rajveer 106
     * mark payment successful and store parameters
107
     * 
108
     * 
109
     * @param id
110
     * @param gatewayPaymentId
111
     * @param sessionId
112
     * @param gatewayTxnStatus
113
     * @param description
114
     * @param gatewayTxnId
115
     * @param authCode
116
     * @param referenceCode
117
     * @param errorCode
118
     * @param status
1119 rajveer 119
     * @param gatewayTxnDate
695 rajveer 120
     * @param attributes
121
     */
3430 rajveer 122
    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 123
 
1629 ankur.sing 124
    /**
1731 ankur.sing 125
     * Returns the minimum and maximum amounts among successful payments.
126
     * List contains two double values, first minimum and second maximum amount.
1629 ankur.sing 127
     */
3430 rajveer 128
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException;
1629 ankur.sing 129
 
2462 chandransh 130
    /**
131
     * Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
132
     * In case of any processing error, an exception is raised.
133
     * 
134
     * @param merchantPaymentId
135
     */
3430 rajveer 136
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
2462 chandransh 137
 
2690 chandransh 138
    /**
6050 anupam.sin 139
     * 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 140
     * 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 141
     * 
142
     * @param merchantPaymentId
143
     * @param rechargeOrderId
6228 anupam.sin 144
     * @param phone
6050 anupam.sin 145
     */
6228 anupam.sin 146
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException;
6050 anupam.sin 147
 
148
    /**
3616 chandransh 149
     * Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
150
     * In case of any processing error, an exception is raised.
151
     * 
152
     * @param merchantPaymentId
153
     */
154
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
155
 
156
    /**
2690 chandransh 157
     * Create a refund of the given amount corresponding to the given order to be processed through the same
158
     * payment gateway which processed the payment for the corresponding transaction.
159
     * Returns the id of the newly created Refund.
160
     * 
161
     * @param orderId
162
     * @param merchantTxnId
163
     * @param amount
164
     */
3430 rajveer 165
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
2690 chandransh 166
 
3010 chandransh 167
    /**
168
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
6486 rajveer 169
     * transaction. PaymentException with error code 104 is thrown in case no payments are found for the transaction id passed.
4421 mandeep.dh 170
     * PaymentException is also thrown with error code 106 in case capture was not possible due to connection
171
     * issue. Here, we	payment also gets updated to CAPTURE_INPROCESS state
3010 chandransh 172
     * 
173
     * @param merchantTxnId
174
     */
3430 rajveer 175
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
3010 chandransh 176
 
3956 chandransh 177
    /**
6486 rajveer 178
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
179
     * transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
180
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
181
     * thrown with error code 106 in case capture was not possible due to connection
182
     * issue.
183
     * 
184
     * @param merchantTxnId
185
     * @param amount
186
     * @param isDigital
187
     */
188
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
189
 
190
    /**
3956 chandransh 191
     * Adds the given amount to the captured amount of a COD payment.
192
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
193
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
194
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
195
     * and the corresponding transaction id.
196
     * 
197
     * Returns false if the payment couldn't be captured.
198
     * Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
199
     * 
200
     * @param merchantTxnId
201
     * @param amount
202
     * @param xferBy
203
     * @param xferTxnId
204
     * @param xferDate
205
     */
206
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException;
207
 
4008 mandeep.dh 208
    /**
209
     * Returns the list of payments that require some extra processing and
210
     * which belong to a particular category. This is currently used by CRM
211
     * application.
212
     * 
213
     * @param category
214
     */
215
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
216
 
217
    /**
218
     * Marks a particular payment as processed for a particular cateogory.
219
     * It essentially deletes the payment if it is processed for a particular
220
     * category. This is currently used by CRM application.
221
     * 
222
     * @param paymentId
223
     * @param category
224
     */
225
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
226
 
123 ashish 227
  }
228
 
3430 rajveer 229
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
230
 
6050 anupam.sin 231
    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 232
 
233
    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;
234
 
235
    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;
236
 
4141 chandransh 237
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException;
238
 
3430 rajveer 239
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException;
240
 
4600 varun.gupt 241
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException;
242
 
3430 rajveer 243
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPayment_call> resultHandler) throws org.apache.thrift.TException;
244
 
245
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
246
 
4600 varun.gupt 247
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
248
 
3430 rajveer 249
    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;
250
 
251
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
252
 
253
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
254
 
6228 anupam.sin 255
    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 256
 
3616 chandransh 257
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
258
 
3430 rajveer 259
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
260
 
261
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
262
 
6486 rajveer 263
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
264
 
3956 chandransh 265
    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;
266
 
4008 mandeep.dh 267
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
270
 
3430 rajveer 271
  }
272
 
3374 rajveer 273
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 274
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
275
      public Factory() {}
276
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
277
        return new Client(prot);
278
      }
279
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
280
        return new Client(iprot, oprot);
281
      }
282
    }
283
 
284
    public Client(org.apache.thrift.protocol.TProtocol prot)
123 ashish 285
    {
3430 rajveer 286
      super(prot, prot);
123 ashish 287
    }
288
 
3430 rajveer 289
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 290
      super(iprot, oprot);
123 ashish 291
    }
292
 
6050 anupam.sin 293
    public long createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
123 ashish 294
    {
6050 anupam.sin 295
      send_createPayment(userId, amount, gatewayId, txnId, isDigital);
123 ashish 296
      return recv_createPayment();
297
    }
298
 
6050 anupam.sin 299
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws org.apache.thrift.TException
123 ashish 300
    {
301
      createPayment_args args = new createPayment_args();
3430 rajveer 302
      args.setUserId(userId);
303
      args.setAmount(amount);
304
      args.setGatewayId(gatewayId);
305
      args.setTxnId(txnId);
6050 anupam.sin 306
      args.setIsDigital(isDigital);
3430 rajveer 307
      sendBase("createPayment", args);
123 ashish 308
    }
309
 
3430 rajveer 310
    public long recv_createPayment() throws PaymentException, org.apache.thrift.TException
123 ashish 311
    {
312
      createPayment_result result = new createPayment_result();
3430 rajveer 313
      receiveBase(result, "createPayment");
123 ashish 314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
317
      if (result.pe != null) {
318
        throw result.pe;
319
      }
3430 rajveer 320
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
123 ashish 321
    }
322
 
3430 rajveer 323
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 324
    {
695 rajveer 325
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 326
      return recv_getPaymentsForUser();
327
    }
328
 
3430 rajveer 329
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 330
    {
331
      getPaymentsForUser_args args = new getPaymentsForUser_args();
3430 rajveer 332
      args.setUserId(userId);
333
      args.setFromTime(fromTime);
334
      args.setToTime(toTime);
335
      args.setStatus(status);
336
      args.setGatewayId(gatewayId);
337
      sendBase("getPaymentsForUser", args);
123 ashish 338
    }
339
 
3430 rajveer 340
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, org.apache.thrift.TException
123 ashish 341
    {
342
      getPaymentsForUser_result result = new getPaymentsForUser_result();
3430 rajveer 343
      receiveBase(result, "getPaymentsForUser");
123 ashish 344
      if (result.isSetSuccess()) {
345
        return result.success;
346
      }
347
      if (result.pe != null) {
348
        throw result.pe;
349
      }
3430 rajveer 350
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
123 ashish 351
    }
352
 
3430 rajveer 353
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 354
    {
695 rajveer 355
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 356
      return recv_getPayments();
357
    }
358
 
3430 rajveer 359
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 360
    {
361
      getPayments_args args = new getPayments_args();
3430 rajveer 362
      args.setFromTime(fromTime);
363
      args.setToTime(toTime);
364
      args.setStatus(status);
365
      args.setGatewayId(gatewayId);
366
      sendBase("getPayments", args);
123 ashish 367
    }
368
 
3430 rajveer 369
    public List<Payment> recv_getPayments() throws PaymentException, org.apache.thrift.TException
123 ashish 370
    {
371
      getPayments_result result = new getPayments_result();
3430 rajveer 372
      receiveBase(result, "getPayments");
123 ashish 373
      if (result.isSetSuccess()) {
374
        return result.success;
375
      }
376
      if (result.pe != null) {
377
        throw result.pe;
378
      }
3430 rajveer 379
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
123 ashish 380
    }
381
 
4141 chandransh 382
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException
383
    {
384
      send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId);
385
      return recv_getPaymentsByCapturedDate();
386
    }
387
 
388
    public void send_getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws org.apache.thrift.TException
389
    {
390
      getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
391
      args.setFromTime(fromTime);
392
      args.setToTime(toTime);
393
      args.setGatewayId(gatewayId);
394
      sendBase("getPaymentsByCapturedDate", args);
395
    }
396
 
397
    public List<Payment> recv_getPaymentsByCapturedDate() throws PaymentException, org.apache.thrift.TException
398
    {
399
      getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
400
      receiveBase(result, "getPaymentsByCapturedDate");
401
      if (result.isSetSuccess()) {
402
        return result.success;
403
      }
404
      if (result.pe != null) {
405
        throw result.pe;
406
      }
407
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");
408
    }
409
 
3430 rajveer 410
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 411
    {
412
      send_getPaymentGateway(id);
413
      return recv_getPaymentGateway();
414
    }
415
 
3430 rajveer 416
    public void send_getPaymentGateway(long id) throws org.apache.thrift.TException
420 ashish 417
    {
418
      getPaymentGateway_args args = new getPaymentGateway_args();
3430 rajveer 419
      args.setId(id);
420
      sendBase("getPaymentGateway", args);
420 ashish 421
    }
422
 
3430 rajveer 423
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, org.apache.thrift.TException
420 ashish 424
    {
425
      getPaymentGateway_result result = new getPaymentGateway_result();
3430 rajveer 426
      receiveBase(result, "getPaymentGateway");
420 ashish 427
      if (result.isSetSuccess()) {
428
        return result.success;
429
      }
430
      if (result.pe != null) {
431
        throw result.pe;
432
      }
3430 rajveer 433
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
420 ashish 434
    }
435
 
4600 varun.gupt 436
    public List<PaymentGateway> getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
437
    {
438
      send_getActivePaymentGateways();
439
      return recv_getActivePaymentGateways();
440
    }
441
 
442
    public void send_getActivePaymentGateways() throws org.apache.thrift.TException
443
    {
444
      getActivePaymentGateways_args args = new getActivePaymentGateways_args();
445
      sendBase("getActivePaymentGateways", args);
446
    }
447
 
448
    public List<PaymentGateway> recv_getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
449
    {
450
      getActivePaymentGateways_result result = new getActivePaymentGateways_result();
451
      receiveBase(result, "getActivePaymentGateways");
452
      if (result.isSetSuccess()) {
453
        return result.success;
454
      }
455
      if (result.pe != null) {
456
        throw result.pe;
457
      }
458
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActivePaymentGateways failed: unknown result");
459
    }
460
 
3430 rajveer 461
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 462
    {
695 rajveer 463
      send_getPayment(id);
464
      return recv_getPayment();
420 ashish 465
    }
466
 
3430 rajveer 467
    public void send_getPayment(long id) throws org.apache.thrift.TException
420 ashish 468
    {
695 rajveer 469
      getPayment_args args = new getPayment_args();
3430 rajveer 470
      args.setId(id);
471
      sendBase("getPayment", args);
420 ashish 472
    }
473
 
3430 rajveer 474
    public Payment recv_getPayment() throws PaymentException, org.apache.thrift.TException
420 ashish 475
    {
695 rajveer 476
      getPayment_result result = new getPayment_result();
3430 rajveer 477
      receiveBase(result, "getPayment");
695 rajveer 478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
420 ashish 481
      if (result.pe != null) {
482
        throw result.pe;
483
      }
3430 rajveer 484
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 485
    }
486
 
3430 rajveer 487
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
420 ashish 488
    {
695 rajveer 489
      send_getPaymentForTxnId(txnId);
490
      return recv_getPaymentForTxnId();
420 ashish 491
    }
492
 
3430 rajveer 493
    public void send_getPaymentForTxnId(long txnId) throws org.apache.thrift.TException
420 ashish 494
    {
695 rajveer 495
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
3430 rajveer 496
      args.setTxnId(txnId);
497
      sendBase("getPaymentForTxnId", args);
420 ashish 498
    }
499
 
3430 rajveer 500
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
420 ashish 501
    {
695 rajveer 502
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
3430 rajveer 503
      receiveBase(result, "getPaymentForTxnId");
420 ashish 504
      if (result.isSetSuccess()) {
505
        return result.success;
506
      }
507
      if (result.pe != null) {
508
        throw result.pe;
509
      }
3430 rajveer 510
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 511
    }
512
 
4600 varun.gupt 513
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
514
    {
515
      send_getSuccessfulPaymentForTxnId(txnId);
516
      return recv_getSuccessfulPaymentForTxnId();
517
    }
518
 
519
    public void send_getSuccessfulPaymentForTxnId(long txnId) throws org.apache.thrift.TException
520
    {
521
      getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
522
      args.setTxnId(txnId);
523
      sendBase("getSuccessfulPaymentForTxnId", args);
524
    }
525
 
526
    public Payment recv_getSuccessfulPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
527
    {
528
      getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
529
      receiveBase(result, "getSuccessfulPaymentForTxnId");
530
      if (result.isSetSuccess()) {
531
        return result.success;
532
      }
533
      if (result.pe != null) {
534
        throw result.pe;
535
      }
536
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentForTxnId failed: unknown result");
537
    }
538
 
3430 rajveer 539
    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 540
    {
1119 rajveer 541
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 542
      return recv_updatePaymentDetails();
420 ashish 543
    }
544
 
3430 rajveer 545
    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 546
    {
695 rajveer 547
      updatePaymentDetails_args args = new updatePaymentDetails_args();
3430 rajveer 548
      args.setId(id);
549
      args.setGatewayPaymentId(gatewayPaymentId);
550
      args.setSessionId(sessionId);
551
      args.setGatewayTxnStatus(gatewayTxnStatus);
552
      args.setDescription(description);
553
      args.setGatewayTxnId(gatewayTxnId);
554
      args.setAuthCode(authCode);
555
      args.setReferenceCode(referenceCode);
556
      args.setErrorCode(errorCode);
557
      args.setStatus(status);
558
      args.setGatewayTxnDate(gatewayTxnDate);
559
      args.setAttributes(attributes);
560
      sendBase("updatePaymentDetails", args);
420 ashish 561
    }
562
 
3430 rajveer 563
    public boolean recv_updatePaymentDetails() throws PaymentException, org.apache.thrift.TException
420 ashish 564
    {
695 rajveer 565
      updatePaymentDetails_result result = new updatePaymentDetails_result();
3430 rajveer 566
      receiveBase(result, "updatePaymentDetails");
695 rajveer 567
      if (result.isSetSuccess()) {
568
        return result.success;
569
      }
420 ashish 570
      if (result.pe != null) {
571
        throw result.pe;
572
      }
3430 rajveer 573
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 574
    }
575
 
3430 rajveer 576
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 577
    {
1731 ankur.sing 578
      send_getSuccessfulPaymentsAmountRange();
579
      return recv_getSuccessfulPaymentsAmountRange();
1629 ankur.sing 580
    }
581
 
3430 rajveer 582
    public void send_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 583
    {
1731 ankur.sing 584
      getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
3430 rajveer 585
      sendBase("getSuccessfulPaymentsAmountRange", args);
1629 ankur.sing 586
    }
587
 
3430 rajveer 588
    public List<Double> recv_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 589
    {
1731 ankur.sing 590
      getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 591
      receiveBase(result, "getSuccessfulPaymentsAmountRange");
1629 ankur.sing 592
      if (result.isSetSuccess()) {
593
        return result.success;
594
      }
3430 rajveer 595
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1629 ankur.sing 596
    }
597
 
3430 rajveer 598
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
2462 chandransh 599
    {
600
      send_initializeHdfcPayment(merchantPaymentId);
601
      return recv_initializeHdfcPayment();
602
    }
603
 
3430 rajveer 604
    public void send_initializeHdfcPayment(long merchantPaymentId) throws org.apache.thrift.TException
2462 chandransh 605
    {
606
      initializeHdfcPayment_args args = new initializeHdfcPayment_args();
3430 rajveer 607
      args.setMerchantPaymentId(merchantPaymentId);
608
      sendBase("initializeHdfcPayment", args);
2462 chandransh 609
    }
610
 
3430 rajveer 611
    public String recv_initializeHdfcPayment() throws PaymentException, org.apache.thrift.TException
2462 chandransh 612
    {
613
      initializeHdfcPayment_result result = new initializeHdfcPayment_result();
3430 rajveer 614
      receiveBase(result, "initializeHdfcPayment");
2462 chandransh 615
      if (result.isSetSuccess()) {
616
        return result.success;
617
      }
618
      if (result.pe != null) {
619
        throw result.pe;
620
      }
3430 rajveer 621
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
2462 chandransh 622
    }
623
 
6228 anupam.sin 624
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException
6050 anupam.sin 625
    {
6228 anupam.sin 626
      send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId, phone);
6050 anupam.sin 627
      return recv_doHdfcPaymentForDigitalOrder();
628
    }
629
 
6228 anupam.sin 630
    public void send_doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws org.apache.thrift.TException
6050 anupam.sin 631
    {
632
      doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
633
      args.setMerchantPaymentId(merchantPaymentId);
634
      args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 635
      args.setPhone(phone);
6050 anupam.sin 636
      sendBase("doHdfcPaymentForDigitalOrder", args);
637
    }
638
 
639
    public String recv_doHdfcPaymentForDigitalOrder() throws PaymentException, org.apache.thrift.TException
640
    {
641
      doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
642
      receiveBase(result, "doHdfcPaymentForDigitalOrder");
643
      if (result.isSetSuccess()) {
644
        return result.success;
645
      }
646
      if (result.pe != null) {
647
        throw result.pe;
648
      }
649
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doHdfcPaymentForDigitalOrder failed: unknown result");
650
    }
651
 
3616 chandransh 652
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
653
    {
654
      send_initializeHdfcEmiPayment(merchantPaymentId);
655
      return recv_initializeHdfcEmiPayment();
656
    }
657
 
658
    public void send_initializeHdfcEmiPayment(long merchantPaymentId) throws org.apache.thrift.TException
659
    {
660
      initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
661
      args.setMerchantPaymentId(merchantPaymentId);
662
      sendBase("initializeHdfcEmiPayment", args);
663
    }
664
 
665
    public String recv_initializeHdfcEmiPayment() throws PaymentException, org.apache.thrift.TException
666
    {
667
      initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
668
      receiveBase(result, "initializeHdfcEmiPayment");
669
      if (result.isSetSuccess()) {
670
        return result.success;
671
      }
672
      if (result.pe != null) {
673
        throw result.pe;
674
      }
675
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
676
    }
677
 
3430 rajveer 678
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
2690 chandransh 679
    {
680
      send_createRefund(orderId, merchantTxnId, amount);
681
      return recv_createRefund();
682
    }
683
 
3430 rajveer 684
    public void send_createRefund(long orderId, long merchantTxnId, double amount) throws org.apache.thrift.TException
2690 chandransh 685
    {
686
      createRefund_args args = new createRefund_args();
3430 rajveer 687
      args.setOrderId(orderId);
688
      args.setMerchantTxnId(merchantTxnId);
689
      args.setAmount(amount);
690
      sendBase("createRefund", args);
2690 chandransh 691
    }
692
 
3430 rajveer 693
    public long recv_createRefund() throws PaymentException, org.apache.thrift.TException
2690 chandransh 694
    {
695
      createRefund_result result = new createRefund_result();
3430 rajveer 696
      receiveBase(result, "createRefund");
2690 chandransh 697
      if (result.isSetSuccess()) {
698
        return result.success;
699
      }
700
      if (result.pe != null) {
701
        throw result.pe;
702
      }
3430 rajveer 703
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
2690 chandransh 704
    }
705
 
3430 rajveer 706
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException
3010 chandransh 707
    {
708
      send_capturePayment(merchantTxnId);
709
      return recv_capturePayment();
710
    }
711
 
3430 rajveer 712
    public void send_capturePayment(long merchantTxnId) throws org.apache.thrift.TException
3010 chandransh 713
    {
714
      capturePayment_args args = new capturePayment_args();
3430 rajveer 715
      args.setMerchantTxnId(merchantTxnId);
716
      sendBase("capturePayment", args);
3010 chandransh 717
    }
718
 
3430 rajveer 719
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
3010 chandransh 720
    {
721
      capturePayment_result result = new capturePayment_result();
3430 rajveer 722
      receiveBase(result, "capturePayment");
3010 chandransh 723
      if (result.isSetSuccess()) {
724
        return result.success;
725
      }
726
      if (result.pe != null) {
727
        throw result.pe;
728
      }
3430 rajveer 729
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
3010 chandransh 730
    }
731
 
6486 rajveer 732
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
733
    {
734
      send_refundPayment(merchantTxnId, amount, isDigital);
735
      return recv_refundPayment();
736
    }
737
 
738
    public void send_refundPayment(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
739
    {
740
      refundPayment_args args = new refundPayment_args();
741
      args.setMerchantTxnId(merchantTxnId);
742
      args.setAmount(amount);
743
      args.setIsDigital(isDigital);
744
      sendBase("refundPayment", args);
745
    }
746
 
747
    public boolean recv_refundPayment() throws PaymentException, org.apache.thrift.TException
748
    {
749
      refundPayment_result result = new refundPayment_result();
750
      receiveBase(result, "refundPayment");
751
      if (result.isSetSuccess()) {
752
        return result.success;
753
      }
754
      if (result.pe != null) {
755
        throw result.pe;
756
      }
757
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "refundPayment failed: unknown result");
758
    }
759
 
3956 chandransh 760
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
761
    {
762
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
763
      return recv_partiallyCapturePayment();
764
    }
765
 
766
    public void send_partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws org.apache.thrift.TException
767
    {
768
      partiallyCapturePayment_args args = new partiallyCapturePayment_args();
769
      args.setMerchantTxnId(merchantTxnId);
770
      args.setAmount(amount);
771
      args.setXferBy(xferBy);
772
      args.setXferTxnId(xferTxnId);
773
      args.setXferDate(xferDate);
774
      sendBase("partiallyCapturePayment", args);
775
    }
776
 
777
    public boolean recv_partiallyCapturePayment() throws PaymentException, org.apache.thrift.TException
778
    {
779
      partiallyCapturePayment_result result = new partiallyCapturePayment_result();
780
      receiveBase(result, "partiallyCapturePayment");
781
      if (result.isSetSuccess()) {
782
        return result.success;
783
      }
784
      if (result.pe != null) {
785
        throw result.pe;
786
      }
787
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
788
    }
789
 
4008 mandeep.dh 790
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
791
    {
792
      send_getPaymentsRequiringExtraProcessing(category);
793
      return recv_getPaymentsRequiringExtraProcessing();
794
    }
795
 
796
    public void send_getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
797
    {
798
      getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
799
      args.setCategory(category);
800
      sendBase("getPaymentsRequiringExtraProcessing", args);
801
    }
802
 
803
    public List<Long> recv_getPaymentsRequiringExtraProcessing() throws org.apache.thrift.TException
804
    {
805
      getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
806
      receiveBase(result, "getPaymentsRequiringExtraProcessing");
807
      if (result.isSetSuccess()) {
808
        return result.success;
809
      }
810
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
811
    }
812
 
813
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
814
    {
815
      send_markPaymentAsProcessed(paymentId, category);
816
      recv_markPaymentAsProcessed();
817
    }
818
 
819
    public void send_markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
820
    {
821
      markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
822
      args.setPaymentId(paymentId);
823
      args.setCategory(category);
824
      sendBase("markPaymentAsProcessed", args);
825
    }
826
 
827
    public void recv_markPaymentAsProcessed() throws org.apache.thrift.TException
828
    {
829
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
830
      receiveBase(result, "markPaymentAsProcessed");
831
      return;
832
    }
833
 
123 ashish 834
  }
3430 rajveer 835
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
836
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
837
      private org.apache.thrift.async.TAsyncClientManager clientManager;
838
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
839
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
840
        this.clientManager = clientManager;
841
        this.protocolFactory = protocolFactory;
842
      }
843
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
844
        return new AsyncClient(protocolFactory, clientManager, transport);
845
      }
123 ashish 846
    }
847
 
3430 rajveer 848
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
849
      super(protocolFactory, clientManager, transport);
850
    }
123 ashish 851
 
6050 anupam.sin 852
    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 853
      checkReady();
6050 anupam.sin 854
      createPayment_call method_call = new createPayment_call(userId, amount, gatewayId, txnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 855
      this.___currentMethod = method_call;
856
      ___manager.call(method_call);
857
    }
858
 
859
    public static class createPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
860
      private long userId;
861
      private double amount;
862
      private long gatewayId;
863
      private long txnId;
6050 anupam.sin 864
      private boolean isDigital;
865
      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 866
        super(client, protocolFactory, transport, resultHandler, false);
867
        this.userId = userId;
868
        this.amount = amount;
869
        this.gatewayId = gatewayId;
870
        this.txnId = txnId;
6050 anupam.sin 871
        this.isDigital = isDigital;
123 ashish 872
      }
3430 rajveer 873
 
874
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
875
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
876
        createPayment_args args = new createPayment_args();
877
        args.setUserId(userId);
878
        args.setAmount(amount);
879
        args.setGatewayId(gatewayId);
880
        args.setTxnId(txnId);
6050 anupam.sin 881
        args.setIsDigital(isDigital);
3430 rajveer 882
        args.write(prot);
883
        prot.writeMessageEnd();
884
      }
885
 
886
      public long getResult() throws PaymentException, org.apache.thrift.TException {
887
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
888
          throw new IllegalStateException("Method call not finished!");
889
        }
890
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
891
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
892
        return (new Client(prot)).recv_createPayment();
893
      }
123 ashish 894
    }
895
 
3430 rajveer 896
    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 {
897
      checkReady();
898
      getPaymentsForUser_call method_call = new getPaymentsForUser_call(userId, fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
899
      this.___currentMethod = method_call;
900
      ___manager.call(method_call);
901
    }
902
 
903
    public static class getPaymentsForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
904
      private long userId;
905
      private long fromTime;
906
      private long toTime;
907
      private PaymentStatus status;
908
      private long gatewayId;
909
      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 {
910
        super(client, protocolFactory, transport, resultHandler, false);
911
        this.userId = userId;
912
        this.fromTime = fromTime;
913
        this.toTime = toTime;
914
        this.status = status;
915
        this.gatewayId = gatewayId;
916
      }
917
 
918
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
919
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
920
        getPaymentsForUser_args args = new getPaymentsForUser_args();
921
        args.setUserId(userId);
922
        args.setFromTime(fromTime);
923
        args.setToTime(toTime);
924
        args.setStatus(status);
925
        args.setGatewayId(gatewayId);
926
        args.write(prot);
927
        prot.writeMessageEnd();
928
      }
929
 
930
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
931
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
932
          throw new IllegalStateException("Method call not finished!");
933
        }
934
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
935
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
936
        return (new Client(prot)).recv_getPaymentsForUser();
937
      }
938
    }
939
 
940
    public void getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPayments_call> resultHandler) throws org.apache.thrift.TException {
941
      checkReady();
942
      getPayments_call method_call = new getPayments_call(fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
943
      this.___currentMethod = method_call;
944
      ___manager.call(method_call);
945
    }
946
 
947
    public static class getPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
948
      private long fromTime;
949
      private long toTime;
950
      private PaymentStatus status;
951
      private long gatewayId;
952
      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 {
953
        super(client, protocolFactory, transport, resultHandler, false);
954
        this.fromTime = fromTime;
955
        this.toTime = toTime;
956
        this.status = status;
957
        this.gatewayId = gatewayId;
958
      }
959
 
960
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
961
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
962
        getPayments_args args = new getPayments_args();
963
        args.setFromTime(fromTime);
964
        args.setToTime(toTime);
965
        args.setStatus(status);
966
        args.setGatewayId(gatewayId);
967
        args.write(prot);
968
        prot.writeMessageEnd();
969
      }
970
 
971
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
972
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
973
          throw new IllegalStateException("Method call not finished!");
974
        }
975
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
976
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
977
        return (new Client(prot)).recv_getPayments();
978
      }
979
    }
980
 
4141 chandransh 981
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException {
982
      checkReady();
983
      getPaymentsByCapturedDate_call method_call = new getPaymentsByCapturedDate_call(fromTime, toTime, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
984
      this.___currentMethod = method_call;
985
      ___manager.call(method_call);
986
    }
987
 
988
    public static class getPaymentsByCapturedDate_call extends org.apache.thrift.async.TAsyncMethodCall {
989
      private long fromTime;
990
      private long toTime;
991
      private long gatewayId;
992
      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 {
993
        super(client, protocolFactory, transport, resultHandler, false);
994
        this.fromTime = fromTime;
995
        this.toTime = toTime;
996
        this.gatewayId = gatewayId;
997
      }
998
 
999
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1000
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsByCapturedDate", org.apache.thrift.protocol.TMessageType.CALL, 0));
1001
        getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
1002
        args.setFromTime(fromTime);
1003
        args.setToTime(toTime);
1004
        args.setGatewayId(gatewayId);
1005
        args.write(prot);
1006
        prot.writeMessageEnd();
1007
      }
1008
 
1009
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1010
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1011
          throw new IllegalStateException("Method call not finished!");
1012
        }
1013
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1014
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1015
        return (new Client(prot)).recv_getPaymentsByCapturedDate();
1016
      }
1017
    }
1018
 
3430 rajveer 1019
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException {
1020
      checkReady();
1021
      getPaymentGateway_call method_call = new getPaymentGateway_call(id, resultHandler, this, ___protocolFactory, ___transport);
1022
      this.___currentMethod = method_call;
1023
      ___manager.call(method_call);
1024
    }
1025
 
1026
    public static class getPaymentGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
1027
      private long id;
1028
      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 {
1029
        super(client, protocolFactory, transport, resultHandler, false);
1030
        this.id = id;
1031
      }
1032
 
1033
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1034
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
1035
        getPaymentGateway_args args = new getPaymentGateway_args();
1036
        args.setId(id);
1037
        args.write(prot);
1038
        prot.writeMessageEnd();
1039
      }
1040
 
1041
      public PaymentGateway getResult() throws PaymentException, org.apache.thrift.TException {
1042
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1043
          throw new IllegalStateException("Method call not finished!");
1044
        }
1045
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1046
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1047
        return (new Client(prot)).recv_getPaymentGateway();
1048
      }
1049
    }
1050
 
4600 varun.gupt 1051
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException {
1052
      checkReady();
1053
      getActivePaymentGateways_call method_call = new getActivePaymentGateways_call(resultHandler, this, ___protocolFactory, ___transport);
1054
      this.___currentMethod = method_call;
1055
      ___manager.call(method_call);
1056
    }
1057
 
1058
    public static class getActivePaymentGateways_call extends org.apache.thrift.async.TAsyncMethodCall {
1059
      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 {
1060
        super(client, protocolFactory, transport, resultHandler, false);
1061
      }
1062
 
1063
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1064
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActivePaymentGateways", org.apache.thrift.protocol.TMessageType.CALL, 0));
1065
        getActivePaymentGateways_args args = new getActivePaymentGateways_args();
1066
        args.write(prot);
1067
        prot.writeMessageEnd();
1068
      }
1069
 
1070
      public List<PaymentGateway> getResult() throws PaymentException, org.apache.thrift.TException {
1071
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1072
          throw new IllegalStateException("Method call not finished!");
1073
        }
1074
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1075
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1076
        return (new Client(prot)).recv_getActivePaymentGateways();
1077
      }
1078
    }
1079
 
3430 rajveer 1080
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<getPayment_call> resultHandler) throws org.apache.thrift.TException {
1081
      checkReady();
1082
      getPayment_call method_call = new getPayment_call(id, resultHandler, this, ___protocolFactory, ___transport);
1083
      this.___currentMethod = method_call;
1084
      ___manager.call(method_call);
1085
    }
1086
 
1087
    public static class getPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1088
      private long id;
1089
      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 {
1090
        super(client, protocolFactory, transport, resultHandler, false);
1091
        this.id = id;
1092
      }
1093
 
1094
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1095
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1096
        getPayment_args args = new getPayment_args();
1097
        args.setId(id);
1098
        args.write(prot);
1099
        prot.writeMessageEnd();
1100
      }
1101
 
1102
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1103
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1104
          throw new IllegalStateException("Method call not finished!");
1105
        }
1106
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1107
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1108
        return (new Client(prot)).recv_getPayment();
1109
      }
1110
    }
1111
 
1112
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1113
      checkReady();
1114
      getPaymentForTxnId_call method_call = new getPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1115
      this.___currentMethod = method_call;
1116
      ___manager.call(method_call);
1117
    }
1118
 
1119
    public static class getPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1120
      private long txnId;
1121
      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 {
1122
        super(client, protocolFactory, transport, resultHandler, false);
1123
        this.txnId = txnId;
1124
      }
1125
 
1126
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1127
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1128
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
1129
        args.setTxnId(txnId);
1130
        args.write(prot);
1131
        prot.writeMessageEnd();
1132
      }
1133
 
1134
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1135
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1136
          throw new IllegalStateException("Method call not finished!");
1137
        }
1138
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1139
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1140
        return (new Client(prot)).recv_getPaymentForTxnId();
1141
      }
1142
    }
1143
 
4600 varun.gupt 1144
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1145
      checkReady();
1146
      getSuccessfulPaymentForTxnId_call method_call = new getSuccessfulPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1147
      this.___currentMethod = method_call;
1148
      ___manager.call(method_call);
1149
    }
1150
 
1151
    public static class getSuccessfulPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1152
      private long txnId;
1153
      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 {
1154
        super(client, protocolFactory, transport, resultHandler, false);
1155
        this.txnId = txnId;
1156
      }
1157
 
1158
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1159
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1160
        getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
1161
        args.setTxnId(txnId);
1162
        args.write(prot);
1163
        prot.writeMessageEnd();
1164
      }
1165
 
1166
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1167
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1168
          throw new IllegalStateException("Method call not finished!");
1169
        }
1170
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1171
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1172
        return (new Client(prot)).recv_getSuccessfulPaymentForTxnId();
1173
      }
1174
    }
1175
 
3430 rajveer 1176
    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 {
1177
      checkReady();
1178
      updatePaymentDetails_call method_call = new updatePaymentDetails_call(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes, resultHandler, this, ___protocolFactory, ___transport);
1179
      this.___currentMethod = method_call;
1180
      ___manager.call(method_call);
1181
    }
1182
 
1183
    public static class updatePaymentDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
1184
      private long id;
1185
      private String gatewayPaymentId;
1186
      private String sessionId;
1187
      private String gatewayTxnStatus;
1188
      private String description;
1189
      private String gatewayTxnId;
1190
      private String authCode;
1191
      private String referenceCode;
1192
      private String errorCode;
1193
      private PaymentStatus status;
1194
      private String gatewayTxnDate;
1195
      private List<Attribute> attributes;
1196
      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 {
1197
        super(client, protocolFactory, transport, resultHandler, false);
1198
        this.id = id;
1199
        this.gatewayPaymentId = gatewayPaymentId;
1200
        this.sessionId = sessionId;
1201
        this.gatewayTxnStatus = gatewayTxnStatus;
1202
        this.description = description;
1203
        this.gatewayTxnId = gatewayTxnId;
1204
        this.authCode = authCode;
1205
        this.referenceCode = referenceCode;
1206
        this.errorCode = errorCode;
1207
        this.status = status;
1208
        this.gatewayTxnDate = gatewayTxnDate;
1209
        this.attributes = attributes;
1210
      }
1211
 
1212
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1213
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePaymentDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
1214
        updatePaymentDetails_args args = new updatePaymentDetails_args();
1215
        args.setId(id);
1216
        args.setGatewayPaymentId(gatewayPaymentId);
1217
        args.setSessionId(sessionId);
1218
        args.setGatewayTxnStatus(gatewayTxnStatus);
1219
        args.setDescription(description);
1220
        args.setGatewayTxnId(gatewayTxnId);
1221
        args.setAuthCode(authCode);
1222
        args.setReferenceCode(referenceCode);
1223
        args.setErrorCode(errorCode);
1224
        args.setStatus(status);
1225
        args.setGatewayTxnDate(gatewayTxnDate);
1226
        args.setAttributes(attributes);
1227
        args.write(prot);
1228
        prot.writeMessageEnd();
1229
      }
1230
 
1231
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1232
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1233
          throw new IllegalStateException("Method call not finished!");
1234
        }
1235
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1236
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1237
        return (new Client(prot)).recv_updatePaymentDetails();
1238
      }
1239
    }
1240
 
1241
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException {
1242
      checkReady();
1243
      getSuccessfulPaymentsAmountRange_call method_call = new getSuccessfulPaymentsAmountRange_call(resultHandler, this, ___protocolFactory, ___transport);
1244
      this.___currentMethod = method_call;
1245
      ___manager.call(method_call);
1246
    }
1247
 
1248
    public static class getSuccessfulPaymentsAmountRange_call extends org.apache.thrift.async.TAsyncMethodCall {
1249
      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 {
1250
        super(client, protocolFactory, transport, resultHandler, false);
1251
      }
1252
 
1253
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1254
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentsAmountRange", org.apache.thrift.protocol.TMessageType.CALL, 0));
1255
        getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1256
        args.write(prot);
1257
        prot.writeMessageEnd();
1258
      }
1259
 
1260
      public List<Double> getResult() throws org.apache.thrift.TException {
1261
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1262
          throw new IllegalStateException("Method call not finished!");
1263
        }
1264
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1265
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1266
        return (new Client(prot)).recv_getSuccessfulPaymentsAmountRange();
1267
      }
1268
    }
1269
 
1270
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException {
1271
      checkReady();
1272
      initializeHdfcPayment_call method_call = new initializeHdfcPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1273
      this.___currentMethod = method_call;
1274
      ___manager.call(method_call);
1275
    }
1276
 
1277
    public static class initializeHdfcPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1278
      private long merchantPaymentId;
1279
      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 {
1280
        super(client, protocolFactory, transport, resultHandler, false);
1281
        this.merchantPaymentId = merchantPaymentId;
1282
      }
1283
 
1284
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1285
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1286
        initializeHdfcPayment_args args = new initializeHdfcPayment_args();
1287
        args.setMerchantPaymentId(merchantPaymentId);
1288
        args.write(prot);
1289
        prot.writeMessageEnd();
1290
      }
1291
 
1292
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1293
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1294
          throw new IllegalStateException("Method call not finished!");
1295
        }
1296
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1297
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1298
        return (new Client(prot)).recv_initializeHdfcPayment();
1299
      }
1300
    }
1301
 
6228 anupam.sin 1302
    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 1303
      checkReady();
6228 anupam.sin 1304
      doHdfcPaymentForDigitalOrder_call method_call = new doHdfcPaymentForDigitalOrder_call(merchantPaymentId, rechargeOrderId, phone, resultHandler, this, ___protocolFactory, ___transport);
6050 anupam.sin 1305
      this.___currentMethod = method_call;
1306
      ___manager.call(method_call);
1307
    }
1308
 
1309
    public static class doHdfcPaymentForDigitalOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1310
      private long merchantPaymentId;
1311
      private long rechargeOrderId;
6228 anupam.sin 1312
      private String phone;
1313
      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 1314
        super(client, protocolFactory, transport, resultHandler, false);
1315
        this.merchantPaymentId = merchantPaymentId;
1316
        this.rechargeOrderId = rechargeOrderId;
6228 anupam.sin 1317
        this.phone = phone;
6050 anupam.sin 1318
      }
1319
 
1320
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1321
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doHdfcPaymentForDigitalOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1322
        doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
1323
        args.setMerchantPaymentId(merchantPaymentId);
1324
        args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 1325
        args.setPhone(phone);
6050 anupam.sin 1326
        args.write(prot);
1327
        prot.writeMessageEnd();
1328
      }
1329
 
1330
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1331
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1332
          throw new IllegalStateException("Method call not finished!");
1333
        }
1334
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1335
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1336
        return (new Client(prot)).recv_doHdfcPaymentForDigitalOrder();
1337
      }
1338
    }
1339
 
3616 chandransh 1340
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException {
1341
      checkReady();
1342
      initializeHdfcEmiPayment_call method_call = new initializeHdfcEmiPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1343
      this.___currentMethod = method_call;
1344
      ___manager.call(method_call);
1345
    }
1346
 
1347
    public static class initializeHdfcEmiPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1348
      private long merchantPaymentId;
1349
      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 {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
        this.merchantPaymentId = merchantPaymentId;
1352
      }
1353
 
1354
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1355
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcEmiPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1356
        initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
1357
        args.setMerchantPaymentId(merchantPaymentId);
1358
        args.write(prot);
1359
        prot.writeMessageEnd();
1360
      }
1361
 
1362
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1363
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1364
          throw new IllegalStateException("Method call not finished!");
1365
        }
1366
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1367
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1368
        return (new Client(prot)).recv_initializeHdfcEmiPayment();
1369
      }
1370
    }
1371
 
3430 rajveer 1372
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
1373
      checkReady();
1374
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
1375
      this.___currentMethod = method_call;
1376
      ___manager.call(method_call);
1377
    }
1378
 
1379
    public static class createRefund_call extends org.apache.thrift.async.TAsyncMethodCall {
1380
      private long orderId;
1381
      private long merchantTxnId;
1382
      private double amount;
1383
      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 {
1384
        super(client, protocolFactory, transport, resultHandler, false);
1385
        this.orderId = orderId;
1386
        this.merchantTxnId = merchantTxnId;
1387
        this.amount = amount;
1388
      }
1389
 
1390
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1391
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRefund", org.apache.thrift.protocol.TMessageType.CALL, 0));
1392
        createRefund_args args = new createRefund_args();
1393
        args.setOrderId(orderId);
1394
        args.setMerchantTxnId(merchantTxnId);
1395
        args.setAmount(amount);
1396
        args.write(prot);
1397
        prot.writeMessageEnd();
1398
      }
1399
 
1400
      public long getResult() throws PaymentException, org.apache.thrift.TException {
1401
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1402
          throw new IllegalStateException("Method call not finished!");
1403
        }
1404
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1405
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1406
        return (new Client(prot)).recv_createRefund();
1407
      }
1408
    }
1409
 
1410
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
1411
      checkReady();
1412
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, resultHandler, this, ___protocolFactory, ___transport);
1413
      this.___currentMethod = method_call;
1414
      ___manager.call(method_call);
1415
    }
1416
 
1417
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1418
      private long merchantTxnId;
1419
      public capturePayment_call(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1420
        super(client, protocolFactory, transport, resultHandler, false);
1421
        this.merchantTxnId = merchantTxnId;
1422
      }
1423
 
1424
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1425
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1426
        capturePayment_args args = new capturePayment_args();
1427
        args.setMerchantTxnId(merchantTxnId);
1428
        args.write(prot);
1429
        prot.writeMessageEnd();
1430
      }
1431
 
1432
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1433
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1434
          throw new IllegalStateException("Method call not finished!");
1435
        }
1436
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1438
        return (new Client(prot)).recv_capturePayment();
1439
      }
1440
    }
1441
 
6486 rajveer 1442
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_call> resultHandler) throws org.apache.thrift.TException {
1443
      checkReady();
1444
      refundPayment_call method_call = new refundPayment_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1445
      this.___currentMethod = method_call;
1446
      ___manager.call(method_call);
1447
    }
1448
 
1449
    public static class refundPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1450
      private long merchantTxnId;
1451
      private double amount;
1452
      private boolean isDigital;
1453
      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 {
1454
        super(client, protocolFactory, transport, resultHandler, false);
1455
        this.merchantTxnId = merchantTxnId;
1456
        this.amount = amount;
1457
        this.isDigital = isDigital;
1458
      }
1459
 
1460
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1461
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("refundPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1462
        refundPayment_args args = new refundPayment_args();
1463
        args.setMerchantTxnId(merchantTxnId);
1464
        args.setAmount(amount);
1465
        args.setIsDigital(isDigital);
1466
        args.write(prot);
1467
        prot.writeMessageEnd();
1468
      }
1469
 
1470
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1471
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1472
          throw new IllegalStateException("Method call not finished!");
1473
        }
1474
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1475
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1476
        return (new Client(prot)).recv_refundPayment();
1477
      }
1478
    }
1479
 
3956 chandransh 1480
    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 {
1481
      checkReady();
1482
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1483
      this.___currentMethod = method_call;
1484
      ___manager.call(method_call);
1485
    }
1486
 
1487
    public static class partiallyCapturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1488
      private long merchantTxnId;
1489
      private double amount;
1490
      private String xferBy;
1491
      private String xferTxnId;
1492
      private long xferDate;
1493
      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 {
1494
        super(client, protocolFactory, transport, resultHandler, false);
1495
        this.merchantTxnId = merchantTxnId;
1496
        this.amount = amount;
1497
        this.xferBy = xferBy;
1498
        this.xferTxnId = xferTxnId;
1499
        this.xferDate = xferDate;
1500
      }
1501
 
1502
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1503
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partiallyCapturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1504
        partiallyCapturePayment_args args = new partiallyCapturePayment_args();
1505
        args.setMerchantTxnId(merchantTxnId);
1506
        args.setAmount(amount);
1507
        args.setXferBy(xferBy);
1508
        args.setXferTxnId(xferTxnId);
1509
        args.setXferDate(xferDate);
1510
        args.write(prot);
1511
        prot.writeMessageEnd();
1512
      }
1513
 
1514
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1515
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1516
          throw new IllegalStateException("Method call not finished!");
1517
        }
1518
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1519
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1520
        return (new Client(prot)).recv_partiallyCapturePayment();
1521
      }
1522
    }
1523
 
4008 mandeep.dh 1524
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException {
1525
      checkReady();
1526
      getPaymentsRequiringExtraProcessing_call method_call = new getPaymentsRequiringExtraProcessing_call(category, resultHandler, this, ___protocolFactory, ___transport);
1527
      this.___currentMethod = method_call;
1528
      ___manager.call(method_call);
1529
    }
1530
 
1531
    public static class getPaymentsRequiringExtraProcessing_call extends org.apache.thrift.async.TAsyncMethodCall {
1532
      private ExtraPaymentProcessingType category;
1533
      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 {
1534
        super(client, protocolFactory, transport, resultHandler, false);
1535
        this.category = category;
1536
      }
1537
 
1538
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1539
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsRequiringExtraProcessing", org.apache.thrift.protocol.TMessageType.CALL, 0));
1540
        getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
1541
        args.setCategory(category);
1542
        args.write(prot);
1543
        prot.writeMessageEnd();
1544
      }
1545
 
1546
      public List<Long> getResult() throws org.apache.thrift.TException {
1547
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1548
          throw new IllegalStateException("Method call not finished!");
1549
        }
1550
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1551
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1552
        return (new Client(prot)).recv_getPaymentsRequiringExtraProcessing();
1553
      }
1554
    }
1555
 
1556
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException {
1557
      checkReady();
1558
      markPaymentAsProcessed_call method_call = new markPaymentAsProcessed_call(paymentId, category, resultHandler, this, ___protocolFactory, ___transport);
1559
      this.___currentMethod = method_call;
1560
      ___manager.call(method_call);
1561
    }
1562
 
1563
    public static class markPaymentAsProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
1564
      private long paymentId;
1565
      private ExtraPaymentProcessingType category;
1566
      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 {
1567
        super(client, protocolFactory, transport, resultHandler, false);
1568
        this.paymentId = paymentId;
1569
        this.category = category;
1570
      }
1571
 
1572
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1573
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPaymentAsProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
1574
        markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
1575
        args.setPaymentId(paymentId);
1576
        args.setCategory(category);
1577
        args.write(prot);
1578
        prot.writeMessageEnd();
1579
      }
1580
 
1581
      public void getResult() throws org.apache.thrift.TException {
1582
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1583
          throw new IllegalStateException("Method call not finished!");
1584
        }
1585
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1586
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1587
        (new Client(prot)).recv_markPaymentAsProcessed();
1588
      }
1589
    }
1590
 
3430 rajveer 1591
  }
1592
 
1593
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1594
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1595
    public Processor(I iface) {
1596
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1597
    }
1598
 
1599
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1600
      super(iface, getProcessMap(processMap));
1601
    }
1602
 
1603
    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) {
1604
      processMap.put("createPayment", new createPayment());
1605
      processMap.put("getPaymentsForUser", new getPaymentsForUser());
1606
      processMap.put("getPayments", new getPayments());
4141 chandransh 1607
      processMap.put("getPaymentsByCapturedDate", new getPaymentsByCapturedDate());
3430 rajveer 1608
      processMap.put("getPaymentGateway", new getPaymentGateway());
4600 varun.gupt 1609
      processMap.put("getActivePaymentGateways", new getActivePaymentGateways());
3430 rajveer 1610
      processMap.put("getPayment", new getPayment());
1611
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
4600 varun.gupt 1612
      processMap.put("getSuccessfulPaymentForTxnId", new getSuccessfulPaymentForTxnId());
3430 rajveer 1613
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
1614
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1615
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
6050 anupam.sin 1616
      processMap.put("doHdfcPaymentForDigitalOrder", new doHdfcPaymentForDigitalOrder());
3616 chandransh 1617
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
3430 rajveer 1618
      processMap.put("createRefund", new createRefund());
1619
      processMap.put("capturePayment", new capturePayment());
6486 rajveer 1620
      processMap.put("refundPayment", new refundPayment());
3956 chandransh 1621
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
4008 mandeep.dh 1622
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1623
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
3430 rajveer 1624
      return processMap;
1625
    }
1626
 
1627
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1628
      public createPayment() {
1629
        super("createPayment");
1630
      }
1631
 
1632
      protected createPayment_args getEmptyArgsInstance() {
1633
        return new createPayment_args();
1634
      }
1635
 
1636
      protected createPayment_result getResult(I iface, createPayment_args args) throws org.apache.thrift.TException {
123 ashish 1637
        createPayment_result result = new createPayment_result();
1638
        try {
6050 anupam.sin 1639
          result.success = iface.createPayment(args.userId, args.amount, args.gatewayId, args.txnId, args.isDigital);
420 ashish 1640
          result.setSuccessIsSet(true);
123 ashish 1641
        } catch (PaymentException pe) {
1642
          result.pe = pe;
1643
        }
3430 rajveer 1644
        return result;
123 ashish 1645
      }
1646
    }
1647
 
3430 rajveer 1648
    private static class getPaymentsForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsForUser_args> {
1649
      public getPaymentsForUser() {
1650
        super("getPaymentsForUser");
1651
      }
1652
 
1653
      protected getPaymentsForUser_args getEmptyArgsInstance() {
1654
        return new getPaymentsForUser_args();
1655
      }
1656
 
1657
      protected getPaymentsForUser_result getResult(I iface, getPaymentsForUser_args args) throws org.apache.thrift.TException {
123 ashish 1658
        getPaymentsForUser_result result = new getPaymentsForUser_result();
1659
        try {
3430 rajveer 1660
          result.success = iface.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1661
        } catch (PaymentException pe) {
1662
          result.pe = pe;
1663
        }
3430 rajveer 1664
        return result;
123 ashish 1665
      }
1666
    }
1667
 
3430 rajveer 1668
    private static class getPayments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayments_args> {
1669
      public getPayments() {
1670
        super("getPayments");
1671
      }
1672
 
1673
      protected getPayments_args getEmptyArgsInstance() {
1674
        return new getPayments_args();
1675
      }
1676
 
1677
      protected getPayments_result getResult(I iface, getPayments_args args) throws org.apache.thrift.TException {
123 ashish 1678
        getPayments_result result = new getPayments_result();
1679
        try {
3430 rajveer 1680
          result.success = iface.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1681
        } catch (PaymentException pe) {
1682
          result.pe = pe;
1683
        }
3430 rajveer 1684
        return result;
123 ashish 1685
      }
1686
    }
1687
 
4141 chandransh 1688
    private static class getPaymentsByCapturedDate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsByCapturedDate_args> {
1689
      public getPaymentsByCapturedDate() {
1690
        super("getPaymentsByCapturedDate");
1691
      }
1692
 
1693
      protected getPaymentsByCapturedDate_args getEmptyArgsInstance() {
1694
        return new getPaymentsByCapturedDate_args();
1695
      }
1696
 
1697
      protected getPaymentsByCapturedDate_result getResult(I iface, getPaymentsByCapturedDate_args args) throws org.apache.thrift.TException {
1698
        getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
1699
        try {
1700
          result.success = iface.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId);
1701
        } catch (PaymentException pe) {
1702
          result.pe = pe;
1703
        }
1704
        return result;
1705
      }
1706
    }
1707
 
3430 rajveer 1708
    private static class getPaymentGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentGateway_args> {
1709
      public getPaymentGateway() {
1710
        super("getPaymentGateway");
1711
      }
1712
 
1713
      protected getPaymentGateway_args getEmptyArgsInstance() {
1714
        return new getPaymentGateway_args();
1715
      }
1716
 
1717
      protected getPaymentGateway_result getResult(I iface, getPaymentGateway_args args) throws org.apache.thrift.TException {
420 ashish 1718
        getPaymentGateway_result result = new getPaymentGateway_result();
1719
        try {
3430 rajveer 1720
          result.success = iface.getPaymentGateway(args.id);
420 ashish 1721
        } catch (PaymentException pe) {
1722
          result.pe = pe;
1723
        }
3430 rajveer 1724
        return result;
420 ashish 1725
      }
1726
    }
1727
 
4600 varun.gupt 1728
    private static class getActivePaymentGateways<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActivePaymentGateways_args> {
1729
      public getActivePaymentGateways() {
1730
        super("getActivePaymentGateways");
1731
      }
1732
 
1733
      protected getActivePaymentGateways_args getEmptyArgsInstance() {
1734
        return new getActivePaymentGateways_args();
1735
      }
1736
 
1737
      protected getActivePaymentGateways_result getResult(I iface, getActivePaymentGateways_args args) throws org.apache.thrift.TException {
1738
        getActivePaymentGateways_result result = new getActivePaymentGateways_result();
1739
        try {
1740
          result.success = iface.getActivePaymentGateways();
1741
        } catch (PaymentException pe) {
1742
          result.pe = pe;
1743
        }
1744
        return result;
1745
      }
1746
    }
1747
 
3430 rajveer 1748
    private static class getPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayment_args> {
1749
      public getPayment() {
1750
        super("getPayment");
1751
      }
1752
 
1753
      protected getPayment_args getEmptyArgsInstance() {
1754
        return new getPayment_args();
1755
      }
1756
 
1757
      protected getPayment_result getResult(I iface, getPayment_args args) throws org.apache.thrift.TException {
695 rajveer 1758
        getPayment_result result = new getPayment_result();
420 ashish 1759
        try {
3430 rajveer 1760
          result.success = iface.getPayment(args.id);
420 ashish 1761
        } catch (PaymentException pe) {
1762
          result.pe = pe;
1763
        }
3430 rajveer 1764
        return result;
420 ashish 1765
      }
1766
    }
1767
 
3430 rajveer 1768
    private static class getPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForTxnId_args> {
1769
      public getPaymentForTxnId() {
1770
        super("getPaymentForTxnId");
1771
      }
1772
 
1773
      protected getPaymentForTxnId_args getEmptyArgsInstance() {
1774
        return new getPaymentForTxnId_args();
1775
      }
1776
 
1777
      protected getPaymentForTxnId_result getResult(I iface, getPaymentForTxnId_args args) throws org.apache.thrift.TException {
695 rajveer 1778
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 1779
        try {
3430 rajveer 1780
          result.success = iface.getPaymentForTxnId(args.txnId);
420 ashish 1781
        } catch (PaymentException pe) {
1782
          result.pe = pe;
1783
        }
3430 rajveer 1784
        return result;
420 ashish 1785
      }
1786
    }
1787
 
4600 varun.gupt 1788
    private static class getSuccessfulPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentForTxnId_args> {
1789
      public getSuccessfulPaymentForTxnId() {
1790
        super("getSuccessfulPaymentForTxnId");
1791
      }
1792
 
1793
      protected getSuccessfulPaymentForTxnId_args getEmptyArgsInstance() {
1794
        return new getSuccessfulPaymentForTxnId_args();
1795
      }
1796
 
1797
      protected getSuccessfulPaymentForTxnId_result getResult(I iface, getSuccessfulPaymentForTxnId_args args) throws org.apache.thrift.TException {
1798
        getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
1799
        try {
1800
          result.success = iface.getSuccessfulPaymentForTxnId(args.txnId);
1801
        } catch (PaymentException pe) {
1802
          result.pe = pe;
1803
        }
1804
        return result;
1805
      }
1806
    }
1807
 
3430 rajveer 1808
    private static class updatePaymentDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePaymentDetails_args> {
1809
      public updatePaymentDetails() {
1810
        super("updatePaymentDetails");
1811
      }
1812
 
1813
      protected updatePaymentDetails_args getEmptyArgsInstance() {
1814
        return new updatePaymentDetails_args();
1815
      }
1816
 
1817
      protected updatePaymentDetails_result getResult(I iface, updatePaymentDetails_args args) throws org.apache.thrift.TException {
695 rajveer 1818
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 1819
        try {
3430 rajveer 1820
          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 1821
          result.setSuccessIsSet(true);
420 ashish 1822
        } catch (PaymentException pe) {
1823
          result.pe = pe;
1824
        }
3430 rajveer 1825
        return result;
420 ashish 1826
      }
1827
    }
1828
 
3430 rajveer 1829
    private static class getSuccessfulPaymentsAmountRange<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentsAmountRange_args> {
1830
      public getSuccessfulPaymentsAmountRange() {
1831
        super("getSuccessfulPaymentsAmountRange");
1832
      }
1833
 
1834
      protected getSuccessfulPaymentsAmountRange_args getEmptyArgsInstance() {
1835
        return new getSuccessfulPaymentsAmountRange_args();
1836
      }
1837
 
1838
      protected getSuccessfulPaymentsAmountRange_result getResult(I iface, getSuccessfulPaymentsAmountRange_args args) throws org.apache.thrift.TException {
1731 ankur.sing 1839
        getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 1840
        result.success = iface.getSuccessfulPaymentsAmountRange();
1841
        return result;
1629 ankur.sing 1842
      }
1843
    }
1844
 
3430 rajveer 1845
    private static class initializeHdfcPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcPayment_args> {
1846
      public initializeHdfcPayment() {
1847
        super("initializeHdfcPayment");
1848
      }
1849
 
1850
      protected initializeHdfcPayment_args getEmptyArgsInstance() {
1851
        return new initializeHdfcPayment_args();
1852
      }
1853
 
1854
      protected initializeHdfcPayment_result getResult(I iface, initializeHdfcPayment_args args) throws org.apache.thrift.TException {
2462 chandransh 1855
        initializeHdfcPayment_result result = new initializeHdfcPayment_result();
1856
        try {
3430 rajveer 1857
          result.success = iface.initializeHdfcPayment(args.merchantPaymentId);
2462 chandransh 1858
        } catch (PaymentException pe) {
1859
          result.pe = pe;
1860
        }
3430 rajveer 1861
        return result;
2462 chandransh 1862
      }
1863
    }
1864
 
6050 anupam.sin 1865
    private static class doHdfcPaymentForDigitalOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doHdfcPaymentForDigitalOrder_args> {
1866
      public doHdfcPaymentForDigitalOrder() {
1867
        super("doHdfcPaymentForDigitalOrder");
1868
      }
1869
 
1870
      protected doHdfcPaymentForDigitalOrder_args getEmptyArgsInstance() {
1871
        return new doHdfcPaymentForDigitalOrder_args();
1872
      }
1873
 
1874
      protected doHdfcPaymentForDigitalOrder_result getResult(I iface, doHdfcPaymentForDigitalOrder_args args) throws org.apache.thrift.TException {
1875
        doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
1876
        try {
6228 anupam.sin 1877
          result.success = iface.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId, args.phone);
6050 anupam.sin 1878
        } catch (PaymentException pe) {
1879
          result.pe = pe;
1880
        }
1881
        return result;
1882
      }
1883
    }
1884
 
3616 chandransh 1885
    private static class initializeHdfcEmiPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcEmiPayment_args> {
1886
      public initializeHdfcEmiPayment() {
1887
        super("initializeHdfcEmiPayment");
1888
      }
1889
 
1890
      protected initializeHdfcEmiPayment_args getEmptyArgsInstance() {
1891
        return new initializeHdfcEmiPayment_args();
1892
      }
1893
 
1894
      protected initializeHdfcEmiPayment_result getResult(I iface, initializeHdfcEmiPayment_args args) throws org.apache.thrift.TException {
1895
        initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
1896
        try {
1897
          result.success = iface.initializeHdfcEmiPayment(args.merchantPaymentId);
1898
        } catch (PaymentException pe) {
1899
          result.pe = pe;
1900
        }
1901
        return result;
1902
      }
1903
    }
1904
 
3430 rajveer 1905
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
1906
      public createRefund() {
1907
        super("createRefund");
1908
      }
1909
 
1910
      protected createRefund_args getEmptyArgsInstance() {
1911
        return new createRefund_args();
1912
      }
1913
 
1914
      protected createRefund_result getResult(I iface, createRefund_args args) throws org.apache.thrift.TException {
2690 chandransh 1915
        createRefund_result result = new createRefund_result();
1916
        try {
3430 rajveer 1917
          result.success = iface.createRefund(args.orderId, args.merchantTxnId, args.amount);
2690 chandransh 1918
          result.setSuccessIsSet(true);
1919
        } catch (PaymentException pe) {
1920
          result.pe = pe;
1921
        }
3430 rajveer 1922
        return result;
2690 chandransh 1923
      }
1924
    }
1925
 
3430 rajveer 1926
    private static class capturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, capturePayment_args> {
1927
      public capturePayment() {
1928
        super("capturePayment");
1929
      }
1930
 
1931
      protected capturePayment_args getEmptyArgsInstance() {
1932
        return new capturePayment_args();
1933
      }
1934
 
1935
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
3010 chandransh 1936
        capturePayment_result result = new capturePayment_result();
1937
        try {
3430 rajveer 1938
          result.success = iface.capturePayment(args.merchantTxnId);
3010 chandransh 1939
          result.setSuccessIsSet(true);
1940
        } catch (PaymentException pe) {
1941
          result.pe = pe;
1942
        }
3430 rajveer 1943
        return result;
3010 chandransh 1944
      }
1945
    }
1946
 
6486 rajveer 1947
    private static class refundPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, refundPayment_args> {
1948
      public refundPayment() {
1949
        super("refundPayment");
1950
      }
1951
 
1952
      protected refundPayment_args getEmptyArgsInstance() {
1953
        return new refundPayment_args();
1954
      }
1955
 
1956
      protected refundPayment_result getResult(I iface, refundPayment_args args) throws org.apache.thrift.TException {
1957
        refundPayment_result result = new refundPayment_result();
1958
        try {
1959
          result.success = iface.refundPayment(args.merchantTxnId, args.amount, args.isDigital);
1960
          result.setSuccessIsSet(true);
1961
        } catch (PaymentException pe) {
1962
          result.pe = pe;
1963
        }
1964
        return result;
1965
      }
1966
    }
1967
 
3956 chandransh 1968
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
1969
      public partiallyCapturePayment() {
1970
        super("partiallyCapturePayment");
1971
      }
1972
 
1973
      protected partiallyCapturePayment_args getEmptyArgsInstance() {
1974
        return new partiallyCapturePayment_args();
1975
      }
1976
 
1977
      protected partiallyCapturePayment_result getResult(I iface, partiallyCapturePayment_args args) throws org.apache.thrift.TException {
1978
        partiallyCapturePayment_result result = new partiallyCapturePayment_result();
1979
        try {
1980
          result.success = iface.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate);
1981
          result.setSuccessIsSet(true);
1982
        } catch (PaymentException pe) {
1983
          result.pe = pe;
1984
        }
1985
        return result;
1986
      }
1987
    }
1988
 
4008 mandeep.dh 1989
    private static class getPaymentsRequiringExtraProcessing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsRequiringExtraProcessing_args> {
1990
      public getPaymentsRequiringExtraProcessing() {
1991
        super("getPaymentsRequiringExtraProcessing");
1992
      }
1993
 
1994
      protected getPaymentsRequiringExtraProcessing_args getEmptyArgsInstance() {
1995
        return new getPaymentsRequiringExtraProcessing_args();
1996
      }
1997
 
1998
      protected getPaymentsRequiringExtraProcessing_result getResult(I iface, getPaymentsRequiringExtraProcessing_args args) throws org.apache.thrift.TException {
1999
        getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
2000
        result.success = iface.getPaymentsRequiringExtraProcessing(args.category);
2001
        return result;
2002
      }
2003
    }
2004
 
2005
    private static class markPaymentAsProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPaymentAsProcessed_args> {
2006
      public markPaymentAsProcessed() {
2007
        super("markPaymentAsProcessed");
2008
      }
2009
 
2010
      protected markPaymentAsProcessed_args getEmptyArgsInstance() {
2011
        return new markPaymentAsProcessed_args();
2012
      }
2013
 
2014
      protected markPaymentAsProcessed_result getResult(I iface, markPaymentAsProcessed_args args) throws org.apache.thrift.TException {
2015
        markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
2016
        iface.markPaymentAsProcessed(args.paymentId, args.category);
2017
        return result;
2018
      }
2019
    }
2020
 
123 ashish 2021
  }
2022
 
3430 rajveer 2023
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
2024
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
123 ashish 2025
 
3430 rajveer 2026
    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);
2027
    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);
2028
    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);
2029
    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 2030
    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 2031
 
3430 rajveer 2032
    private long userId; // required
2033
    private double amount; // required
2034
    private long gatewayId; // required
2035
    private long txnId; // required
6050 anupam.sin 2036
    private boolean isDigital; // required
123 ashish 2037
 
2038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2039
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 2040
      USER_ID((short)1, "userId"),
2041
      AMOUNT((short)2, "amount"),
2042
      GATEWAY_ID((short)3, "gatewayId"),
6050 anupam.sin 2043
      TXN_ID((short)4, "txnId"),
2044
      IS_DIGITAL((short)5, "isDigital");
123 ashish 2045
 
2046
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2047
 
2048
      static {
2049
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2050
          byName.put(field.getFieldName(), field);
2051
        }
2052
      }
2053
 
2054
      /**
2055
       * Find the _Fields constant that matches fieldId, or null if its not found.
2056
       */
2057
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2058
        switch(fieldId) {
2059
          case 1: // USER_ID
2060
            return USER_ID;
2061
          case 2: // AMOUNT
2062
            return AMOUNT;
2063
          case 3: // GATEWAY_ID
2064
            return GATEWAY_ID;
2065
          case 4: // TXN_ID
2066
            return TXN_ID;
6050 anupam.sin 2067
          case 5: // IS_DIGITAL
2068
            return IS_DIGITAL;
3430 rajveer 2069
          default:
2070
            return null;
2071
        }
123 ashish 2072
      }
2073
 
2074
      /**
2075
       * Find the _Fields constant that matches fieldId, throwing an exception
2076
       * if it is not found.
2077
       */
2078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2079
        _Fields fields = findByThriftId(fieldId);
2080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2081
        return fields;
2082
      }
2083
 
2084
      /**
2085
       * Find the _Fields constant that matches name, or null if its not found.
2086
       */
2087
      public static _Fields findByName(String name) {
2088
        return byName.get(name);
2089
      }
2090
 
2091
      private final short _thriftId;
2092
      private final String _fieldName;
2093
 
2094
      _Fields(short thriftId, String fieldName) {
2095
        _thriftId = thriftId;
2096
        _fieldName = fieldName;
2097
      }
2098
 
2099
      public short getThriftFieldId() {
2100
        return _thriftId;
2101
      }
2102
 
2103
      public String getFieldName() {
2104
        return _fieldName;
2105
      }
2106
    }
2107
 
2108
    // isset id assignments
695 rajveer 2109
    private static final int __USERID_ISSET_ID = 0;
2110
    private static final int __AMOUNT_ISSET_ID = 1;
2111
    private static final int __GATEWAYID_ISSET_ID = 2;
2112
    private static final int __TXNID_ISSET_ID = 3;
6050 anupam.sin 2113
    private static final int __ISDIGITAL_ISSET_ID = 4;
2114
    private BitSet __isset_bit_vector = new BitSet(5);
123 ashish 2115
 
3430 rajveer 2116
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2117
    static {
3430 rajveer 2118
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2119
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2120
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2121
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2122
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
2123
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2124
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2125
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2126
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6050 anupam.sin 2127
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2128
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 2129
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2130
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
123 ashish 2131
    }
2132
 
2133
    public createPayment_args() {
2134
    }
2135
 
2136
    public createPayment_args(
695 rajveer 2137
      long userId,
123 ashish 2138
      double amount,
695 rajveer 2139
      long gatewayId,
6050 anupam.sin 2140
      long txnId,
2141
      boolean isDigital)
123 ashish 2142
    {
2143
      this();
695 rajveer 2144
      this.userId = userId;
2145
      setUserIdIsSet(true);
123 ashish 2146
      this.amount = amount;
2147
      setAmountIsSet(true);
695 rajveer 2148
      this.gatewayId = gatewayId;
2149
      setGatewayIdIsSet(true);
2150
      this.txnId = txnId;
2151
      setTxnIdIsSet(true);
6050 anupam.sin 2152
      this.isDigital = isDigital;
2153
      setIsDigitalIsSet(true);
123 ashish 2154
    }
2155
 
2156
    /**
2157
     * Performs a deep copy on <i>other</i>.
2158
     */
2159
    public createPayment_args(createPayment_args other) {
2160
      __isset_bit_vector.clear();
2161
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 2162
      this.userId = other.userId;
123 ashish 2163
      this.amount = other.amount;
695 rajveer 2164
      this.gatewayId = other.gatewayId;
2165
      this.txnId = other.txnId;
6050 anupam.sin 2166
      this.isDigital = other.isDigital;
123 ashish 2167
    }
2168
 
2169
    public createPayment_args deepCopy() {
2170
      return new createPayment_args(this);
2171
    }
2172
 
3430 rajveer 2173
    @Override
2174
    public void clear() {
2175
      setUserIdIsSet(false);
2176
      this.userId = 0;
2177
      setAmountIsSet(false);
2178
      this.amount = 0.0;
2179
      setGatewayIdIsSet(false);
2180
      this.gatewayId = 0;
2181
      setTxnIdIsSet(false);
2182
      this.txnId = 0;
6050 anupam.sin 2183
      setIsDigitalIsSet(false);
2184
      this.isDigital = false;
123 ashish 2185
    }
2186
 
695 rajveer 2187
    public long getUserId() {
2188
      return this.userId;
123 ashish 2189
    }
2190
 
3430 rajveer 2191
    public void setUserId(long userId) {
695 rajveer 2192
      this.userId = userId;
2193
      setUserIdIsSet(true);
123 ashish 2194
    }
2195
 
695 rajveer 2196
    public void unsetUserId() {
2197
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 2198
    }
2199
 
3430 rajveer 2200
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
695 rajveer 2201
    public boolean isSetUserId() {
2202
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 2203
    }
2204
 
695 rajveer 2205
    public void setUserIdIsSet(boolean value) {
2206
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 2207
    }
2208
 
2209
    public double getAmount() {
2210
      return this.amount;
2211
    }
2212
 
3430 rajveer 2213
    public void setAmount(double amount) {
123 ashish 2214
      this.amount = amount;
2215
      setAmountIsSet(true);
2216
    }
2217
 
2218
    public void unsetAmount() {
2219
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
2220
    }
2221
 
3430 rajveer 2222
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
123 ashish 2223
    public boolean isSetAmount() {
2224
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
2225
    }
2226
 
2227
    public void setAmountIsSet(boolean value) {
2228
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
2229
    }
2230
 
695 rajveer 2231
    public long getGatewayId() {
2232
      return this.gatewayId;
123 ashish 2233
    }
2234
 
3430 rajveer 2235
    public void setGatewayId(long gatewayId) {
695 rajveer 2236
      this.gatewayId = gatewayId;
2237
      setGatewayIdIsSet(true);
123 ashish 2238
    }
2239
 
695 rajveer 2240
    public void unsetGatewayId() {
2241
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2242
    }
2243
 
3430 rajveer 2244
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 2245
    public boolean isSetGatewayId() {
2246
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2247
    }
2248
 
695 rajveer 2249
    public void setGatewayIdIsSet(boolean value) {
2250
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2251
    }
2252
 
695 rajveer 2253
    public long getTxnId() {
2254
      return this.txnId;
2255
    }
2256
 
3430 rajveer 2257
    public void setTxnId(long txnId) {
695 rajveer 2258
      this.txnId = txnId;
2259
      setTxnIdIsSet(true);
2260
    }
2261
 
2262
    public void unsetTxnId() {
2263
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
2264
    }
2265
 
3430 rajveer 2266
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 2267
    public boolean isSetTxnId() {
2268
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
2269
    }
2270
 
2271
    public void setTxnIdIsSet(boolean value) {
2272
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
2273
    }
2274
 
6050 anupam.sin 2275
    public boolean isIsDigital() {
2276
      return this.isDigital;
2277
    }
2278
 
2279
    public void setIsDigital(boolean isDigital) {
2280
      this.isDigital = isDigital;
2281
      setIsDigitalIsSet(true);
2282
    }
2283
 
2284
    public void unsetIsDigital() {
2285
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
2286
    }
2287
 
2288
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
2289
    public boolean isSetIsDigital() {
2290
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
2291
    }
2292
 
2293
    public void setIsDigitalIsSet(boolean value) {
2294
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
2295
    }
2296
 
123 ashish 2297
    public void setFieldValue(_Fields field, Object value) {
2298
      switch (field) {
2299
      case USER_ID:
2300
        if (value == null) {
695 rajveer 2301
          unsetUserId();
123 ashish 2302
        } else {
695 rajveer 2303
          setUserId((Long)value);
123 ashish 2304
        }
2305
        break;
2306
 
695 rajveer 2307
      case AMOUNT:
123 ashish 2308
        if (value == null) {
695 rajveer 2309
          unsetAmount();
123 ashish 2310
        } else {
695 rajveer 2311
          setAmount((Double)value);
123 ashish 2312
        }
2313
        break;
2314
 
695 rajveer 2315
      case GATEWAY_ID:
123 ashish 2316
        if (value == null) {
695 rajveer 2317
          unsetGatewayId();
123 ashish 2318
        } else {
695 rajveer 2319
          setGatewayId((Long)value);
123 ashish 2320
        }
2321
        break;
2322
 
695 rajveer 2323
      case TXN_ID:
123 ashish 2324
        if (value == null) {
695 rajveer 2325
          unsetTxnId();
123 ashish 2326
        } else {
695 rajveer 2327
          setTxnId((Long)value);
123 ashish 2328
        }
2329
        break;
2330
 
6050 anupam.sin 2331
      case IS_DIGITAL:
2332
        if (value == null) {
2333
          unsetIsDigital();
2334
        } else {
2335
          setIsDigital((Boolean)value);
2336
        }
2337
        break;
2338
 
123 ashish 2339
      }
2340
    }
2341
 
2342
    public Object getFieldValue(_Fields field) {
2343
      switch (field) {
2344
      case USER_ID:
3430 rajveer 2345
        return Long.valueOf(getUserId());
123 ashish 2346
 
2347
      case AMOUNT:
3430 rajveer 2348
        return Double.valueOf(getAmount());
123 ashish 2349
 
420 ashish 2350
      case GATEWAY_ID:
3430 rajveer 2351
        return Long.valueOf(getGatewayId());
123 ashish 2352
 
695 rajveer 2353
      case TXN_ID:
3430 rajveer 2354
        return Long.valueOf(getTxnId());
695 rajveer 2355
 
6050 anupam.sin 2356
      case IS_DIGITAL:
2357
        return Boolean.valueOf(isIsDigital());
2358
 
123 ashish 2359
      }
2360
      throw new IllegalStateException();
2361
    }
2362
 
3430 rajveer 2363
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2364
    public boolean isSet(_Fields field) {
2365
      if (field == null) {
2366
        throw new IllegalArgumentException();
2367
      }
123 ashish 2368
 
2369
      switch (field) {
2370
      case USER_ID:
695 rajveer 2371
        return isSetUserId();
123 ashish 2372
      case AMOUNT:
2373
        return isSetAmount();
420 ashish 2374
      case GATEWAY_ID:
695 rajveer 2375
        return isSetGatewayId();
2376
      case TXN_ID:
2377
        return isSetTxnId();
6050 anupam.sin 2378
      case IS_DIGITAL:
2379
        return isSetIsDigital();
123 ashish 2380
      }
2381
      throw new IllegalStateException();
2382
    }
2383
 
2384
    @Override
2385
    public boolean equals(Object that) {
2386
      if (that == null)
2387
        return false;
2388
      if (that instanceof createPayment_args)
2389
        return this.equals((createPayment_args)that);
2390
      return false;
2391
    }
2392
 
2393
    public boolean equals(createPayment_args that) {
2394
      if (that == null)
2395
        return false;
2396
 
695 rajveer 2397
      boolean this_present_userId = true;
2398
      boolean that_present_userId = true;
2399
      if (this_present_userId || that_present_userId) {
2400
        if (!(this_present_userId && that_present_userId))
123 ashish 2401
          return false;
695 rajveer 2402
        if (this.userId != that.userId)
123 ashish 2403
          return false;
2404
      }
2405
 
2406
      boolean this_present_amount = true;
2407
      boolean that_present_amount = true;
2408
      if (this_present_amount || that_present_amount) {
2409
        if (!(this_present_amount && that_present_amount))
2410
          return false;
2411
        if (this.amount != that.amount)
2412
          return false;
2413
      }
2414
 
695 rajveer 2415
      boolean this_present_gatewayId = true;
2416
      boolean that_present_gatewayId = true;
2417
      if (this_present_gatewayId || that_present_gatewayId) {
2418
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2419
          return false;
695 rajveer 2420
        if (this.gatewayId != that.gatewayId)
123 ashish 2421
          return false;
2422
      }
2423
 
695 rajveer 2424
      boolean this_present_txnId = true;
2425
      boolean that_present_txnId = true;
2426
      if (this_present_txnId || that_present_txnId) {
2427
        if (!(this_present_txnId && that_present_txnId))
2428
          return false;
2429
        if (this.txnId != that.txnId)
2430
          return false;
2431
      }
2432
 
6050 anupam.sin 2433
      boolean this_present_isDigital = true;
2434
      boolean that_present_isDigital = true;
2435
      if (this_present_isDigital || that_present_isDigital) {
2436
        if (!(this_present_isDigital && that_present_isDigital))
2437
          return false;
2438
        if (this.isDigital != that.isDigital)
2439
          return false;
2440
      }
2441
 
123 ashish 2442
      return true;
2443
    }
2444
 
2445
    @Override
2446
    public int hashCode() {
2447
      return 0;
2448
    }
2449
 
2450
    public int compareTo(createPayment_args other) {
2451
      if (!getClass().equals(other.getClass())) {
2452
        return getClass().getName().compareTo(other.getClass().getName());
2453
      }
2454
 
2455
      int lastComparison = 0;
2456
      createPayment_args typedOther = (createPayment_args)other;
2457
 
3430 rajveer 2458
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 2459
      if (lastComparison != 0) {
2460
        return lastComparison;
2461
      }
3430 rajveer 2462
      if (isSetUserId()) {
2463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
2464
        if (lastComparison != 0) {
2465
          return lastComparison;
2466
        }
123 ashish 2467
      }
3430 rajveer 2468
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
123 ashish 2469
      if (lastComparison != 0) {
2470
        return lastComparison;
2471
      }
3430 rajveer 2472
      if (isSetAmount()) {
2473
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
2474
        if (lastComparison != 0) {
2475
          return lastComparison;
2476
        }
123 ashish 2477
      }
3430 rajveer 2478
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 2479
      if (lastComparison != 0) {
2480
        return lastComparison;
2481
      }
3430 rajveer 2482
      if (isSetGatewayId()) {
2483
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
2484
        if (lastComparison != 0) {
2485
          return lastComparison;
2486
        }
123 ashish 2487
      }
3430 rajveer 2488
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
123 ashish 2489
      if (lastComparison != 0) {
2490
        return lastComparison;
2491
      }
3430 rajveer 2492
      if (isSetTxnId()) {
2493
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
2494
        if (lastComparison != 0) {
2495
          return lastComparison;
2496
        }
123 ashish 2497
      }
6050 anupam.sin 2498
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
2499
      if (lastComparison != 0) {
2500
        return lastComparison;
2501
      }
2502
      if (isSetIsDigital()) {
2503
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
2504
        if (lastComparison != 0) {
2505
          return lastComparison;
2506
        }
2507
      }
123 ashish 2508
      return 0;
2509
    }
2510
 
3430 rajveer 2511
    public _Fields fieldForId(int fieldId) {
2512
      return _Fields.findByThriftId(fieldId);
2513
    }
2514
 
2515
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2516
      org.apache.thrift.protocol.TField field;
123 ashish 2517
      iprot.readStructBegin();
2518
      while (true)
2519
      {
2520
        field = iprot.readFieldBegin();
3430 rajveer 2521
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2522
          break;
2523
        }
3430 rajveer 2524
        switch (field.id) {
2525
          case 1: // USER_ID
2526
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2527
              this.userId = iprot.readI64();
2528
              setUserIdIsSet(true);
2529
            } else { 
2530
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2531
            }
2532
            break;
2533
          case 2: // AMOUNT
2534
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
2535
              this.amount = iprot.readDouble();
2536
              setAmountIsSet(true);
2537
            } else { 
2538
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2539
            }
2540
            break;
2541
          case 3: // GATEWAY_ID
2542
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2543
              this.gatewayId = iprot.readI64();
2544
              setGatewayIdIsSet(true);
2545
            } else { 
2546
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2547
            }
2548
            break;
2549
          case 4: // TXN_ID
2550
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2551
              this.txnId = iprot.readI64();
2552
              setTxnIdIsSet(true);
2553
            } else { 
2554
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2555
            }
2556
            break;
6050 anupam.sin 2557
          case 5: // IS_DIGITAL
2558
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
2559
              this.isDigital = iprot.readBool();
2560
              setIsDigitalIsSet(true);
2561
            } else { 
2562
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2563
            }
2564
            break;
3430 rajveer 2565
          default:
2566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2567
        }
3430 rajveer 2568
        iprot.readFieldEnd();
123 ashish 2569
      }
2570
      iprot.readStructEnd();
2571
      validate();
2572
    }
2573
 
3430 rajveer 2574
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2575
      validate();
2576
 
2577
      oprot.writeStructBegin(STRUCT_DESC);
2578
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 2579
      oprot.writeI64(this.userId);
123 ashish 2580
      oprot.writeFieldEnd();
2581
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
2582
      oprot.writeDouble(this.amount);
2583
      oprot.writeFieldEnd();
420 ashish 2584
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2585
      oprot.writeI64(this.gatewayId);
420 ashish 2586
      oprot.writeFieldEnd();
695 rajveer 2587
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
2588
      oprot.writeI64(this.txnId);
2589
      oprot.writeFieldEnd();
6050 anupam.sin 2590
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
2591
      oprot.writeBool(this.isDigital);
2592
      oprot.writeFieldEnd();
123 ashish 2593
      oprot.writeFieldStop();
2594
      oprot.writeStructEnd();
2595
    }
2596
 
2597
    @Override
2598
    public String toString() {
2599
      StringBuilder sb = new StringBuilder("createPayment_args(");
2600
      boolean first = true;
2601
 
695 rajveer 2602
      sb.append("userId:");
2603
      sb.append(this.userId);
123 ashish 2604
      first = false;
2605
      if (!first) sb.append(", ");
2606
      sb.append("amount:");
2607
      sb.append(this.amount);
2608
      first = false;
2609
      if (!first) sb.append(", ");
695 rajveer 2610
      sb.append("gatewayId:");
2611
      sb.append(this.gatewayId);
123 ashish 2612
      first = false;
695 rajveer 2613
      if (!first) sb.append(", ");
2614
      sb.append("txnId:");
2615
      sb.append(this.txnId);
2616
      first = false;
6050 anupam.sin 2617
      if (!first) sb.append(", ");
2618
      sb.append("isDigital:");
2619
      sb.append(this.isDigital);
2620
      first = false;
123 ashish 2621
      sb.append(")");
2622
      return sb.toString();
2623
    }
2624
 
3430 rajveer 2625
    public void validate() throws org.apache.thrift.TException {
123 ashish 2626
      // check for required fields
2627
    }
2628
 
3430 rajveer 2629
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2630
      try {
2631
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2632
      } catch (org.apache.thrift.TException te) {
2633
        throw new java.io.IOException(te);
2634
      }
2635
    }
2636
 
2637
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2638
      try {
2639
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2640
      } catch (org.apache.thrift.TException te) {
2641
        throw new java.io.IOException(te);
2642
      }
2643
    }
2644
 
123 ashish 2645
  }
2646
 
3430 rajveer 2647
  public static class createPayment_result implements org.apache.thrift.TBase<createPayment_result, createPayment_result._Fields>, java.io.Serializable, Cloneable   {
2648
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_result");
123 ashish 2649
 
3430 rajveer 2650
    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);
2651
    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 2652
 
3430 rajveer 2653
    private long success; // required
2654
    private PaymentException pe; // required
123 ashish 2655
 
2656
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2657
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 2658
      SUCCESS((short)0, "success"),
2659
      PE((short)1, "pe");
2660
 
2661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2662
 
2663
      static {
2664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2665
          byName.put(field.getFieldName(), field);
2666
        }
2667
      }
2668
 
2669
      /**
2670
       * Find the _Fields constant that matches fieldId, or null if its not found.
2671
       */
2672
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2673
        switch(fieldId) {
2674
          case 0: // SUCCESS
2675
            return SUCCESS;
2676
          case 1: // PE
2677
            return PE;
2678
          default:
2679
            return null;
2680
        }
123 ashish 2681
      }
2682
 
2683
      /**
2684
       * Find the _Fields constant that matches fieldId, throwing an exception
2685
       * if it is not found.
2686
       */
2687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2688
        _Fields fields = findByThriftId(fieldId);
2689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2690
        return fields;
2691
      }
2692
 
2693
      /**
2694
       * Find the _Fields constant that matches name, or null if its not found.
2695
       */
2696
      public static _Fields findByName(String name) {
2697
        return byName.get(name);
2698
      }
2699
 
2700
      private final short _thriftId;
2701
      private final String _fieldName;
2702
 
2703
      _Fields(short thriftId, String fieldName) {
2704
        _thriftId = thriftId;
2705
        _fieldName = fieldName;
2706
      }
2707
 
2708
      public short getThriftFieldId() {
2709
        return _thriftId;
2710
      }
2711
 
2712
      public String getFieldName() {
2713
        return _fieldName;
2714
      }
2715
    }
2716
 
2717
    // isset id assignments
420 ashish 2718
    private static final int __SUCCESS_ISSET_ID = 0;
2719
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 2720
 
3430 rajveer 2721
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2722
    static {
3430 rajveer 2723
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2724
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2725
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2726
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2727
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2728
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2729
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
123 ashish 2730
    }
2731
 
2732
    public createPayment_result() {
2733
    }
2734
 
2735
    public createPayment_result(
420 ashish 2736
      long success,
123 ashish 2737
      PaymentException pe)
2738
    {
2739
      this();
2740
      this.success = success;
420 ashish 2741
      setSuccessIsSet(true);
123 ashish 2742
      this.pe = pe;
2743
    }
2744
 
2745
    /**
2746
     * Performs a deep copy on <i>other</i>.
2747
     */
2748
    public createPayment_result(createPayment_result other) {
420 ashish 2749
      __isset_bit_vector.clear();
2750
      __isset_bit_vector.or(other.__isset_bit_vector);
2751
      this.success = other.success;
123 ashish 2752
      if (other.isSetPe()) {
2753
        this.pe = new PaymentException(other.pe);
2754
      }
2755
    }
2756
 
2757
    public createPayment_result deepCopy() {
2758
      return new createPayment_result(this);
2759
    }
2760
 
3430 rajveer 2761
    @Override
2762
    public void clear() {
2763
      setSuccessIsSet(false);
2764
      this.success = 0;
2765
      this.pe = null;
123 ashish 2766
    }
2767
 
420 ashish 2768
    public long getSuccess() {
123 ashish 2769
      return this.success;
2770
    }
2771
 
3430 rajveer 2772
    public void setSuccess(long success) {
123 ashish 2773
      this.success = success;
420 ashish 2774
      setSuccessIsSet(true);
123 ashish 2775
    }
2776
 
2777
    public void unsetSuccess() {
420 ashish 2778
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 2779
    }
2780
 
3430 rajveer 2781
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 2782
    public boolean isSetSuccess() {
420 ashish 2783
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 2784
    }
2785
 
2786
    public void setSuccessIsSet(boolean value) {
420 ashish 2787
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 2788
    }
2789
 
2790
    public PaymentException getPe() {
2791
      return this.pe;
2792
    }
2793
 
3430 rajveer 2794
    public void setPe(PaymentException pe) {
123 ashish 2795
      this.pe = pe;
2796
    }
2797
 
2798
    public void unsetPe() {
2799
      this.pe = null;
2800
    }
2801
 
3430 rajveer 2802
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 2803
    public boolean isSetPe() {
2804
      return this.pe != null;
2805
    }
2806
 
2807
    public void setPeIsSet(boolean value) {
2808
      if (!value) {
2809
        this.pe = null;
2810
      }
2811
    }
2812
 
2813
    public void setFieldValue(_Fields field, Object value) {
2814
      switch (field) {
2815
      case SUCCESS:
2816
        if (value == null) {
2817
          unsetSuccess();
2818
        } else {
420 ashish 2819
          setSuccess((Long)value);
123 ashish 2820
        }
2821
        break;
2822
 
2823
      case PE:
2824
        if (value == null) {
2825
          unsetPe();
2826
        } else {
2827
          setPe((PaymentException)value);
2828
        }
2829
        break;
2830
 
2831
      }
2832
    }
2833
 
2834
    public Object getFieldValue(_Fields field) {
2835
      switch (field) {
2836
      case SUCCESS:
3430 rajveer 2837
        return Long.valueOf(getSuccess());
123 ashish 2838
 
2839
      case PE:
2840
        return getPe();
2841
 
2842
      }
2843
      throw new IllegalStateException();
2844
    }
2845
 
3430 rajveer 2846
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2847
    public boolean isSet(_Fields field) {
2848
      if (field == null) {
2849
        throw new IllegalArgumentException();
2850
      }
123 ashish 2851
 
2852
      switch (field) {
2853
      case SUCCESS:
2854
        return isSetSuccess();
2855
      case PE:
2856
        return isSetPe();
2857
      }
2858
      throw new IllegalStateException();
2859
    }
2860
 
2861
    @Override
2862
    public boolean equals(Object that) {
2863
      if (that == null)
2864
        return false;
2865
      if (that instanceof createPayment_result)
2866
        return this.equals((createPayment_result)that);
2867
      return false;
2868
    }
2869
 
2870
    public boolean equals(createPayment_result that) {
2871
      if (that == null)
2872
        return false;
2873
 
420 ashish 2874
      boolean this_present_success = true;
2875
      boolean that_present_success = true;
123 ashish 2876
      if (this_present_success || that_present_success) {
2877
        if (!(this_present_success && that_present_success))
2878
          return false;
420 ashish 2879
        if (this.success != that.success)
123 ashish 2880
          return false;
2881
      }
2882
 
2883
      boolean this_present_pe = true && this.isSetPe();
2884
      boolean that_present_pe = true && that.isSetPe();
2885
      if (this_present_pe || that_present_pe) {
2886
        if (!(this_present_pe && that_present_pe))
2887
          return false;
2888
        if (!this.pe.equals(that.pe))
2889
          return false;
2890
      }
2891
 
2892
      return true;
2893
    }
2894
 
2895
    @Override
2896
    public int hashCode() {
2897
      return 0;
2898
    }
2899
 
420 ashish 2900
    public int compareTo(createPayment_result other) {
2901
      if (!getClass().equals(other.getClass())) {
2902
        return getClass().getName().compareTo(other.getClass().getName());
2903
      }
2904
 
2905
      int lastComparison = 0;
2906
      createPayment_result typedOther = (createPayment_result)other;
2907
 
3430 rajveer 2908
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 2909
      if (lastComparison != 0) {
2910
        return lastComparison;
2911
      }
3430 rajveer 2912
      if (isSetSuccess()) {
2913
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2914
        if (lastComparison != 0) {
2915
          return lastComparison;
2916
        }
420 ashish 2917
      }
3430 rajveer 2918
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 2919
      if (lastComparison != 0) {
2920
        return lastComparison;
2921
      }
3430 rajveer 2922
      if (isSetPe()) {
2923
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
2924
        if (lastComparison != 0) {
2925
          return lastComparison;
2926
        }
420 ashish 2927
      }
2928
      return 0;
2929
    }
2930
 
3430 rajveer 2931
    public _Fields fieldForId(int fieldId) {
2932
      return _Fields.findByThriftId(fieldId);
2933
    }
2934
 
2935
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2936
      org.apache.thrift.protocol.TField field;
123 ashish 2937
      iprot.readStructBegin();
2938
      while (true)
2939
      {
2940
        field = iprot.readFieldBegin();
3430 rajveer 2941
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2942
          break;
2943
        }
3430 rajveer 2944
        switch (field.id) {
2945
          case 0: // SUCCESS
2946
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2947
              this.success = iprot.readI64();
2948
              setSuccessIsSet(true);
2949
            } else { 
2950
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2951
            }
2952
            break;
2953
          case 1: // PE
2954
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2955
              this.pe = new PaymentException();
2956
              this.pe.read(iprot);
2957
            } else { 
2958
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2959
            }
2960
            break;
2961
          default:
2962
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2963
        }
3430 rajveer 2964
        iprot.readFieldEnd();
123 ashish 2965
      }
2966
      iprot.readStructEnd();
2967
      validate();
2968
    }
2969
 
3430 rajveer 2970
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2971
      oprot.writeStructBegin(STRUCT_DESC);
2972
 
2973
      if (this.isSetSuccess()) {
2974
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 2975
        oprot.writeI64(this.success);
123 ashish 2976
        oprot.writeFieldEnd();
2977
      } else if (this.isSetPe()) {
2978
        oprot.writeFieldBegin(PE_FIELD_DESC);
2979
        this.pe.write(oprot);
2980
        oprot.writeFieldEnd();
2981
      }
2982
      oprot.writeFieldStop();
2983
      oprot.writeStructEnd();
2984
    }
2985
 
2986
    @Override
2987
    public String toString() {
2988
      StringBuilder sb = new StringBuilder("createPayment_result(");
2989
      boolean first = true;
2990
 
2991
      sb.append("success:");
420 ashish 2992
      sb.append(this.success);
123 ashish 2993
      first = false;
2994
      if (!first) sb.append(", ");
2995
      sb.append("pe:");
2996
      if (this.pe == null) {
2997
        sb.append("null");
2998
      } else {
2999
        sb.append(this.pe);
3000
      }
3001
      first = false;
3002
      sb.append(")");
3003
      return sb.toString();
3004
    }
3005
 
3430 rajveer 3006
    public void validate() throws org.apache.thrift.TException {
123 ashish 3007
      // check for required fields
3008
    }
3009
 
3430 rajveer 3010
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3011
      try {
3012
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3013
      } catch (org.apache.thrift.TException te) {
3014
        throw new java.io.IOException(te);
3015
      }
3016
    }
3017
 
3018
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3019
      try {
3020
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3021
      } catch (org.apache.thrift.TException te) {
3022
        throw new java.io.IOException(te);
3023
      }
3024
    }
3025
 
123 ashish 3026
  }
3027
 
3430 rajveer 3028
  public static class getPaymentsForUser_args implements org.apache.thrift.TBase<getPaymentsForUser_args, getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable   {
3029
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_args");
123 ashish 3030
 
3430 rajveer 3031
    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);
3032
    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);
3033
    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);
3034
    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);
3035
    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 3036
 
3430 rajveer 3037
    private long userId; // required
3038
    private long fromTime; // required
3039
    private long toTime; // required
3040
    private PaymentStatus status; // required
3041
    private long gatewayId; // required
123 ashish 3042
 
3043
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3044
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3045
      USER_ID((short)1, "userId"),
695 rajveer 3046
      FROM_TIME((short)2, "fromTime"),
3047
      TO_TIME((short)3, "toTime"),
123 ashish 3048
      /**
3049
       * 
3050
       * @see PaymentStatus
3051
       */
3052
      STATUS((short)4, "status"),
695 rajveer 3053
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 3054
 
3055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3056
 
3057
      static {
3058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3059
          byName.put(field.getFieldName(), field);
3060
        }
3061
      }
3062
 
3063
      /**
3064
       * Find the _Fields constant that matches fieldId, or null if its not found.
3065
       */
3066
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3067
        switch(fieldId) {
3068
          case 1: // USER_ID
3069
            return USER_ID;
3070
          case 2: // FROM_TIME
3071
            return FROM_TIME;
3072
          case 3: // TO_TIME
3073
            return TO_TIME;
3074
          case 4: // STATUS
3075
            return STATUS;
3076
          case 5: // GATEWAY_ID
3077
            return GATEWAY_ID;
3078
          default:
3079
            return null;
3080
        }
123 ashish 3081
      }
3082
 
3083
      /**
3084
       * Find the _Fields constant that matches fieldId, throwing an exception
3085
       * if it is not found.
3086
       */
3087
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3088
        _Fields fields = findByThriftId(fieldId);
3089
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3090
        return fields;
3091
      }
3092
 
3093
      /**
3094
       * Find the _Fields constant that matches name, or null if its not found.
3095
       */
3096
      public static _Fields findByName(String name) {
3097
        return byName.get(name);
3098
      }
3099
 
3100
      private final short _thriftId;
3101
      private final String _fieldName;
3102
 
3103
      _Fields(short thriftId, String fieldName) {
3104
        _thriftId = thriftId;
3105
        _fieldName = fieldName;
3106
      }
3107
 
3108
      public short getThriftFieldId() {
3109
        return _thriftId;
3110
      }
3111
 
3112
      public String getFieldName() {
3113
        return _fieldName;
3114
      }
3115
    }
3116
 
3117
    // isset id assignments
3118
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 3119
    private static final int __FROMTIME_ISSET_ID = 1;
3120
    private static final int __TOTIME_ISSET_ID = 2;
3121
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 3122
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 3123
 
3430 rajveer 3124
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3125
    static {
3430 rajveer 3126
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3127
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3128
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3129
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3130
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3131
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3132
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3133
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3134
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
3135
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3136
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3137
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3138
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
123 ashish 3139
    }
3140
 
3141
    public getPaymentsForUser_args() {
3142
    }
3143
 
3144
    public getPaymentsForUser_args(
3145
      long userId,
695 rajveer 3146
      long fromTime,
3147
      long toTime,
123 ashish 3148
      PaymentStatus status,
695 rajveer 3149
      long gatewayId)
123 ashish 3150
    {
3151
      this();
3152
      this.userId = userId;
3153
      setUserIdIsSet(true);
695 rajveer 3154
      this.fromTime = fromTime;
3155
      setFromTimeIsSet(true);
3156
      this.toTime = toTime;
3157
      setToTimeIsSet(true);
123 ashish 3158
      this.status = status;
695 rajveer 3159
      this.gatewayId = gatewayId;
3160
      setGatewayIdIsSet(true);
123 ashish 3161
    }
3162
 
3163
    /**
3164
     * Performs a deep copy on <i>other</i>.
3165
     */
3166
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
3167
      __isset_bit_vector.clear();
3168
      __isset_bit_vector.or(other.__isset_bit_vector);
3169
      this.userId = other.userId;
695 rajveer 3170
      this.fromTime = other.fromTime;
3171
      this.toTime = other.toTime;
123 ashish 3172
      if (other.isSetStatus()) {
3173
        this.status = other.status;
3174
      }
695 rajveer 3175
      this.gatewayId = other.gatewayId;
123 ashish 3176
    }
3177
 
3178
    public getPaymentsForUser_args deepCopy() {
3179
      return new getPaymentsForUser_args(this);
3180
    }
3181
 
3430 rajveer 3182
    @Override
3183
    public void clear() {
3184
      setUserIdIsSet(false);
3185
      this.userId = 0;
3186
      setFromTimeIsSet(false);
3187
      this.fromTime = 0;
3188
      setToTimeIsSet(false);
3189
      this.toTime = 0;
3190
      this.status = null;
3191
      setGatewayIdIsSet(false);
3192
      this.gatewayId = 0;
123 ashish 3193
    }
3194
 
3195
    public long getUserId() {
3196
      return this.userId;
3197
    }
3198
 
3430 rajveer 3199
    public void setUserId(long userId) {
123 ashish 3200
      this.userId = userId;
3201
      setUserIdIsSet(true);
3202
    }
3203
 
3204
    public void unsetUserId() {
3205
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3206
    }
3207
 
3430 rajveer 3208
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
123 ashish 3209
    public boolean isSetUserId() {
3210
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3211
    }
3212
 
3213
    public void setUserIdIsSet(boolean value) {
3214
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3215
    }
3216
 
695 rajveer 3217
    public long getFromTime() {
3218
      return this.fromTime;
123 ashish 3219
    }
3220
 
3430 rajveer 3221
    public void setFromTime(long fromTime) {
695 rajveer 3222
      this.fromTime = fromTime;
3223
      setFromTimeIsSet(true);
123 ashish 3224
    }
3225
 
695 rajveer 3226
    public void unsetFromTime() {
3227
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3228
    }
3229
 
3430 rajveer 3230
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 3231
    public boolean isSetFromTime() {
3232
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3233
    }
3234
 
695 rajveer 3235
    public void setFromTimeIsSet(boolean value) {
3236
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3237
    }
3238
 
695 rajveer 3239
    public long getToTime() {
3240
      return this.toTime;
123 ashish 3241
    }
3242
 
3430 rajveer 3243
    public void setToTime(long toTime) {
695 rajveer 3244
      this.toTime = toTime;
3245
      setToTimeIsSet(true);
123 ashish 3246
    }
3247
 
695 rajveer 3248
    public void unsetToTime() {
3249
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3250
    }
3251
 
3430 rajveer 3252
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 3253
    public boolean isSetToTime() {
3254
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3255
    }
3256
 
695 rajveer 3257
    public void setToTimeIsSet(boolean value) {
3258
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3259
    }
3260
 
3261
    /**
3262
     * 
3263
     * @see PaymentStatus
3264
     */
3265
    public PaymentStatus getStatus() {
3266
      return this.status;
3267
    }
3268
 
3269
    /**
3270
     * 
3271
     * @see PaymentStatus
3272
     */
3430 rajveer 3273
    public void setStatus(PaymentStatus status) {
123 ashish 3274
      this.status = status;
3275
    }
3276
 
3277
    public void unsetStatus() {
3278
      this.status = null;
3279
    }
3280
 
3430 rajveer 3281
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 3282
    public boolean isSetStatus() {
3283
      return this.status != null;
3284
    }
3285
 
3286
    public void setStatusIsSet(boolean value) {
3287
      if (!value) {
3288
        this.status = null;
3289
      }
3290
    }
3291
 
695 rajveer 3292
    public long getGatewayId() {
3293
      return this.gatewayId;
123 ashish 3294
    }
3295
 
3430 rajveer 3296
    public void setGatewayId(long gatewayId) {
695 rajveer 3297
      this.gatewayId = gatewayId;
3298
      setGatewayIdIsSet(true);
123 ashish 3299
    }
3300
 
695 rajveer 3301
    public void unsetGatewayId() {
3302
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3303
    }
3304
 
3430 rajveer 3305
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 3306
    public boolean isSetGatewayId() {
3307
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3308
    }
3309
 
695 rajveer 3310
    public void setGatewayIdIsSet(boolean value) {
3311
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3312
    }
3313
 
3314
    public void setFieldValue(_Fields field, Object value) {
3315
      switch (field) {
3316
      case USER_ID:
3317
        if (value == null) {
3318
          unsetUserId();
3319
        } else {
3320
          setUserId((Long)value);
3321
        }
3322
        break;
3323
 
3324
      case FROM_TIME:
3325
        if (value == null) {
695 rajveer 3326
          unsetFromTime();
123 ashish 3327
        } else {
695 rajveer 3328
          setFromTime((Long)value);
123 ashish 3329
        }
3330
        break;
3331
 
3332
      case TO_TIME:
3333
        if (value == null) {
695 rajveer 3334
          unsetToTime();
123 ashish 3335
        } else {
695 rajveer 3336
          setToTime((Long)value);
123 ashish 3337
        }
3338
        break;
3339
 
3340
      case STATUS:
3341
        if (value == null) {
3342
          unsetStatus();
3343
        } else {
3344
          setStatus((PaymentStatus)value);
3345
        }
3346
        break;
3347
 
420 ashish 3348
      case GATEWAY_ID:
123 ashish 3349
        if (value == null) {
695 rajveer 3350
          unsetGatewayId();
123 ashish 3351
        } else {
695 rajveer 3352
          setGatewayId((Long)value);
123 ashish 3353
        }
3354
        break;
3355
 
3356
      }
3357
    }
3358
 
3359
    public Object getFieldValue(_Fields field) {
3360
      switch (field) {
3361
      case USER_ID:
3430 rajveer 3362
        return Long.valueOf(getUserId());
123 ashish 3363
 
3364
      case FROM_TIME:
3430 rajveer 3365
        return Long.valueOf(getFromTime());
123 ashish 3366
 
3367
      case TO_TIME:
3430 rajveer 3368
        return Long.valueOf(getToTime());
123 ashish 3369
 
3370
      case STATUS:
3371
        return getStatus();
3372
 
420 ashish 3373
      case GATEWAY_ID:
3430 rajveer 3374
        return Long.valueOf(getGatewayId());
123 ashish 3375
 
3376
      }
3377
      throw new IllegalStateException();
3378
    }
3379
 
3430 rajveer 3380
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3381
    public boolean isSet(_Fields field) {
3382
      if (field == null) {
3383
        throw new IllegalArgumentException();
3384
      }
123 ashish 3385
 
3386
      switch (field) {
3387
      case USER_ID:
3388
        return isSetUserId();
3389
      case FROM_TIME:
695 rajveer 3390
        return isSetFromTime();
123 ashish 3391
      case TO_TIME:
695 rajveer 3392
        return isSetToTime();
123 ashish 3393
      case STATUS:
3394
        return isSetStatus();
420 ashish 3395
      case GATEWAY_ID:
695 rajveer 3396
        return isSetGatewayId();
123 ashish 3397
      }
3398
      throw new IllegalStateException();
3399
    }
3400
 
3401
    @Override
3402
    public boolean equals(Object that) {
3403
      if (that == null)
3404
        return false;
3405
      if (that instanceof getPaymentsForUser_args)
3406
        return this.equals((getPaymentsForUser_args)that);
3407
      return false;
3408
    }
3409
 
3410
    public boolean equals(getPaymentsForUser_args that) {
3411
      if (that == null)
3412
        return false;
3413
 
3414
      boolean this_present_userId = true;
3415
      boolean that_present_userId = true;
3416
      if (this_present_userId || that_present_userId) {
3417
        if (!(this_present_userId && that_present_userId))
3418
          return false;
3419
        if (this.userId != that.userId)
3420
          return false;
3421
      }
3422
 
695 rajveer 3423
      boolean this_present_fromTime = true;
3424
      boolean that_present_fromTime = true;
3425
      if (this_present_fromTime || that_present_fromTime) {
3426
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3427
          return false;
695 rajveer 3428
        if (this.fromTime != that.fromTime)
123 ashish 3429
          return false;
3430
      }
3431
 
695 rajveer 3432
      boolean this_present_toTime = true;
3433
      boolean that_present_toTime = true;
3434
      if (this_present_toTime || that_present_toTime) {
3435
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3436
          return false;
695 rajveer 3437
        if (this.toTime != that.toTime)
123 ashish 3438
          return false;
3439
      }
3440
 
3441
      boolean this_present_status = true && this.isSetStatus();
3442
      boolean that_present_status = true && that.isSetStatus();
3443
      if (this_present_status || that_present_status) {
3444
        if (!(this_present_status && that_present_status))
3445
          return false;
3446
        if (!this.status.equals(that.status))
3447
          return false;
3448
      }
3449
 
695 rajveer 3450
      boolean this_present_gatewayId = true;
3451
      boolean that_present_gatewayId = true;
3452
      if (this_present_gatewayId || that_present_gatewayId) {
3453
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3454
          return false;
695 rajveer 3455
        if (this.gatewayId != that.gatewayId)
123 ashish 3456
          return false;
3457
      }
3458
 
3459
      return true;
3460
    }
3461
 
3462
    @Override
3463
    public int hashCode() {
3464
      return 0;
3465
    }
3466
 
3467
    public int compareTo(getPaymentsForUser_args other) {
3468
      if (!getClass().equals(other.getClass())) {
3469
        return getClass().getName().compareTo(other.getClass().getName());
3470
      }
3471
 
3472
      int lastComparison = 0;
3473
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
3474
 
3430 rajveer 3475
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 3476
      if (lastComparison != 0) {
3477
        return lastComparison;
3478
      }
3430 rajveer 3479
      if (isSetUserId()) {
3480
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
3481
        if (lastComparison != 0) {
3482
          return lastComparison;
3483
        }
123 ashish 3484
      }
3430 rajveer 3485
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 3486
      if (lastComparison != 0) {
3487
        return lastComparison;
3488
      }
3430 rajveer 3489
      if (isSetFromTime()) {
3490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
3491
        if (lastComparison != 0) {
3492
          return lastComparison;
3493
        }
123 ashish 3494
      }
3430 rajveer 3495
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 3496
      if (lastComparison != 0) {
3497
        return lastComparison;
3498
      }
3430 rajveer 3499
      if (isSetToTime()) {
3500
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
3501
        if (lastComparison != 0) {
3502
          return lastComparison;
3503
        }
123 ashish 3504
      }
3430 rajveer 3505
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 3506
      if (lastComparison != 0) {
3507
        return lastComparison;
3508
      }
3430 rajveer 3509
      if (isSetStatus()) {
3510
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3511
        if (lastComparison != 0) {
3512
          return lastComparison;
3513
        }
123 ashish 3514
      }
3430 rajveer 3515
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 3516
      if (lastComparison != 0) {
3517
        return lastComparison;
3518
      }
3430 rajveer 3519
      if (isSetGatewayId()) {
3520
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
3521
        if (lastComparison != 0) {
3522
          return lastComparison;
3523
        }
123 ashish 3524
      }
3525
      return 0;
3526
    }
3527
 
3430 rajveer 3528
    public _Fields fieldForId(int fieldId) {
3529
      return _Fields.findByThriftId(fieldId);
3530
    }
3531
 
3532
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3533
      org.apache.thrift.protocol.TField field;
123 ashish 3534
      iprot.readStructBegin();
3535
      while (true)
3536
      {
3537
        field = iprot.readFieldBegin();
3430 rajveer 3538
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3539
          break;
3540
        }
3430 rajveer 3541
        switch (field.id) {
3542
          case 1: // USER_ID
3543
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3544
              this.userId = iprot.readI64();
3545
              setUserIdIsSet(true);
3546
            } else { 
3547
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3548
            }
3549
            break;
3550
          case 2: // FROM_TIME
3551
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3552
              this.fromTime = iprot.readI64();
3553
              setFromTimeIsSet(true);
3554
            } else { 
3555
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3556
            }
3557
            break;
3558
          case 3: // TO_TIME
3559
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3560
              this.toTime = iprot.readI64();
3561
              setToTimeIsSet(true);
3562
            } else { 
3563
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3564
            }
3565
            break;
3566
          case 4: // STATUS
3567
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3568
              this.status = PaymentStatus.findByValue(iprot.readI32());
3569
            } else { 
3570
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3571
            }
3572
            break;
3573
          case 5: // GATEWAY_ID
3574
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3575
              this.gatewayId = iprot.readI64();
3576
              setGatewayIdIsSet(true);
3577
            } else { 
3578
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3579
            }
3580
            break;
3581
          default:
3582
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3583
        }
3430 rajveer 3584
        iprot.readFieldEnd();
123 ashish 3585
      }
3586
      iprot.readStructEnd();
3587
      validate();
3588
    }
3589
 
3430 rajveer 3590
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3591
      validate();
3592
 
3593
      oprot.writeStructBegin(STRUCT_DESC);
3594
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3595
      oprot.writeI64(this.userId);
3596
      oprot.writeFieldEnd();
3597
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3598
      oprot.writeI64(this.fromTime);
123 ashish 3599
      oprot.writeFieldEnd();
3600
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3601
      oprot.writeI64(this.toTime);
123 ashish 3602
      oprot.writeFieldEnd();
3603
      if (this.status != null) {
3604
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3605
        oprot.writeI32(this.status.getValue());
3606
        oprot.writeFieldEnd();
3607
      }
420 ashish 3608
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3609
      oprot.writeI64(this.gatewayId);
420 ashish 3610
      oprot.writeFieldEnd();
123 ashish 3611
      oprot.writeFieldStop();
3612
      oprot.writeStructEnd();
3613
    }
3614
 
3615
    @Override
3616
    public String toString() {
3617
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
3618
      boolean first = true;
3619
 
3620
      sb.append("userId:");
3621
      sb.append(this.userId);
3622
      first = false;
3623
      if (!first) sb.append(", ");
695 rajveer 3624
      sb.append("fromTime:");
3625
      sb.append(this.fromTime);
123 ashish 3626
      first = false;
3627
      if (!first) sb.append(", ");
695 rajveer 3628
      sb.append("toTime:");
3629
      sb.append(this.toTime);
123 ashish 3630
      first = false;
3631
      if (!first) sb.append(", ");
3632
      sb.append("status:");
3633
      if (this.status == null) {
3634
        sb.append("null");
3635
      } else {
3636
        sb.append(this.status);
3637
      }
3638
      first = false;
3639
      if (!first) sb.append(", ");
695 rajveer 3640
      sb.append("gatewayId:");
3641
      sb.append(this.gatewayId);
123 ashish 3642
      first = false;
3643
      sb.append(")");
3644
      return sb.toString();
3645
    }
3646
 
3430 rajveer 3647
    public void validate() throws org.apache.thrift.TException {
123 ashish 3648
      // check for required fields
3649
    }
3650
 
3430 rajveer 3651
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3652
      try {
3653
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3654
      } catch (org.apache.thrift.TException te) {
3655
        throw new java.io.IOException(te);
3656
      }
3657
    }
3658
 
3659
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3660
      try {
3661
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3662
      } catch (org.apache.thrift.TException te) {
3663
        throw new java.io.IOException(te);
3664
      }
3665
    }
3666
 
123 ashish 3667
  }
3668
 
3430 rajveer 3669
  public static class getPaymentsForUser_result implements org.apache.thrift.TBase<getPaymentsForUser_result, getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable   {
3670
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_result");
123 ashish 3671
 
3430 rajveer 3672
    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);
3673
    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 3674
 
3430 rajveer 3675
    private List<Payment> success; // required
3676
    private PaymentException pe; // required
123 ashish 3677
 
3678
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3679
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3680
      SUCCESS((short)0, "success"),
3681
      PE((short)1, "pe");
3682
 
3683
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3684
 
3685
      static {
3686
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3687
          byName.put(field.getFieldName(), field);
3688
        }
3689
      }
3690
 
3691
      /**
3692
       * Find the _Fields constant that matches fieldId, or null if its not found.
3693
       */
3694
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3695
        switch(fieldId) {
3696
          case 0: // SUCCESS
3697
            return SUCCESS;
3698
          case 1: // PE
3699
            return PE;
3700
          default:
3701
            return null;
3702
        }
123 ashish 3703
      }
3704
 
3705
      /**
3706
       * Find the _Fields constant that matches fieldId, throwing an exception
3707
       * if it is not found.
3708
       */
3709
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3710
        _Fields fields = findByThriftId(fieldId);
3711
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3712
        return fields;
3713
      }
3714
 
3715
      /**
3716
       * Find the _Fields constant that matches name, or null if its not found.
3717
       */
3718
      public static _Fields findByName(String name) {
3719
        return byName.get(name);
3720
      }
3721
 
3722
      private final short _thriftId;
3723
      private final String _fieldName;
3724
 
3725
      _Fields(short thriftId, String fieldName) {
3726
        _thriftId = thriftId;
3727
        _fieldName = fieldName;
3728
      }
3729
 
3730
      public short getThriftFieldId() {
3731
        return _thriftId;
3732
      }
3733
 
3734
      public String getFieldName() {
3735
        return _fieldName;
3736
      }
3737
    }
3738
 
3739
    // isset id assignments
3740
 
3430 rajveer 3741
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3742
    static {
3430 rajveer 3743
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3744
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3745
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3746
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
3747
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3748
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3749
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3750
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
123 ashish 3751
    }
3752
 
3753
    public getPaymentsForUser_result() {
3754
    }
3755
 
3756
    public getPaymentsForUser_result(
3757
      List<Payment> success,
3758
      PaymentException pe)
3759
    {
3760
      this();
3761
      this.success = success;
3762
      this.pe = pe;
3763
    }
3764
 
3765
    /**
3766
     * Performs a deep copy on <i>other</i>.
3767
     */
3768
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
3769
      if (other.isSetSuccess()) {
3770
        List<Payment> __this__success = new ArrayList<Payment>();
3771
        for (Payment other_element : other.success) {
3772
          __this__success.add(new Payment(other_element));
3773
        }
3774
        this.success = __this__success;
3775
      }
3776
      if (other.isSetPe()) {
3777
        this.pe = new PaymentException(other.pe);
3778
      }
3779
    }
3780
 
3781
    public getPaymentsForUser_result deepCopy() {
3782
      return new getPaymentsForUser_result(this);
3783
    }
3784
 
3430 rajveer 3785
    @Override
3786
    public void clear() {
3787
      this.success = null;
3788
      this.pe = null;
123 ashish 3789
    }
3790
 
3791
    public int getSuccessSize() {
3792
      return (this.success == null) ? 0 : this.success.size();
3793
    }
3794
 
3795
    public java.util.Iterator<Payment> getSuccessIterator() {
3796
      return (this.success == null) ? null : this.success.iterator();
3797
    }
3798
 
3799
    public void addToSuccess(Payment elem) {
3800
      if (this.success == null) {
3801
        this.success = new ArrayList<Payment>();
3802
      }
3803
      this.success.add(elem);
3804
    }
3805
 
3806
    public List<Payment> getSuccess() {
3807
      return this.success;
3808
    }
3809
 
3430 rajveer 3810
    public void setSuccess(List<Payment> success) {
123 ashish 3811
      this.success = success;
3812
    }
3813
 
3814
    public void unsetSuccess() {
3815
      this.success = null;
3816
    }
3817
 
3430 rajveer 3818
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 3819
    public boolean isSetSuccess() {
3820
      return this.success != null;
3821
    }
3822
 
3823
    public void setSuccessIsSet(boolean value) {
3824
      if (!value) {
3825
        this.success = null;
3826
      }
3827
    }
3828
 
3829
    public PaymentException getPe() {
3830
      return this.pe;
3831
    }
3832
 
3430 rajveer 3833
    public void setPe(PaymentException pe) {
123 ashish 3834
      this.pe = pe;
3835
    }
3836
 
3837
    public void unsetPe() {
3838
      this.pe = null;
3839
    }
3840
 
3430 rajveer 3841
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 3842
    public boolean isSetPe() {
3843
      return this.pe != null;
3844
    }
3845
 
3846
    public void setPeIsSet(boolean value) {
3847
      if (!value) {
3848
        this.pe = null;
3849
      }
3850
    }
3851
 
3852
    public void setFieldValue(_Fields field, Object value) {
3853
      switch (field) {
3854
      case SUCCESS:
3855
        if (value == null) {
3856
          unsetSuccess();
3857
        } else {
3858
          setSuccess((List<Payment>)value);
3859
        }
3860
        break;
3861
 
3862
      case PE:
3863
        if (value == null) {
3864
          unsetPe();
3865
        } else {
3866
          setPe((PaymentException)value);
3867
        }
3868
        break;
3869
 
3870
      }
3871
    }
3872
 
3873
    public Object getFieldValue(_Fields field) {
3874
      switch (field) {
3875
      case SUCCESS:
3876
        return getSuccess();
3877
 
3878
      case PE:
3879
        return getPe();
3880
 
3881
      }
3882
      throw new IllegalStateException();
3883
    }
3884
 
3430 rajveer 3885
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3886
    public boolean isSet(_Fields field) {
3887
      if (field == null) {
3888
        throw new IllegalArgumentException();
3889
      }
123 ashish 3890
 
3891
      switch (field) {
3892
      case SUCCESS:
3893
        return isSetSuccess();
3894
      case PE:
3895
        return isSetPe();
3896
      }
3897
      throw new IllegalStateException();
3898
    }
3899
 
3900
    @Override
3901
    public boolean equals(Object that) {
3902
      if (that == null)
3903
        return false;
3904
      if (that instanceof getPaymentsForUser_result)
3905
        return this.equals((getPaymentsForUser_result)that);
3906
      return false;
3907
    }
3908
 
3909
    public boolean equals(getPaymentsForUser_result that) {
3910
      if (that == null)
3911
        return false;
3912
 
3913
      boolean this_present_success = true && this.isSetSuccess();
3914
      boolean that_present_success = true && that.isSetSuccess();
3915
      if (this_present_success || that_present_success) {
3916
        if (!(this_present_success && that_present_success))
3917
          return false;
3918
        if (!this.success.equals(that.success))
3919
          return false;
3920
      }
3921
 
3922
      boolean this_present_pe = true && this.isSetPe();
3923
      boolean that_present_pe = true && that.isSetPe();
3924
      if (this_present_pe || that_present_pe) {
3925
        if (!(this_present_pe && that_present_pe))
3926
          return false;
3927
        if (!this.pe.equals(that.pe))
3928
          return false;
3929
      }
3930
 
3931
      return true;
3932
    }
3933
 
3934
    @Override
3935
    public int hashCode() {
3936
      return 0;
3937
    }
3938
 
695 rajveer 3939
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 3940
      if (!getClass().equals(other.getClass())) {
3941
        return getClass().getName().compareTo(other.getClass().getName());
3942
      }
3943
 
3944
      int lastComparison = 0;
695 rajveer 3945
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 3946
 
3430 rajveer 3947
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 3948
      if (lastComparison != 0) {
3949
        return lastComparison;
3950
      }
3430 rajveer 3951
      if (isSetSuccess()) {
3952
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3953
        if (lastComparison != 0) {
3954
          return lastComparison;
3955
        }
123 ashish 3956
      }
3430 rajveer 3957
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
123 ashish 3958
      if (lastComparison != 0) {
3959
        return lastComparison;
3960
      }
3430 rajveer 3961
      if (isSetPe()) {
3962
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
3963
        if (lastComparison != 0) {
3964
          return lastComparison;
3965
        }
123 ashish 3966
      }
3967
      return 0;
3968
    }
3969
 
3430 rajveer 3970
    public _Fields fieldForId(int fieldId) {
3971
      return _Fields.findByThriftId(fieldId);
3972
    }
3973
 
3974
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3975
      org.apache.thrift.protocol.TField field;
123 ashish 3976
      iprot.readStructBegin();
3977
      while (true)
3978
      {
3979
        field = iprot.readFieldBegin();
3430 rajveer 3980
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3981
          break;
3982
        }
3430 rajveer 3983
        switch (field.id) {
3984
          case 0: // SUCCESS
3985
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3986
              {
3987
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
3988
                this.success = new ArrayList<Payment>(_list12.size);
3989
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
123 ashish 3990
                {
3430 rajveer 3991
                  Payment _elem14; // required
3992
                  _elem14 = new Payment();
3993
                  _elem14.read(iprot);
3994
                  this.success.add(_elem14);
123 ashish 3995
                }
3430 rajveer 3996
                iprot.readListEnd();
123 ashish 3997
              }
3430 rajveer 3998
            } else { 
3999
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4000
            }
4001
            break;
4002
          case 1: // PE
4003
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4004
              this.pe = new PaymentException();
4005
              this.pe.read(iprot);
4006
            } else { 
4007
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4008
            }
4009
            break;
4010
          default:
4011
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4012
        }
3430 rajveer 4013
        iprot.readFieldEnd();
123 ashish 4014
      }
4015
      iprot.readStructEnd();
4016
      validate();
4017
    }
4018
 
3430 rajveer 4019
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4020
      oprot.writeStructBegin(STRUCT_DESC);
4021
 
4022
      if (this.isSetSuccess()) {
4023
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4024
        {
3430 rajveer 4025
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 4026
          for (Payment _iter15 : this.success)
123 ashish 4027
          {
2747 chandransh 4028
            _iter15.write(oprot);
123 ashish 4029
          }
4030
          oprot.writeListEnd();
4031
        }
4032
        oprot.writeFieldEnd();
4033
      } else if (this.isSetPe()) {
4034
        oprot.writeFieldBegin(PE_FIELD_DESC);
4035
        this.pe.write(oprot);
4036
        oprot.writeFieldEnd();
4037
      }
4038
      oprot.writeFieldStop();
4039
      oprot.writeStructEnd();
4040
    }
4041
 
4042
    @Override
4043
    public String toString() {
695 rajveer 4044
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 4045
      boolean first = true;
4046
 
4047
      sb.append("success:");
4048
      if (this.success == null) {
4049
        sb.append("null");
4050
      } else {
4051
        sb.append(this.success);
4052
      }
4053
      first = false;
4054
      if (!first) sb.append(", ");
4055
      sb.append("pe:");
4056
      if (this.pe == null) {
4057
        sb.append("null");
4058
      } else {
4059
        sb.append(this.pe);
4060
      }
4061
      first = false;
4062
      sb.append(")");
4063
      return sb.toString();
4064
    }
4065
 
3430 rajveer 4066
    public void validate() throws org.apache.thrift.TException {
123 ashish 4067
      // check for required fields
4068
    }
4069
 
3430 rajveer 4070
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4071
      try {
4072
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4073
      } catch (org.apache.thrift.TException te) {
4074
        throw new java.io.IOException(te);
4075
      }
4076
    }
4077
 
4078
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4079
      try {
4080
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4081
      } catch (org.apache.thrift.TException te) {
4082
        throw new java.io.IOException(te);
4083
      }
4084
    }
4085
 
123 ashish 4086
  }
4087
 
3430 rajveer 4088
  public static class getPayments_args implements org.apache.thrift.TBase<getPayments_args, getPayments_args._Fields>, java.io.Serializable, Cloneable   {
4089
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_args");
123 ashish 4090
 
3430 rajveer 4091
    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);
4092
    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);
4093
    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);
4094
    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 4095
 
3430 rajveer 4096
    private long fromTime; // required
4097
    private long toTime; // required
4098
    private PaymentStatus status; // required
4099
    private long gatewayId; // required
123 ashish 4100
 
4101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4102
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 4103
      FROM_TIME((short)1, "fromTime"),
4104
      TO_TIME((short)2, "toTime"),
123 ashish 4105
      /**
4106
       * 
4107
       * @see PaymentStatus
4108
       */
4109
      STATUS((short)3, "status"),
695 rajveer 4110
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 4111
 
4112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4113
 
4114
      static {
4115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4116
          byName.put(field.getFieldName(), field);
4117
        }
4118
      }
4119
 
4120
      /**
4121
       * Find the _Fields constant that matches fieldId, or null if its not found.
4122
       */
4123
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4124
        switch(fieldId) {
4125
          case 1: // FROM_TIME
4126
            return FROM_TIME;
4127
          case 2: // TO_TIME
4128
            return TO_TIME;
4129
          case 3: // STATUS
4130
            return STATUS;
4131
          case 4: // GATEWAY_ID
4132
            return GATEWAY_ID;
4133
          default:
4134
            return null;
4135
        }
123 ashish 4136
      }
4137
 
4138
      /**
4139
       * Find the _Fields constant that matches fieldId, throwing an exception
4140
       * if it is not found.
4141
       */
4142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4143
        _Fields fields = findByThriftId(fieldId);
4144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4145
        return fields;
4146
      }
4147
 
4148
      /**
4149
       * Find the _Fields constant that matches name, or null if its not found.
4150
       */
4151
      public static _Fields findByName(String name) {
4152
        return byName.get(name);
4153
      }
4154
 
4155
      private final short _thriftId;
4156
      private final String _fieldName;
4157
 
4158
      _Fields(short thriftId, String fieldName) {
4159
        _thriftId = thriftId;
4160
        _fieldName = fieldName;
4161
      }
4162
 
4163
      public short getThriftFieldId() {
4164
        return _thriftId;
4165
      }
4166
 
4167
      public String getFieldName() {
4168
        return _fieldName;
4169
      }
4170
    }
4171
 
4172
    // isset id assignments
695 rajveer 4173
    private static final int __FROMTIME_ISSET_ID = 0;
4174
    private static final int __TOTIME_ISSET_ID = 1;
4175
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 4176
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 4177
 
3430 rajveer 4178
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4179
    static {
3430 rajveer 4180
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4181
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4182
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4183
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4184
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4185
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4186
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
4187
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4188
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4189
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4190
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
123 ashish 4191
    }
4192
 
4193
    public getPayments_args() {
4194
    }
4195
 
4196
    public getPayments_args(
695 rajveer 4197
      long fromTime,
4198
      long toTime,
123 ashish 4199
      PaymentStatus status,
695 rajveer 4200
      long gatewayId)
123 ashish 4201
    {
4202
      this();
695 rajveer 4203
      this.fromTime = fromTime;
4204
      setFromTimeIsSet(true);
4205
      this.toTime = toTime;
4206
      setToTimeIsSet(true);
123 ashish 4207
      this.status = status;
695 rajveer 4208
      this.gatewayId = gatewayId;
4209
      setGatewayIdIsSet(true);
123 ashish 4210
    }
4211
 
4212
    /**
4213
     * Performs a deep copy on <i>other</i>.
4214
     */
4215
    public getPayments_args(getPayments_args other) {
4216
      __isset_bit_vector.clear();
4217
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 4218
      this.fromTime = other.fromTime;
4219
      this.toTime = other.toTime;
123 ashish 4220
      if (other.isSetStatus()) {
4221
        this.status = other.status;
4222
      }
695 rajveer 4223
      this.gatewayId = other.gatewayId;
123 ashish 4224
    }
4225
 
4226
    public getPayments_args deepCopy() {
4227
      return new getPayments_args(this);
4228
    }
4229
 
3430 rajveer 4230
    @Override
4231
    public void clear() {
4232
      setFromTimeIsSet(false);
4233
      this.fromTime = 0;
4234
      setToTimeIsSet(false);
4235
      this.toTime = 0;
4236
      this.status = null;
4237
      setGatewayIdIsSet(false);
4238
      this.gatewayId = 0;
123 ashish 4239
    }
4240
 
695 rajveer 4241
    public long getFromTime() {
4242
      return this.fromTime;
123 ashish 4243
    }
4244
 
3430 rajveer 4245
    public void setFromTime(long fromTime) {
695 rajveer 4246
      this.fromTime = fromTime;
4247
      setFromTimeIsSet(true);
123 ashish 4248
    }
4249
 
695 rajveer 4250
    public void unsetFromTime() {
4251
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 4252
    }
4253
 
3430 rajveer 4254
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 4255
    public boolean isSetFromTime() {
4256
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 4257
    }
4258
 
695 rajveer 4259
    public void setFromTimeIsSet(boolean value) {
4260
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 4261
    }
4262
 
695 rajveer 4263
    public long getToTime() {
4264
      return this.toTime;
123 ashish 4265
    }
4266
 
3430 rajveer 4267
    public void setToTime(long toTime) {
695 rajveer 4268
      this.toTime = toTime;
4269
      setToTimeIsSet(true);
123 ashish 4270
    }
4271
 
695 rajveer 4272
    public void unsetToTime() {
4273
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 4274
    }
4275
 
3430 rajveer 4276
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 4277
    public boolean isSetToTime() {
4278
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 4279
    }
4280
 
695 rajveer 4281
    public void setToTimeIsSet(boolean value) {
4282
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 4283
    }
4284
 
4285
    /**
4286
     * 
4287
     * @see PaymentStatus
4288
     */
4289
    public PaymentStatus getStatus() {
4290
      return this.status;
4291
    }
4292
 
4293
    /**
4294
     * 
4295
     * @see PaymentStatus
4296
     */
3430 rajveer 4297
    public void setStatus(PaymentStatus status) {
123 ashish 4298
      this.status = status;
4299
    }
4300
 
4301
    public void unsetStatus() {
4302
      this.status = null;
4303
    }
4304
 
3430 rajveer 4305
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 4306
    public boolean isSetStatus() {
4307
      return this.status != null;
4308
    }
4309
 
4310
    public void setStatusIsSet(boolean value) {
4311
      if (!value) {
4312
        this.status = null;
4313
      }
4314
    }
4315
 
695 rajveer 4316
    public long getGatewayId() {
4317
      return this.gatewayId;
123 ashish 4318
    }
4319
 
3430 rajveer 4320
    public void setGatewayId(long gatewayId) {
695 rajveer 4321
      this.gatewayId = gatewayId;
4322
      setGatewayIdIsSet(true);
123 ashish 4323
    }
4324
 
695 rajveer 4325
    public void unsetGatewayId() {
4326
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 4327
    }
4328
 
3430 rajveer 4329
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 4330
    public boolean isSetGatewayId() {
4331
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 4332
    }
4333
 
695 rajveer 4334
    public void setGatewayIdIsSet(boolean value) {
4335
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 4336
    }
4337
 
4338
    public void setFieldValue(_Fields field, Object value) {
4339
      switch (field) {
4340
      case FROM_TIME:
4341
        if (value == null) {
695 rajveer 4342
          unsetFromTime();
123 ashish 4343
        } else {
695 rajveer 4344
          setFromTime((Long)value);
123 ashish 4345
        }
4346
        break;
4347
 
4348
      case TO_TIME:
4349
        if (value == null) {
695 rajveer 4350
          unsetToTime();
123 ashish 4351
        } else {
695 rajveer 4352
          setToTime((Long)value);
123 ashish 4353
        }
4354
        break;
4355
 
4356
      case STATUS:
4357
        if (value == null) {
4358
          unsetStatus();
4359
        } else {
4360
          setStatus((PaymentStatus)value);
4361
        }
4362
        break;
4363
 
420 ashish 4364
      case GATEWAY_ID:
123 ashish 4365
        if (value == null) {
695 rajveer 4366
          unsetGatewayId();
123 ashish 4367
        } else {
695 rajveer 4368
          setGatewayId((Long)value);
123 ashish 4369
        }
4370
        break;
4371
 
4372
      }
4373
    }
4374
 
4375
    public Object getFieldValue(_Fields field) {
4376
      switch (field) {
4377
      case FROM_TIME:
3430 rajveer 4378
        return Long.valueOf(getFromTime());
123 ashish 4379
 
4380
      case TO_TIME:
3430 rajveer 4381
        return Long.valueOf(getToTime());
123 ashish 4382
 
4383
      case STATUS:
4384
        return getStatus();
4385
 
420 ashish 4386
      case GATEWAY_ID:
3430 rajveer 4387
        return Long.valueOf(getGatewayId());
123 ashish 4388
 
4389
      }
4390
      throw new IllegalStateException();
4391
    }
4392
 
3430 rajveer 4393
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4394
    public boolean isSet(_Fields field) {
4395
      if (field == null) {
4396
        throw new IllegalArgumentException();
4397
      }
123 ashish 4398
 
4399
      switch (field) {
4400
      case FROM_TIME:
695 rajveer 4401
        return isSetFromTime();
123 ashish 4402
      case TO_TIME:
695 rajveer 4403
        return isSetToTime();
123 ashish 4404
      case STATUS:
4405
        return isSetStatus();
420 ashish 4406
      case GATEWAY_ID:
695 rajveer 4407
        return isSetGatewayId();
123 ashish 4408
      }
4409
      throw new IllegalStateException();
4410
    }
4411
 
4412
    @Override
4413
    public boolean equals(Object that) {
4414
      if (that == null)
4415
        return false;
4416
      if (that instanceof getPayments_args)
4417
        return this.equals((getPayments_args)that);
4418
      return false;
4419
    }
4420
 
4421
    public boolean equals(getPayments_args that) {
4422
      if (that == null)
4423
        return false;
4424
 
695 rajveer 4425
      boolean this_present_fromTime = true;
4426
      boolean that_present_fromTime = true;
4427
      if (this_present_fromTime || that_present_fromTime) {
4428
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 4429
          return false;
695 rajveer 4430
        if (this.fromTime != that.fromTime)
123 ashish 4431
          return false;
4432
      }
4433
 
695 rajveer 4434
      boolean this_present_toTime = true;
4435
      boolean that_present_toTime = true;
4436
      if (this_present_toTime || that_present_toTime) {
4437
        if (!(this_present_toTime && that_present_toTime))
123 ashish 4438
          return false;
695 rajveer 4439
        if (this.toTime != that.toTime)
123 ashish 4440
          return false;
4441
      }
4442
 
4443
      boolean this_present_status = true && this.isSetStatus();
4444
      boolean that_present_status = true && that.isSetStatus();
4445
      if (this_present_status || that_present_status) {
4446
        if (!(this_present_status && that_present_status))
4447
          return false;
4448
        if (!this.status.equals(that.status))
4449
          return false;
4450
      }
4451
 
695 rajveer 4452
      boolean this_present_gatewayId = true;
4453
      boolean that_present_gatewayId = true;
4454
      if (this_present_gatewayId || that_present_gatewayId) {
4455
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 4456
          return false;
695 rajveer 4457
        if (this.gatewayId != that.gatewayId)
123 ashish 4458
          return false;
4459
      }
4460
 
4461
      return true;
4462
    }
4463
 
4464
    @Override
4465
    public int hashCode() {
4466
      return 0;
4467
    }
4468
 
4469
    public int compareTo(getPayments_args other) {
4470
      if (!getClass().equals(other.getClass())) {
4471
        return getClass().getName().compareTo(other.getClass().getName());
4472
      }
4473
 
4474
      int lastComparison = 0;
4475
      getPayments_args typedOther = (getPayments_args)other;
4476
 
3430 rajveer 4477
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 4478
      if (lastComparison != 0) {
4479
        return lastComparison;
4480
      }
3430 rajveer 4481
      if (isSetFromTime()) {
4482
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
4483
        if (lastComparison != 0) {
4484
          return lastComparison;
4485
        }
123 ashish 4486
      }
3430 rajveer 4487
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 4488
      if (lastComparison != 0) {
4489
        return lastComparison;
4490
      }
3430 rajveer 4491
      if (isSetToTime()) {
4492
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
4493
        if (lastComparison != 0) {
4494
          return lastComparison;
4495
        }
123 ashish 4496
      }
3430 rajveer 4497
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 4498
      if (lastComparison != 0) {
4499
        return lastComparison;
4500
      }
3430 rajveer 4501
      if (isSetStatus()) {
4502
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4503
        if (lastComparison != 0) {
4504
          return lastComparison;
4505
        }
123 ashish 4506
      }
3430 rajveer 4507
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 4508
      if (lastComparison != 0) {
4509
        return lastComparison;
4510
      }
3430 rajveer 4511
      if (isSetGatewayId()) {
4512
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
4513
        if (lastComparison != 0) {
4514
          return lastComparison;
4515
        }
123 ashish 4516
      }
4517
      return 0;
4518
    }
4519
 
3430 rajveer 4520
    public _Fields fieldForId(int fieldId) {
4521
      return _Fields.findByThriftId(fieldId);
4522
    }
4523
 
4524
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4525
      org.apache.thrift.protocol.TField field;
123 ashish 4526
      iprot.readStructBegin();
4527
      while (true)
4528
      {
4529
        field = iprot.readFieldBegin();
3430 rajveer 4530
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4531
          break;
4532
        }
3430 rajveer 4533
        switch (field.id) {
4534
          case 1: // FROM_TIME
4535
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4536
              this.fromTime = iprot.readI64();
4537
              setFromTimeIsSet(true);
4538
            } else { 
4539
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4540
            }
4541
            break;
4542
          case 2: // TO_TIME
4543
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4544
              this.toTime = iprot.readI64();
4545
              setToTimeIsSet(true);
4546
            } else { 
4547
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4548
            }
4549
            break;
4550
          case 3: // STATUS
4551
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4552
              this.status = PaymentStatus.findByValue(iprot.readI32());
4553
            } else { 
4554
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4555
            }
4556
            break;
4557
          case 4: // GATEWAY_ID
4558
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4559
              this.gatewayId = iprot.readI64();
4560
              setGatewayIdIsSet(true);
4561
            } else { 
4562
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4563
            }
4564
            break;
4565
          default:
4566
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4567
        }
3430 rajveer 4568
        iprot.readFieldEnd();
123 ashish 4569
      }
4570
      iprot.readStructEnd();
4571
      validate();
4572
    }
4573
 
3430 rajveer 4574
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4575
      validate();
4576
 
4577
      oprot.writeStructBegin(STRUCT_DESC);
4578
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 4579
      oprot.writeI64(this.fromTime);
123 ashish 4580
      oprot.writeFieldEnd();
4581
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 4582
      oprot.writeI64(this.toTime);
123 ashish 4583
      oprot.writeFieldEnd();
4584
      if (this.status != null) {
4585
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4586
        oprot.writeI32(this.status.getValue());
4587
        oprot.writeFieldEnd();
4588
      }
420 ashish 4589
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 4590
      oprot.writeI64(this.gatewayId);
420 ashish 4591
      oprot.writeFieldEnd();
123 ashish 4592
      oprot.writeFieldStop();
4593
      oprot.writeStructEnd();
4594
    }
4595
 
4596
    @Override
4597
    public String toString() {
4598
      StringBuilder sb = new StringBuilder("getPayments_args(");
4599
      boolean first = true;
4600
 
695 rajveer 4601
      sb.append("fromTime:");
4602
      sb.append(this.fromTime);
123 ashish 4603
      first = false;
4604
      if (!first) sb.append(", ");
695 rajveer 4605
      sb.append("toTime:");
4606
      sb.append(this.toTime);
123 ashish 4607
      first = false;
4608
      if (!first) sb.append(", ");
4609
      sb.append("status:");
4610
      if (this.status == null) {
4611
        sb.append("null");
4612
      } else {
4613
        sb.append(this.status);
4614
      }
4615
      first = false;
4616
      if (!first) sb.append(", ");
695 rajveer 4617
      sb.append("gatewayId:");
4618
      sb.append(this.gatewayId);
123 ashish 4619
      first = false;
4620
      sb.append(")");
4621
      return sb.toString();
4622
    }
4623
 
3430 rajveer 4624
    public void validate() throws org.apache.thrift.TException {
123 ashish 4625
      // check for required fields
4626
    }
4627
 
3430 rajveer 4628
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4629
      try {
4630
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4631
      } catch (org.apache.thrift.TException te) {
4632
        throw new java.io.IOException(te);
4633
      }
4634
    }
4635
 
4636
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4637
      try {
4638
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4639
      } catch (org.apache.thrift.TException te) {
4640
        throw new java.io.IOException(te);
4641
      }
4642
    }
4643
 
123 ashish 4644
  }
4645
 
3430 rajveer 4646
  public static class getPayments_result implements org.apache.thrift.TBase<getPayments_result, getPayments_result._Fields>, java.io.Serializable, Cloneable   {
4647
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_result");
123 ashish 4648
 
3430 rajveer 4649
    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);
4650
    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 4651
 
3430 rajveer 4652
    private List<Payment> success; // required
4653
    private PaymentException pe; // required
123 ashish 4654
 
4655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4656
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 4657
      SUCCESS((short)0, "success"),
4658
      PE((short)1, "pe");
4659
 
4660
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4661
 
4662
      static {
4663
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4664
          byName.put(field.getFieldName(), field);
4665
        }
4666
      }
4667
 
4668
      /**
4669
       * Find the _Fields constant that matches fieldId, or null if its not found.
4670
       */
4671
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4672
        switch(fieldId) {
4673
          case 0: // SUCCESS
4674
            return SUCCESS;
4675
          case 1: // PE
4676
            return PE;
4677
          default:
4678
            return null;
4679
        }
123 ashish 4680
      }
4681
 
4682
      /**
4683
       * Find the _Fields constant that matches fieldId, throwing an exception
4684
       * if it is not found.
4685
       */
4686
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4687
        _Fields fields = findByThriftId(fieldId);
4688
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4689
        return fields;
4690
      }
4691
 
4692
      /**
4693
       * Find the _Fields constant that matches name, or null if its not found.
4694
       */
4695
      public static _Fields findByName(String name) {
4696
        return byName.get(name);
4697
      }
4698
 
4699
      private final short _thriftId;
4700
      private final String _fieldName;
4701
 
4702
      _Fields(short thriftId, String fieldName) {
4703
        _thriftId = thriftId;
4704
        _fieldName = fieldName;
4705
      }
4706
 
4707
      public short getThriftFieldId() {
4708
        return _thriftId;
4709
      }
4710
 
4711
      public String getFieldName() {
4712
        return _fieldName;
4713
      }
4714
    }
4715
 
4716
    // isset id assignments
4717
 
3430 rajveer 4718
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4719
    static {
3430 rajveer 4720
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4721
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4722
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4723
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
4724
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4725
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4726
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4727
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
123 ashish 4728
    }
4729
 
4730
    public getPayments_result() {
4731
    }
4732
 
4733
    public getPayments_result(
4734
      List<Payment> success,
4735
      PaymentException pe)
4736
    {
4737
      this();
4738
      this.success = success;
4739
      this.pe = pe;
4740
    }
4741
 
4742
    /**
4743
     * Performs a deep copy on <i>other</i>.
4744
     */
4745
    public getPayments_result(getPayments_result other) {
4746
      if (other.isSetSuccess()) {
4747
        List<Payment> __this__success = new ArrayList<Payment>();
4748
        for (Payment other_element : other.success) {
4749
          __this__success.add(new Payment(other_element));
4750
        }
4751
        this.success = __this__success;
4752
      }
4753
      if (other.isSetPe()) {
4754
        this.pe = new PaymentException(other.pe);
4755
      }
4756
    }
4757
 
4758
    public getPayments_result deepCopy() {
4759
      return new getPayments_result(this);
4760
    }
4761
 
3430 rajveer 4762
    @Override
4763
    public void clear() {
4764
      this.success = null;
4765
      this.pe = null;
123 ashish 4766
    }
4767
 
4768
    public int getSuccessSize() {
4769
      return (this.success == null) ? 0 : this.success.size();
4770
    }
4771
 
4772
    public java.util.Iterator<Payment> getSuccessIterator() {
4773
      return (this.success == null) ? null : this.success.iterator();
4774
    }
4775
 
4776
    public void addToSuccess(Payment elem) {
4777
      if (this.success == null) {
4778
        this.success = new ArrayList<Payment>();
4779
      }
4780
      this.success.add(elem);
4781
    }
4782
 
4783
    public List<Payment> getSuccess() {
4784
      return this.success;
4785
    }
4786
 
3430 rajveer 4787
    public void setSuccess(List<Payment> success) {
123 ashish 4788
      this.success = success;
4789
    }
4790
 
4791
    public void unsetSuccess() {
4792
      this.success = null;
4793
    }
4794
 
3430 rajveer 4795
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4796
    public boolean isSetSuccess() {
4797
      return this.success != null;
4798
    }
4799
 
4800
    public void setSuccessIsSet(boolean value) {
4801
      if (!value) {
4802
        this.success = null;
4803
      }
4804
    }
4805
 
4806
    public PaymentException getPe() {
4807
      return this.pe;
4808
    }
4809
 
3430 rajveer 4810
    public void setPe(PaymentException pe) {
123 ashish 4811
      this.pe = pe;
4812
    }
4813
 
4814
    public void unsetPe() {
4815
      this.pe = null;
4816
    }
4817
 
3430 rajveer 4818
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 4819
    public boolean isSetPe() {
4820
      return this.pe != null;
4821
    }
4822
 
4823
    public void setPeIsSet(boolean value) {
4824
      if (!value) {
4825
        this.pe = null;
4826
      }
4827
    }
4828
 
4829
    public void setFieldValue(_Fields field, Object value) {
4830
      switch (field) {
4831
      case SUCCESS:
4832
        if (value == null) {
4833
          unsetSuccess();
4834
        } else {
4835
          setSuccess((List<Payment>)value);
4836
        }
4837
        break;
4838
 
4839
      case PE:
4840
        if (value == null) {
4841
          unsetPe();
4842
        } else {
4843
          setPe((PaymentException)value);
4844
        }
4845
        break;
4846
 
4847
      }
4848
    }
4849
 
4850
    public Object getFieldValue(_Fields field) {
4851
      switch (field) {
4852
      case SUCCESS:
4853
        return getSuccess();
4854
 
4855
      case PE:
4856
        return getPe();
4857
 
4858
      }
4859
      throw new IllegalStateException();
4860
    }
4861
 
3430 rajveer 4862
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4863
    public boolean isSet(_Fields field) {
4864
      if (field == null) {
4865
        throw new IllegalArgumentException();
4866
      }
123 ashish 4867
 
4868
      switch (field) {
4869
      case SUCCESS:
4870
        return isSetSuccess();
4871
      case PE:
4872
        return isSetPe();
4873
      }
4874
      throw new IllegalStateException();
4875
    }
4876
 
4877
    @Override
4878
    public boolean equals(Object that) {
4879
      if (that == null)
4880
        return false;
4881
      if (that instanceof getPayments_result)
4882
        return this.equals((getPayments_result)that);
4883
      return false;
4884
    }
4885
 
4886
    public boolean equals(getPayments_result that) {
4887
      if (that == null)
4888
        return false;
4889
 
4890
      boolean this_present_success = true && this.isSetSuccess();
4891
      boolean that_present_success = true && that.isSetSuccess();
4892
      if (this_present_success || that_present_success) {
4893
        if (!(this_present_success && that_present_success))
4894
          return false;
4895
        if (!this.success.equals(that.success))
4896
          return false;
4897
      }
4898
 
4899
      boolean this_present_pe = true && this.isSetPe();
4900
      boolean that_present_pe = true && that.isSetPe();
4901
      if (this_present_pe || that_present_pe) {
4902
        if (!(this_present_pe && that_present_pe))
4903
          return false;
4904
        if (!this.pe.equals(that.pe))
4905
          return false;
4906
      }
4907
 
4908
      return true;
4909
    }
4910
 
4911
    @Override
4912
    public int hashCode() {
4913
      return 0;
4914
    }
4915
 
695 rajveer 4916
    public int compareTo(getPayments_result other) {
123 ashish 4917
      if (!getClass().equals(other.getClass())) {
4918
        return getClass().getName().compareTo(other.getClass().getName());
4919
      }
4920
 
4921
      int lastComparison = 0;
695 rajveer 4922
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 4923
 
3430 rajveer 4924
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 4925
      if (lastComparison != 0) {
4926
        return lastComparison;
4927
      }
3430 rajveer 4928
      if (isSetSuccess()) {
4929
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4930
        if (lastComparison != 0) {
4931
          return lastComparison;
4932
        }
123 ashish 4933
      }
3430 rajveer 4934
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 4935
      if (lastComparison != 0) {
4936
        return lastComparison;
123 ashish 4937
      }
3430 rajveer 4938
      if (isSetPe()) {
4939
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
4940
        if (lastComparison != 0) {
4941
          return lastComparison;
4942
        }
123 ashish 4943
      }
4944
      return 0;
4945
    }
4946
 
3430 rajveer 4947
    public _Fields fieldForId(int fieldId) {
4948
      return _Fields.findByThriftId(fieldId);
4949
    }
4950
 
4951
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4952
      org.apache.thrift.protocol.TField field;
123 ashish 4953
      iprot.readStructBegin();
4954
      while (true)
4955
      {
4956
        field = iprot.readFieldBegin();
3430 rajveer 4957
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4958
          break;
4959
        }
3430 rajveer 4960
        switch (field.id) {
4961
          case 0: // SUCCESS
4962
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4963
              {
4964
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
4965
                this.success = new ArrayList<Payment>(_list16.size);
4966
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
420 ashish 4967
                {
3430 rajveer 4968
                  Payment _elem18; // required
4969
                  _elem18 = new Payment();
4970
                  _elem18.read(iprot);
4971
                  this.success.add(_elem18);
420 ashish 4972
                }
3430 rajveer 4973
                iprot.readListEnd();
123 ashish 4974
              }
3430 rajveer 4975
            } else { 
4976
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4977
            }
4978
            break;
4979
          case 1: // PE
4980
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4981
              this.pe = new PaymentException();
4982
              this.pe.read(iprot);
4983
            } else { 
4984
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4985
            }
4986
            break;
4987
          default:
4988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4989
        }
3430 rajveer 4990
        iprot.readFieldEnd();
123 ashish 4991
      }
4992
      iprot.readStructEnd();
4993
      validate();
4994
    }
4995
 
3430 rajveer 4996
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4997
      oprot.writeStructBegin(STRUCT_DESC);
4998
 
4999
      if (this.isSetSuccess()) {
5000
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 5001
        {
3430 rajveer 5002
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 5003
          for (Payment _iter19 : this.success)
420 ashish 5004
          {
2747 chandransh 5005
            _iter19.write(oprot);
420 ashish 5006
          }
5007
          oprot.writeListEnd();
5008
        }
123 ashish 5009
        oprot.writeFieldEnd();
5010
      } else if (this.isSetPe()) {
5011
        oprot.writeFieldBegin(PE_FIELD_DESC);
5012
        this.pe.write(oprot);
5013
        oprot.writeFieldEnd();
5014
      }
5015
      oprot.writeFieldStop();
5016
      oprot.writeStructEnd();
5017
    }
5018
 
5019
    @Override
5020
    public String toString() {
695 rajveer 5021
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 5022
      boolean first = true;
5023
 
5024
      sb.append("success:");
5025
      if (this.success == null) {
5026
        sb.append("null");
5027
      } else {
5028
        sb.append(this.success);
5029
      }
5030
      first = false;
5031
      if (!first) sb.append(", ");
5032
      sb.append("pe:");
5033
      if (this.pe == null) {
5034
        sb.append("null");
5035
      } else {
5036
        sb.append(this.pe);
5037
      }
5038
      first = false;
5039
      sb.append(")");
5040
      return sb.toString();
5041
    }
5042
 
3430 rajveer 5043
    public void validate() throws org.apache.thrift.TException {
123 ashish 5044
      // check for required fields
5045
    }
5046
 
3430 rajveer 5047
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5048
      try {
5049
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5050
      } catch (org.apache.thrift.TException te) {
5051
        throw new java.io.IOException(te);
5052
      }
5053
    }
5054
 
5055
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5056
      try {
5057
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5058
      } catch (org.apache.thrift.TException te) {
5059
        throw new java.io.IOException(te);
5060
      }
5061
    }
5062
 
123 ashish 5063
  }
5064
 
4141 chandransh 5065
  public static class getPaymentsByCapturedDate_args implements org.apache.thrift.TBase<getPaymentsByCapturedDate_args, getPaymentsByCapturedDate_args._Fields>, java.io.Serializable, Cloneable   {
5066
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_args");
5067
 
5068
    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);
5069
    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);
5070
    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);
5071
 
5072
    private long fromTime; // required
5073
    private long toTime; // required
5074
    private long gatewayId; // required
5075
 
5076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5077
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5078
      FROM_TIME((short)1, "fromTime"),
5079
      TO_TIME((short)2, "toTime"),
5080
      GATEWAY_ID((short)3, "gatewayId");
5081
 
5082
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5083
 
5084
      static {
5085
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5086
          byName.put(field.getFieldName(), field);
5087
        }
5088
      }
5089
 
5090
      /**
5091
       * Find the _Fields constant that matches fieldId, or null if its not found.
5092
       */
5093
      public static _Fields findByThriftId(int fieldId) {
5094
        switch(fieldId) {
5095
          case 1: // FROM_TIME
5096
            return FROM_TIME;
5097
          case 2: // TO_TIME
5098
            return TO_TIME;
5099
          case 3: // GATEWAY_ID
5100
            return GATEWAY_ID;
5101
          default:
5102
            return null;
5103
        }
5104
      }
5105
 
5106
      /**
5107
       * Find the _Fields constant that matches fieldId, throwing an exception
5108
       * if it is not found.
5109
       */
5110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5111
        _Fields fields = findByThriftId(fieldId);
5112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5113
        return fields;
5114
      }
5115
 
5116
      /**
5117
       * Find the _Fields constant that matches name, or null if its not found.
5118
       */
5119
      public static _Fields findByName(String name) {
5120
        return byName.get(name);
5121
      }
5122
 
5123
      private final short _thriftId;
5124
      private final String _fieldName;
5125
 
5126
      _Fields(short thriftId, String fieldName) {
5127
        _thriftId = thriftId;
5128
        _fieldName = fieldName;
5129
      }
5130
 
5131
      public short getThriftFieldId() {
5132
        return _thriftId;
5133
      }
5134
 
5135
      public String getFieldName() {
5136
        return _fieldName;
5137
      }
5138
    }
5139
 
5140
    // isset id assignments
5141
    private static final int __FROMTIME_ISSET_ID = 0;
5142
    private static final int __TOTIME_ISSET_ID = 1;
5143
    private static final int __GATEWAYID_ISSET_ID = 2;
5144
    private BitSet __isset_bit_vector = new BitSet(3);
5145
 
5146
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5147
    static {
5148
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5149
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5150
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5151
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5152
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5153
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5154
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5155
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5156
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_args.class, metaDataMap);
5157
    }
5158
 
5159
    public getPaymentsByCapturedDate_args() {
5160
    }
5161
 
5162
    public getPaymentsByCapturedDate_args(
5163
      long fromTime,
5164
      long toTime,
5165
      long gatewayId)
5166
    {
5167
      this();
5168
      this.fromTime = fromTime;
5169
      setFromTimeIsSet(true);
5170
      this.toTime = toTime;
5171
      setToTimeIsSet(true);
5172
      this.gatewayId = gatewayId;
5173
      setGatewayIdIsSet(true);
5174
    }
5175
 
5176
    /**
5177
     * Performs a deep copy on <i>other</i>.
5178
     */
5179
    public getPaymentsByCapturedDate_args(getPaymentsByCapturedDate_args other) {
5180
      __isset_bit_vector.clear();
5181
      __isset_bit_vector.or(other.__isset_bit_vector);
5182
      this.fromTime = other.fromTime;
5183
      this.toTime = other.toTime;
5184
      this.gatewayId = other.gatewayId;
5185
    }
5186
 
5187
    public getPaymentsByCapturedDate_args deepCopy() {
5188
      return new getPaymentsByCapturedDate_args(this);
5189
    }
5190
 
5191
    @Override
5192
    public void clear() {
5193
      setFromTimeIsSet(false);
5194
      this.fromTime = 0;
5195
      setToTimeIsSet(false);
5196
      this.toTime = 0;
5197
      setGatewayIdIsSet(false);
5198
      this.gatewayId = 0;
5199
    }
5200
 
5201
    public long getFromTime() {
5202
      return this.fromTime;
5203
    }
5204
 
5205
    public void setFromTime(long fromTime) {
5206
      this.fromTime = fromTime;
5207
      setFromTimeIsSet(true);
5208
    }
5209
 
5210
    public void unsetFromTime() {
5211
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
5212
    }
5213
 
5214
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
5215
    public boolean isSetFromTime() {
5216
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
5217
    }
5218
 
5219
    public void setFromTimeIsSet(boolean value) {
5220
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
5221
    }
5222
 
5223
    public long getToTime() {
5224
      return this.toTime;
5225
    }
5226
 
5227
    public void setToTime(long toTime) {
5228
      this.toTime = toTime;
5229
      setToTimeIsSet(true);
5230
    }
5231
 
5232
    public void unsetToTime() {
5233
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
5234
    }
5235
 
5236
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
5237
    public boolean isSetToTime() {
5238
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
5239
    }
5240
 
5241
    public void setToTimeIsSet(boolean value) {
5242
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
5243
    }
5244
 
5245
    public long getGatewayId() {
5246
      return this.gatewayId;
5247
    }
5248
 
5249
    public void setGatewayId(long gatewayId) {
5250
      this.gatewayId = gatewayId;
5251
      setGatewayIdIsSet(true);
5252
    }
5253
 
5254
    public void unsetGatewayId() {
5255
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
5256
    }
5257
 
5258
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
5259
    public boolean isSetGatewayId() {
5260
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
5261
    }
5262
 
5263
    public void setGatewayIdIsSet(boolean value) {
5264
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
5265
    }
5266
 
5267
    public void setFieldValue(_Fields field, Object value) {
5268
      switch (field) {
5269
      case FROM_TIME:
5270
        if (value == null) {
5271
          unsetFromTime();
5272
        } else {
5273
          setFromTime((Long)value);
5274
        }
5275
        break;
5276
 
5277
      case TO_TIME:
5278
        if (value == null) {
5279
          unsetToTime();
5280
        } else {
5281
          setToTime((Long)value);
5282
        }
5283
        break;
5284
 
5285
      case GATEWAY_ID:
5286
        if (value == null) {
5287
          unsetGatewayId();
5288
        } else {
5289
          setGatewayId((Long)value);
5290
        }
5291
        break;
5292
 
5293
      }
5294
    }
5295
 
5296
    public Object getFieldValue(_Fields field) {
5297
      switch (field) {
5298
      case FROM_TIME:
5299
        return Long.valueOf(getFromTime());
5300
 
5301
      case TO_TIME:
5302
        return Long.valueOf(getToTime());
5303
 
5304
      case GATEWAY_ID:
5305
        return Long.valueOf(getGatewayId());
5306
 
5307
      }
5308
      throw new IllegalStateException();
5309
    }
5310
 
5311
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5312
    public boolean isSet(_Fields field) {
5313
      if (field == null) {
5314
        throw new IllegalArgumentException();
5315
      }
5316
 
5317
      switch (field) {
5318
      case FROM_TIME:
5319
        return isSetFromTime();
5320
      case TO_TIME:
5321
        return isSetToTime();
5322
      case GATEWAY_ID:
5323
        return isSetGatewayId();
5324
      }
5325
      throw new IllegalStateException();
5326
    }
5327
 
5328
    @Override
5329
    public boolean equals(Object that) {
5330
      if (that == null)
5331
        return false;
5332
      if (that instanceof getPaymentsByCapturedDate_args)
5333
        return this.equals((getPaymentsByCapturedDate_args)that);
5334
      return false;
5335
    }
5336
 
5337
    public boolean equals(getPaymentsByCapturedDate_args that) {
5338
      if (that == null)
5339
        return false;
5340
 
5341
      boolean this_present_fromTime = true;
5342
      boolean that_present_fromTime = true;
5343
      if (this_present_fromTime || that_present_fromTime) {
5344
        if (!(this_present_fromTime && that_present_fromTime))
5345
          return false;
5346
        if (this.fromTime != that.fromTime)
5347
          return false;
5348
      }
5349
 
5350
      boolean this_present_toTime = true;
5351
      boolean that_present_toTime = true;
5352
      if (this_present_toTime || that_present_toTime) {
5353
        if (!(this_present_toTime && that_present_toTime))
5354
          return false;
5355
        if (this.toTime != that.toTime)
5356
          return false;
5357
      }
5358
 
5359
      boolean this_present_gatewayId = true;
5360
      boolean that_present_gatewayId = true;
5361
      if (this_present_gatewayId || that_present_gatewayId) {
5362
        if (!(this_present_gatewayId && that_present_gatewayId))
5363
          return false;
5364
        if (this.gatewayId != that.gatewayId)
5365
          return false;
5366
      }
5367
 
5368
      return true;
5369
    }
5370
 
5371
    @Override
5372
    public int hashCode() {
5373
      return 0;
5374
    }
5375
 
5376
    public int compareTo(getPaymentsByCapturedDate_args other) {
5377
      if (!getClass().equals(other.getClass())) {
5378
        return getClass().getName().compareTo(other.getClass().getName());
5379
      }
5380
 
5381
      int lastComparison = 0;
5382
      getPaymentsByCapturedDate_args typedOther = (getPaymentsByCapturedDate_args)other;
5383
 
5384
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
5385
      if (lastComparison != 0) {
5386
        return lastComparison;
5387
      }
5388
      if (isSetFromTime()) {
5389
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
5390
        if (lastComparison != 0) {
5391
          return lastComparison;
5392
        }
5393
      }
5394
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
5395
      if (lastComparison != 0) {
5396
        return lastComparison;
5397
      }
5398
      if (isSetToTime()) {
5399
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
5400
        if (lastComparison != 0) {
5401
          return lastComparison;
5402
        }
5403
      }
5404
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
5405
      if (lastComparison != 0) {
5406
        return lastComparison;
5407
      }
5408
      if (isSetGatewayId()) {
5409
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
5410
        if (lastComparison != 0) {
5411
          return lastComparison;
5412
        }
5413
      }
5414
      return 0;
5415
    }
5416
 
5417
    public _Fields fieldForId(int fieldId) {
5418
      return _Fields.findByThriftId(fieldId);
5419
    }
5420
 
5421
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5422
      org.apache.thrift.protocol.TField field;
5423
      iprot.readStructBegin();
5424
      while (true)
5425
      {
5426
        field = iprot.readFieldBegin();
5427
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5428
          break;
5429
        }
5430
        switch (field.id) {
5431
          case 1: // FROM_TIME
5432
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5433
              this.fromTime = iprot.readI64();
5434
              setFromTimeIsSet(true);
5435
            } else { 
5436
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5437
            }
5438
            break;
5439
          case 2: // TO_TIME
5440
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5441
              this.toTime = iprot.readI64();
5442
              setToTimeIsSet(true);
5443
            } else { 
5444
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5445
            }
5446
            break;
5447
          case 3: // GATEWAY_ID
5448
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5449
              this.gatewayId = iprot.readI64();
5450
              setGatewayIdIsSet(true);
5451
            } else { 
5452
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5453
            }
5454
            break;
5455
          default:
5456
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5457
        }
5458
        iprot.readFieldEnd();
5459
      }
5460
      iprot.readStructEnd();
5461
      validate();
5462
    }
5463
 
5464
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5465
      validate();
5466
 
5467
      oprot.writeStructBegin(STRUCT_DESC);
5468
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
5469
      oprot.writeI64(this.fromTime);
5470
      oprot.writeFieldEnd();
5471
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
5472
      oprot.writeI64(this.toTime);
5473
      oprot.writeFieldEnd();
5474
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
5475
      oprot.writeI64(this.gatewayId);
5476
      oprot.writeFieldEnd();
5477
      oprot.writeFieldStop();
5478
      oprot.writeStructEnd();
5479
    }
5480
 
5481
    @Override
5482
    public String toString() {
5483
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_args(");
5484
      boolean first = true;
5485
 
5486
      sb.append("fromTime:");
5487
      sb.append(this.fromTime);
5488
      first = false;
5489
      if (!first) sb.append(", ");
5490
      sb.append("toTime:");
5491
      sb.append(this.toTime);
5492
      first = false;
5493
      if (!first) sb.append(", ");
5494
      sb.append("gatewayId:");
5495
      sb.append(this.gatewayId);
5496
      first = false;
5497
      sb.append(")");
5498
      return sb.toString();
5499
    }
5500
 
5501
    public void validate() throws org.apache.thrift.TException {
5502
      // check for required fields
5503
    }
5504
 
5505
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5506
      try {
5507
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5508
      } catch (org.apache.thrift.TException te) {
5509
        throw new java.io.IOException(te);
5510
      }
5511
    }
5512
 
5513
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5514
      try {
5515
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5516
      } catch (org.apache.thrift.TException te) {
5517
        throw new java.io.IOException(te);
5518
      }
5519
    }
5520
 
5521
  }
5522
 
5523
  public static class getPaymentsByCapturedDate_result implements org.apache.thrift.TBase<getPaymentsByCapturedDate_result, getPaymentsByCapturedDate_result._Fields>, java.io.Serializable, Cloneable   {
5524
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_result");
5525
 
5526
    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);
5527
    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);
5528
 
5529
    private List<Payment> success; // required
5530
    private PaymentException pe; // required
5531
 
5532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5533
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5534
      SUCCESS((short)0, "success"),
5535
      PE((short)1, "pe");
5536
 
5537
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5538
 
5539
      static {
5540
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5541
          byName.put(field.getFieldName(), field);
5542
        }
5543
      }
5544
 
5545
      /**
5546
       * Find the _Fields constant that matches fieldId, or null if its not found.
5547
       */
5548
      public static _Fields findByThriftId(int fieldId) {
5549
        switch(fieldId) {
5550
          case 0: // SUCCESS
5551
            return SUCCESS;
5552
          case 1: // PE
5553
            return PE;
5554
          default:
5555
            return null;
5556
        }
5557
      }
5558
 
5559
      /**
5560
       * Find the _Fields constant that matches fieldId, throwing an exception
5561
       * if it is not found.
5562
       */
5563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5564
        _Fields fields = findByThriftId(fieldId);
5565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5566
        return fields;
5567
      }
5568
 
5569
      /**
5570
       * Find the _Fields constant that matches name, or null if its not found.
5571
       */
5572
      public static _Fields findByName(String name) {
5573
        return byName.get(name);
5574
      }
5575
 
5576
      private final short _thriftId;
5577
      private final String _fieldName;
5578
 
5579
      _Fields(short thriftId, String fieldName) {
5580
        _thriftId = thriftId;
5581
        _fieldName = fieldName;
5582
      }
5583
 
5584
      public short getThriftFieldId() {
5585
        return _thriftId;
5586
      }
5587
 
5588
      public String getFieldName() {
5589
        return _fieldName;
5590
      }
5591
    }
5592
 
5593
    // isset id assignments
5594
 
5595
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5596
    static {
5597
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5598
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5599
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5600
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
5601
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5602
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5603
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5604
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_result.class, metaDataMap);
5605
    }
5606
 
5607
    public getPaymentsByCapturedDate_result() {
5608
    }
5609
 
5610
    public getPaymentsByCapturedDate_result(
5611
      List<Payment> success,
5612
      PaymentException pe)
5613
    {
5614
      this();
5615
      this.success = success;
5616
      this.pe = pe;
5617
    }
5618
 
5619
    /**
5620
     * Performs a deep copy on <i>other</i>.
5621
     */
5622
    public getPaymentsByCapturedDate_result(getPaymentsByCapturedDate_result other) {
5623
      if (other.isSetSuccess()) {
5624
        List<Payment> __this__success = new ArrayList<Payment>();
5625
        for (Payment other_element : other.success) {
5626
          __this__success.add(new Payment(other_element));
5627
        }
5628
        this.success = __this__success;
5629
      }
5630
      if (other.isSetPe()) {
5631
        this.pe = new PaymentException(other.pe);
5632
      }
5633
    }
5634
 
5635
    public getPaymentsByCapturedDate_result deepCopy() {
5636
      return new getPaymentsByCapturedDate_result(this);
5637
    }
5638
 
5639
    @Override
5640
    public void clear() {
5641
      this.success = null;
5642
      this.pe = null;
5643
    }
5644
 
5645
    public int getSuccessSize() {
5646
      return (this.success == null) ? 0 : this.success.size();
5647
    }
5648
 
5649
    public java.util.Iterator<Payment> getSuccessIterator() {
5650
      return (this.success == null) ? null : this.success.iterator();
5651
    }
5652
 
5653
    public void addToSuccess(Payment elem) {
5654
      if (this.success == null) {
5655
        this.success = new ArrayList<Payment>();
5656
      }
5657
      this.success.add(elem);
5658
    }
5659
 
5660
    public List<Payment> getSuccess() {
5661
      return this.success;
5662
    }
5663
 
5664
    public void setSuccess(List<Payment> success) {
5665
      this.success = success;
5666
    }
5667
 
5668
    public void unsetSuccess() {
5669
      this.success = null;
5670
    }
5671
 
5672
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5673
    public boolean isSetSuccess() {
5674
      return this.success != null;
5675
    }
5676
 
5677
    public void setSuccessIsSet(boolean value) {
5678
      if (!value) {
5679
        this.success = null;
5680
      }
5681
    }
5682
 
5683
    public PaymentException getPe() {
5684
      return this.pe;
5685
    }
5686
 
5687
    public void setPe(PaymentException pe) {
5688
      this.pe = pe;
5689
    }
5690
 
5691
    public void unsetPe() {
5692
      this.pe = null;
5693
    }
5694
 
5695
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
5696
    public boolean isSetPe() {
5697
      return this.pe != null;
5698
    }
5699
 
5700
    public void setPeIsSet(boolean value) {
5701
      if (!value) {
5702
        this.pe = null;
5703
      }
5704
    }
5705
 
5706
    public void setFieldValue(_Fields field, Object value) {
5707
      switch (field) {
5708
      case SUCCESS:
5709
        if (value == null) {
5710
          unsetSuccess();
5711
        } else {
5712
          setSuccess((List<Payment>)value);
5713
        }
5714
        break;
5715
 
5716
      case PE:
5717
        if (value == null) {
5718
          unsetPe();
5719
        } else {
5720
          setPe((PaymentException)value);
5721
        }
5722
        break;
5723
 
5724
      }
5725
    }
5726
 
5727
    public Object getFieldValue(_Fields field) {
5728
      switch (field) {
5729
      case SUCCESS:
5730
        return getSuccess();
5731
 
5732
      case PE:
5733
        return getPe();
5734
 
5735
      }
5736
      throw new IllegalStateException();
5737
    }
5738
 
5739
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5740
    public boolean isSet(_Fields field) {
5741
      if (field == null) {
5742
        throw new IllegalArgumentException();
5743
      }
5744
 
5745
      switch (field) {
5746
      case SUCCESS:
5747
        return isSetSuccess();
5748
      case PE:
5749
        return isSetPe();
5750
      }
5751
      throw new IllegalStateException();
5752
    }
5753
 
5754
    @Override
5755
    public boolean equals(Object that) {
5756
      if (that == null)
5757
        return false;
5758
      if (that instanceof getPaymentsByCapturedDate_result)
5759
        return this.equals((getPaymentsByCapturedDate_result)that);
5760
      return false;
5761
    }
5762
 
5763
    public boolean equals(getPaymentsByCapturedDate_result that) {
5764
      if (that == null)
5765
        return false;
5766
 
5767
      boolean this_present_success = true && this.isSetSuccess();
5768
      boolean that_present_success = true && that.isSetSuccess();
5769
      if (this_present_success || that_present_success) {
5770
        if (!(this_present_success && that_present_success))
5771
          return false;
5772
        if (!this.success.equals(that.success))
5773
          return false;
5774
      }
5775
 
5776
      boolean this_present_pe = true && this.isSetPe();
5777
      boolean that_present_pe = true && that.isSetPe();
5778
      if (this_present_pe || that_present_pe) {
5779
        if (!(this_present_pe && that_present_pe))
5780
          return false;
5781
        if (!this.pe.equals(that.pe))
5782
          return false;
5783
      }
5784
 
5785
      return true;
5786
    }
5787
 
5788
    @Override
5789
    public int hashCode() {
5790
      return 0;
5791
    }
5792
 
5793
    public int compareTo(getPaymentsByCapturedDate_result other) {
5794
      if (!getClass().equals(other.getClass())) {
5795
        return getClass().getName().compareTo(other.getClass().getName());
5796
      }
5797
 
5798
      int lastComparison = 0;
5799
      getPaymentsByCapturedDate_result typedOther = (getPaymentsByCapturedDate_result)other;
5800
 
5801
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5802
      if (lastComparison != 0) {
5803
        return lastComparison;
5804
      }
5805
      if (isSetSuccess()) {
5806
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5807
        if (lastComparison != 0) {
5808
          return lastComparison;
5809
        }
5810
      }
5811
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
5812
      if (lastComparison != 0) {
5813
        return lastComparison;
5814
      }
5815
      if (isSetPe()) {
5816
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
5817
        if (lastComparison != 0) {
5818
          return lastComparison;
5819
        }
5820
      }
5821
      return 0;
5822
    }
5823
 
5824
    public _Fields fieldForId(int fieldId) {
5825
      return _Fields.findByThriftId(fieldId);
5826
    }
5827
 
5828
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5829
      org.apache.thrift.protocol.TField field;
5830
      iprot.readStructBegin();
5831
      while (true)
5832
      {
5833
        field = iprot.readFieldBegin();
5834
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5835
          break;
5836
        }
5837
        switch (field.id) {
5838
          case 0: // SUCCESS
5839
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5840
              {
5841
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
5842
                this.success = new ArrayList<Payment>(_list20.size);
5843
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
5844
                {
5845
                  Payment _elem22; // required
5846
                  _elem22 = new Payment();
5847
                  _elem22.read(iprot);
5848
                  this.success.add(_elem22);
5849
                }
5850
                iprot.readListEnd();
5851
              }
5852
            } else { 
5853
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5854
            }
5855
            break;
5856
          case 1: // PE
5857
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5858
              this.pe = new PaymentException();
5859
              this.pe.read(iprot);
5860
            } else { 
5861
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5862
            }
5863
            break;
5864
          default:
5865
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5866
        }
5867
        iprot.readFieldEnd();
5868
      }
5869
      iprot.readStructEnd();
5870
      validate();
5871
    }
5872
 
5873
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5874
      oprot.writeStructBegin(STRUCT_DESC);
5875
 
5876
      if (this.isSetSuccess()) {
5877
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5878
        {
5879
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5880
          for (Payment _iter23 : this.success)
5881
          {
5882
            _iter23.write(oprot);
5883
          }
5884
          oprot.writeListEnd();
5885
        }
5886
        oprot.writeFieldEnd();
5887
      } else if (this.isSetPe()) {
5888
        oprot.writeFieldBegin(PE_FIELD_DESC);
5889
        this.pe.write(oprot);
5890
        oprot.writeFieldEnd();
5891
      }
5892
      oprot.writeFieldStop();
5893
      oprot.writeStructEnd();
5894
    }
5895
 
5896
    @Override
5897
    public String toString() {
5898
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_result(");
5899
      boolean first = true;
5900
 
5901
      sb.append("success:");
5902
      if (this.success == null) {
5903
        sb.append("null");
5904
      } else {
5905
        sb.append(this.success);
5906
      }
5907
      first = false;
5908
      if (!first) sb.append(", ");
5909
      sb.append("pe:");
5910
      if (this.pe == null) {
5911
        sb.append("null");
5912
      } else {
5913
        sb.append(this.pe);
5914
      }
5915
      first = false;
5916
      sb.append(")");
5917
      return sb.toString();
5918
    }
5919
 
5920
    public void validate() throws org.apache.thrift.TException {
5921
      // check for required fields
5922
    }
5923
 
5924
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5925
      try {
5926
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5927
      } catch (org.apache.thrift.TException te) {
5928
        throw new java.io.IOException(te);
5929
      }
5930
    }
5931
 
5932
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5933
      try {
5934
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5935
      } catch (org.apache.thrift.TException te) {
5936
        throw new java.io.IOException(te);
5937
      }
5938
    }
5939
 
5940
  }
5941
 
3430 rajveer 5942
  public static class getPaymentGateway_args implements org.apache.thrift.TBase<getPaymentGateway_args, getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable   {
5943
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_args");
123 ashish 5944
 
3430 rajveer 5945
    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 5946
 
3430 rajveer 5947
    private long id; // required
123 ashish 5948
 
5949
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5950
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 5951
      ID((short)1, "id");
123 ashish 5952
 
5953
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5954
 
5955
      static {
5956
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5957
          byName.put(field.getFieldName(), field);
5958
        }
5959
      }
5960
 
5961
      /**
5962
       * Find the _Fields constant that matches fieldId, or null if its not found.
5963
       */
5964
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5965
        switch(fieldId) {
5966
          case 1: // ID
5967
            return ID;
5968
          default:
5969
            return null;
5970
        }
123 ashish 5971
      }
5972
 
5973
      /**
5974
       * Find the _Fields constant that matches fieldId, throwing an exception
5975
       * if it is not found.
5976
       */
5977
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5978
        _Fields fields = findByThriftId(fieldId);
5979
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5980
        return fields;
5981
      }
5982
 
5983
      /**
5984
       * Find the _Fields constant that matches name, or null if its not found.
5985
       */
5986
      public static _Fields findByName(String name) {
5987
        return byName.get(name);
5988
      }
5989
 
5990
      private final short _thriftId;
5991
      private final String _fieldName;
5992
 
5993
      _Fields(short thriftId, String fieldName) {
5994
        _thriftId = thriftId;
5995
        _fieldName = fieldName;
5996
      }
5997
 
5998
      public short getThriftFieldId() {
5999
        return _thriftId;
6000
      }
6001
 
6002
      public String getFieldName() {
6003
        return _fieldName;
6004
      }
6005
    }
6006
 
6007
    // isset id assignments
420 ashish 6008
    private static final int __ID_ISSET_ID = 0;
123 ashish 6009
    private BitSet __isset_bit_vector = new BitSet(1);
6010
 
3430 rajveer 6011
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 6012
    static {
3430 rajveer 6013
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6014
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6015
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6016
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6017
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 6018
    }
6019
 
695 rajveer 6020
    public getPaymentGateway_args() {
123 ashish 6021
    }
6022
 
695 rajveer 6023
    public getPaymentGateway_args(
6024
      long id)
123 ashish 6025
    {
6026
      this();
420 ashish 6027
      this.id = id;
6028
      setIdIsSet(true);
123 ashish 6029
    }
6030
 
6031
    /**
6032
     * Performs a deep copy on <i>other</i>.
6033
     */
695 rajveer 6034
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 6035
      __isset_bit_vector.clear();
6036
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 6037
      this.id = other.id;
123 ashish 6038
    }
6039
 
695 rajveer 6040
    public getPaymentGateway_args deepCopy() {
6041
      return new getPaymentGateway_args(this);
123 ashish 6042
    }
6043
 
3430 rajveer 6044
    @Override
6045
    public void clear() {
6046
      setIdIsSet(false);
6047
      this.id = 0;
123 ashish 6048
    }
6049
 
420 ashish 6050
    public long getId() {
6051
      return this.id;
123 ashish 6052
    }
6053
 
3430 rajveer 6054
    public void setId(long id) {
420 ashish 6055
      this.id = id;
6056
      setIdIsSet(true);
123 ashish 6057
    }
6058
 
420 ashish 6059
    public void unsetId() {
6060
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 6061
    }
6062
 
3430 rajveer 6063
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 6064
    public boolean isSetId() {
6065
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 6066
    }
6067
 
420 ashish 6068
    public void setIdIsSet(boolean value) {
6069
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 6070
    }
6071
 
6072
    public void setFieldValue(_Fields field, Object value) {
6073
      switch (field) {
420 ashish 6074
      case ID:
123 ashish 6075
        if (value == null) {
420 ashish 6076
          unsetId();
123 ashish 6077
        } else {
420 ashish 6078
          setId((Long)value);
123 ashish 6079
        }
6080
        break;
6081
 
6082
      }
6083
    }
6084
 
6085
    public Object getFieldValue(_Fields field) {
6086
      switch (field) {
420 ashish 6087
      case ID:
3430 rajveer 6088
        return Long.valueOf(getId());
123 ashish 6089
 
6090
      }
6091
      throw new IllegalStateException();
6092
    }
6093
 
3430 rajveer 6094
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6095
    public boolean isSet(_Fields field) {
6096
      if (field == null) {
6097
        throw new IllegalArgumentException();
6098
      }
123 ashish 6099
 
6100
      switch (field) {
420 ashish 6101
      case ID:
6102
        return isSetId();
123 ashish 6103
      }
6104
      throw new IllegalStateException();
6105
    }
6106
 
6107
    @Override
6108
    public boolean equals(Object that) {
6109
      if (that == null)
6110
        return false;
695 rajveer 6111
      if (that instanceof getPaymentGateway_args)
6112
        return this.equals((getPaymentGateway_args)that);
123 ashish 6113
      return false;
6114
    }
6115
 
695 rajveer 6116
    public boolean equals(getPaymentGateway_args that) {
123 ashish 6117
      if (that == null)
6118
        return false;
6119
 
420 ashish 6120
      boolean this_present_id = true;
6121
      boolean that_present_id = true;
6122
      if (this_present_id || that_present_id) {
6123
        if (!(this_present_id && that_present_id))
123 ashish 6124
          return false;
420 ashish 6125
        if (this.id != that.id)
123 ashish 6126
          return false;
6127
      }
6128
 
6129
      return true;
6130
    }
6131
 
6132
    @Override
6133
    public int hashCode() {
6134
      return 0;
6135
    }
6136
 
695 rajveer 6137
    public int compareTo(getPaymentGateway_args other) {
123 ashish 6138
      if (!getClass().equals(other.getClass())) {
6139
        return getClass().getName().compareTo(other.getClass().getName());
6140
      }
6141
 
6142
      int lastComparison = 0;
695 rajveer 6143
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 6144
 
3430 rajveer 6145
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
123 ashish 6146
      if (lastComparison != 0) {
6147
        return lastComparison;
6148
      }
3430 rajveer 6149
      if (isSetId()) {
6150
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
6151
        if (lastComparison != 0) {
6152
          return lastComparison;
6153
        }
123 ashish 6154
      }
6155
      return 0;
6156
    }
6157
 
3430 rajveer 6158
    public _Fields fieldForId(int fieldId) {
6159
      return _Fields.findByThriftId(fieldId);
6160
    }
6161
 
6162
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6163
      org.apache.thrift.protocol.TField field;
123 ashish 6164
      iprot.readStructBegin();
6165
      while (true)
6166
      {
6167
        field = iprot.readFieldBegin();
3430 rajveer 6168
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 6169
          break;
6170
        }
3430 rajveer 6171
        switch (field.id) {
6172
          case 1: // ID
6173
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6174
              this.id = iprot.readI64();
6175
              setIdIsSet(true);
6176
            } else { 
6177
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6178
            }
6179
            break;
6180
          default:
6181
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 6182
        }
3430 rajveer 6183
        iprot.readFieldEnd();
123 ashish 6184
      }
6185
      iprot.readStructEnd();
6186
      validate();
6187
    }
6188
 
3430 rajveer 6189
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 6190
      validate();
6191
 
6192
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 6193
      oprot.writeFieldBegin(ID_FIELD_DESC);
6194
      oprot.writeI64(this.id);
123 ashish 6195
      oprot.writeFieldEnd();
6196
      oprot.writeFieldStop();
6197
      oprot.writeStructEnd();
6198
    }
6199
 
6200
    @Override
6201
    public String toString() {
695 rajveer 6202
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 6203
      boolean first = true;
6204
 
420 ashish 6205
      sb.append("id:");
6206
      sb.append(this.id);
123 ashish 6207
      first = false;
6208
      sb.append(")");
6209
      return sb.toString();
6210
    }
6211
 
3430 rajveer 6212
    public void validate() throws org.apache.thrift.TException {
123 ashish 6213
      // check for required fields
6214
    }
6215
 
3430 rajveer 6216
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6217
      try {
6218
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6219
      } catch (org.apache.thrift.TException te) {
6220
        throw new java.io.IOException(te);
6221
      }
6222
    }
6223
 
6224
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6225
      try {
6226
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6227
        __isset_bit_vector = new BitSet(1);
6228
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6229
      } catch (org.apache.thrift.TException te) {
6230
        throw new java.io.IOException(te);
6231
      }
6232
    }
6233
 
123 ashish 6234
  }
6235
 
3430 rajveer 6236
  public static class getPaymentGateway_result implements org.apache.thrift.TBase<getPaymentGateway_result, getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable   {
6237
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_result");
123 ashish 6238
 
3430 rajveer 6239
    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);
6240
    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 6241
 
3430 rajveer 6242
    private PaymentGateway success; // required
6243
    private PaymentException pe; // required
123 ashish 6244
 
6245
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6246
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 6247
      SUCCESS((short)0, "success"),
6248
      PE((short)1, "pe");
6249
 
6250
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6251
 
6252
      static {
6253
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6254
          byName.put(field.getFieldName(), field);
6255
        }
6256
      }
6257
 
6258
      /**
6259
       * Find the _Fields constant that matches fieldId, or null if its not found.
6260
       */
6261
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6262
        switch(fieldId) {
6263
          case 0: // SUCCESS
6264
            return SUCCESS;
6265
          case 1: // PE
6266
            return PE;
6267
          default:
6268
            return null;
6269
        }
420 ashish 6270
      }
6271
 
6272
      /**
6273
       * Find the _Fields constant that matches fieldId, throwing an exception
6274
       * if it is not found.
6275
       */
6276
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6277
        _Fields fields = findByThriftId(fieldId);
6278
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6279
        return fields;
6280
      }
6281
 
6282
      /**
6283
       * Find the _Fields constant that matches name, or null if its not found.
6284
       */
6285
      public static _Fields findByName(String name) {
6286
        return byName.get(name);
6287
      }
6288
 
6289
      private final short _thriftId;
6290
      private final String _fieldName;
6291
 
6292
      _Fields(short thriftId, String fieldName) {
6293
        _thriftId = thriftId;
6294
        _fieldName = fieldName;
6295
      }
6296
 
6297
      public short getThriftFieldId() {
6298
        return _thriftId;
6299
      }
6300
 
6301
      public String getFieldName() {
6302
        return _fieldName;
6303
      }
6304
    }
6305
 
6306
    // isset id assignments
6307
 
3430 rajveer 6308
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6309
    static {
3430 rajveer 6310
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6311
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6312
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class)));
6313
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6314
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6315
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6316
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 6317
    }
6318
 
695 rajveer 6319
    public getPaymentGateway_result() {
420 ashish 6320
    }
6321
 
695 rajveer 6322
    public getPaymentGateway_result(
6323
      PaymentGateway success,
420 ashish 6324
      PaymentException pe)
6325
    {
6326
      this();
6327
      this.success = success;
6328
      this.pe = pe;
6329
    }
6330
 
6331
    /**
6332
     * Performs a deep copy on <i>other</i>.
6333
     */
695 rajveer 6334
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 6335
      if (other.isSetSuccess()) {
695 rajveer 6336
        this.success = new PaymentGateway(other.success);
420 ashish 6337
      }
6338
      if (other.isSetPe()) {
6339
        this.pe = new PaymentException(other.pe);
6340
      }
6341
    }
6342
 
695 rajveer 6343
    public getPaymentGateway_result deepCopy() {
6344
      return new getPaymentGateway_result(this);
420 ashish 6345
    }
6346
 
3430 rajveer 6347
    @Override
6348
    public void clear() {
6349
      this.success = null;
6350
      this.pe = null;
420 ashish 6351
    }
6352
 
695 rajveer 6353
    public PaymentGateway getSuccess() {
420 ashish 6354
      return this.success;
6355
    }
6356
 
3430 rajveer 6357
    public void setSuccess(PaymentGateway success) {
420 ashish 6358
      this.success = success;
6359
    }
6360
 
6361
    public void unsetSuccess() {
6362
      this.success = null;
6363
    }
6364
 
3430 rajveer 6365
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 6366
    public boolean isSetSuccess() {
6367
      return this.success != null;
6368
    }
6369
 
6370
    public void setSuccessIsSet(boolean value) {
6371
      if (!value) {
6372
        this.success = null;
6373
      }
6374
    }
6375
 
6376
    public PaymentException getPe() {
6377
      return this.pe;
6378
    }
6379
 
3430 rajveer 6380
    public void setPe(PaymentException pe) {
420 ashish 6381
      this.pe = pe;
6382
    }
6383
 
6384
    public void unsetPe() {
6385
      this.pe = null;
6386
    }
6387
 
3430 rajveer 6388
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 6389
    public boolean isSetPe() {
6390
      return this.pe != null;
6391
    }
6392
 
6393
    public void setPeIsSet(boolean value) {
6394
      if (!value) {
6395
        this.pe = null;
6396
      }
6397
    }
6398
 
6399
    public void setFieldValue(_Fields field, Object value) {
6400
      switch (field) {
6401
      case SUCCESS:
6402
        if (value == null) {
6403
          unsetSuccess();
6404
        } else {
695 rajveer 6405
          setSuccess((PaymentGateway)value);
420 ashish 6406
        }
6407
        break;
6408
 
6409
      case PE:
6410
        if (value == null) {
6411
          unsetPe();
6412
        } else {
6413
          setPe((PaymentException)value);
6414
        }
6415
        break;
6416
 
6417
      }
6418
    }
6419
 
6420
    public Object getFieldValue(_Fields field) {
6421
      switch (field) {
6422
      case SUCCESS:
6423
        return getSuccess();
6424
 
6425
      case PE:
6426
        return getPe();
6427
 
6428
      }
6429
      throw new IllegalStateException();
6430
    }
6431
 
3430 rajveer 6432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6433
    public boolean isSet(_Fields field) {
6434
      if (field == null) {
6435
        throw new IllegalArgumentException();
6436
      }
420 ashish 6437
 
6438
      switch (field) {
6439
      case SUCCESS:
6440
        return isSetSuccess();
6441
      case PE:
6442
        return isSetPe();
6443
      }
6444
      throw new IllegalStateException();
6445
    }
6446
 
6447
    @Override
6448
    public boolean equals(Object that) {
6449
      if (that == null)
6450
        return false;
695 rajveer 6451
      if (that instanceof getPaymentGateway_result)
6452
        return this.equals((getPaymentGateway_result)that);
420 ashish 6453
      return false;
6454
    }
6455
 
695 rajveer 6456
    public boolean equals(getPaymentGateway_result that) {
420 ashish 6457
      if (that == null)
6458
        return false;
6459
 
6460
      boolean this_present_success = true && this.isSetSuccess();
6461
      boolean that_present_success = true && that.isSetSuccess();
6462
      if (this_present_success || that_present_success) {
6463
        if (!(this_present_success && that_present_success))
6464
          return false;
6465
        if (!this.success.equals(that.success))
6466
          return false;
6467
      }
6468
 
6469
      boolean this_present_pe = true && this.isSetPe();
6470
      boolean that_present_pe = true && that.isSetPe();
6471
      if (this_present_pe || that_present_pe) {
6472
        if (!(this_present_pe && that_present_pe))
6473
          return false;
6474
        if (!this.pe.equals(that.pe))
6475
          return false;
6476
      }
6477
 
6478
      return true;
6479
    }
6480
 
6481
    @Override
6482
    public int hashCode() {
6483
      return 0;
6484
    }
6485
 
695 rajveer 6486
    public int compareTo(getPaymentGateway_result other) {
6487
      if (!getClass().equals(other.getClass())) {
6488
        return getClass().getName().compareTo(other.getClass().getName());
6489
      }
6490
 
6491
      int lastComparison = 0;
6492
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
6493
 
3430 rajveer 6494
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 6495
      if (lastComparison != 0) {
6496
        return lastComparison;
6497
      }
3430 rajveer 6498
      if (isSetSuccess()) {
6499
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6500
        if (lastComparison != 0) {
6501
          return lastComparison;
6502
        }
695 rajveer 6503
      }
3430 rajveer 6504
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 6505
      if (lastComparison != 0) {
6506
        return lastComparison;
6507
      }
3430 rajveer 6508
      if (isSetPe()) {
6509
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6510
        if (lastComparison != 0) {
6511
          return lastComparison;
6512
        }
695 rajveer 6513
      }
6514
      return 0;
6515
    }
6516
 
3430 rajveer 6517
    public _Fields fieldForId(int fieldId) {
6518
      return _Fields.findByThriftId(fieldId);
6519
    }
6520
 
6521
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6522
      org.apache.thrift.protocol.TField field;
420 ashish 6523
      iprot.readStructBegin();
6524
      while (true)
6525
      {
6526
        field = iprot.readFieldBegin();
3430 rajveer 6527
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6528
          break;
6529
        }
3430 rajveer 6530
        switch (field.id) {
6531
          case 0: // SUCCESS
6532
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6533
              this.success = new PaymentGateway();
6534
              this.success.read(iprot);
6535
            } else { 
6536
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6537
            }
6538
            break;
6539
          case 1: // PE
6540
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6541
              this.pe = new PaymentException();
6542
              this.pe.read(iprot);
6543
            } else { 
6544
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6545
            }
6546
            break;
6547
          default:
6548
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6549
        }
3430 rajveer 6550
        iprot.readFieldEnd();
420 ashish 6551
      }
6552
      iprot.readStructEnd();
6553
      validate();
6554
    }
6555
 
3430 rajveer 6556
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6557
      oprot.writeStructBegin(STRUCT_DESC);
6558
 
6559
      if (this.isSetSuccess()) {
6560
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 6561
        this.success.write(oprot);
420 ashish 6562
        oprot.writeFieldEnd();
6563
      } else if (this.isSetPe()) {
6564
        oprot.writeFieldBegin(PE_FIELD_DESC);
6565
        this.pe.write(oprot);
6566
        oprot.writeFieldEnd();
6567
      }
6568
      oprot.writeFieldStop();
6569
      oprot.writeStructEnd();
6570
    }
6571
 
6572
    @Override
6573
    public String toString() {
695 rajveer 6574
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 6575
      boolean first = true;
6576
 
6577
      sb.append("success:");
6578
      if (this.success == null) {
6579
        sb.append("null");
6580
      } else {
6581
        sb.append(this.success);
6582
      }
6583
      first = false;
6584
      if (!first) sb.append(", ");
6585
      sb.append("pe:");
6586
      if (this.pe == null) {
6587
        sb.append("null");
6588
      } else {
6589
        sb.append(this.pe);
6590
      }
6591
      first = false;
6592
      sb.append(")");
6593
      return sb.toString();
6594
    }
6595
 
3430 rajveer 6596
    public void validate() throws org.apache.thrift.TException {
420 ashish 6597
      // check for required fields
6598
    }
6599
 
3430 rajveer 6600
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6601
      try {
6602
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6603
      } catch (org.apache.thrift.TException te) {
6604
        throw new java.io.IOException(te);
6605
      }
6606
    }
6607
 
6608
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6609
      try {
6610
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6611
      } catch (org.apache.thrift.TException te) {
6612
        throw new java.io.IOException(te);
6613
      }
6614
    }
6615
 
420 ashish 6616
  }
6617
 
4600 varun.gupt 6618
  public static class getActivePaymentGateways_args implements org.apache.thrift.TBase<getActivePaymentGateways_args, getActivePaymentGateways_args._Fields>, java.io.Serializable, Cloneable   {
6619
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_args");
6620
 
6621
 
6622
 
6623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6624
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6625
;
6626
 
6627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6628
 
6629
      static {
6630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6631
          byName.put(field.getFieldName(), field);
6632
        }
6633
      }
6634
 
6635
      /**
6636
       * Find the _Fields constant that matches fieldId, or null if its not found.
6637
       */
6638
      public static _Fields findByThriftId(int fieldId) {
6639
        switch(fieldId) {
6640
          default:
6641
            return null;
6642
        }
6643
      }
6644
 
6645
      /**
6646
       * Find the _Fields constant that matches fieldId, throwing an exception
6647
       * if it is not found.
6648
       */
6649
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6650
        _Fields fields = findByThriftId(fieldId);
6651
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6652
        return fields;
6653
      }
6654
 
6655
      /**
6656
       * Find the _Fields constant that matches name, or null if its not found.
6657
       */
6658
      public static _Fields findByName(String name) {
6659
        return byName.get(name);
6660
      }
6661
 
6662
      private final short _thriftId;
6663
      private final String _fieldName;
6664
 
6665
      _Fields(short thriftId, String fieldName) {
6666
        _thriftId = thriftId;
6667
        _fieldName = fieldName;
6668
      }
6669
 
6670
      public short getThriftFieldId() {
6671
        return _thriftId;
6672
      }
6673
 
6674
      public String getFieldName() {
6675
        return _fieldName;
6676
      }
6677
    }
6678
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6679
    static {
6680
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6681
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6682
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_args.class, metaDataMap);
6683
    }
6684
 
6685
    public getActivePaymentGateways_args() {
6686
    }
6687
 
6688
    /**
6689
     * Performs a deep copy on <i>other</i>.
6690
     */
6691
    public getActivePaymentGateways_args(getActivePaymentGateways_args other) {
6692
    }
6693
 
6694
    public getActivePaymentGateways_args deepCopy() {
6695
      return new getActivePaymentGateways_args(this);
6696
    }
6697
 
6698
    @Override
6699
    public void clear() {
6700
    }
6701
 
6702
    public void setFieldValue(_Fields field, Object value) {
6703
      switch (field) {
6704
      }
6705
    }
6706
 
6707
    public Object getFieldValue(_Fields field) {
6708
      switch (field) {
6709
      }
6710
      throw new IllegalStateException();
6711
    }
6712
 
6713
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6714
    public boolean isSet(_Fields field) {
6715
      if (field == null) {
6716
        throw new IllegalArgumentException();
6717
      }
6718
 
6719
      switch (field) {
6720
      }
6721
      throw new IllegalStateException();
6722
    }
6723
 
6724
    @Override
6725
    public boolean equals(Object that) {
6726
      if (that == null)
6727
        return false;
6728
      if (that instanceof getActivePaymentGateways_args)
6729
        return this.equals((getActivePaymentGateways_args)that);
6730
      return false;
6731
    }
6732
 
6733
    public boolean equals(getActivePaymentGateways_args that) {
6734
      if (that == null)
6735
        return false;
6736
 
6737
      return true;
6738
    }
6739
 
6740
    @Override
6741
    public int hashCode() {
6742
      return 0;
6743
    }
6744
 
6745
    public int compareTo(getActivePaymentGateways_args other) {
6746
      if (!getClass().equals(other.getClass())) {
6747
        return getClass().getName().compareTo(other.getClass().getName());
6748
      }
6749
 
6750
      int lastComparison = 0;
6751
      getActivePaymentGateways_args typedOther = (getActivePaymentGateways_args)other;
6752
 
6753
      return 0;
6754
    }
6755
 
6756
    public _Fields fieldForId(int fieldId) {
6757
      return _Fields.findByThriftId(fieldId);
6758
    }
6759
 
6760
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6761
      org.apache.thrift.protocol.TField field;
6762
      iprot.readStructBegin();
6763
      while (true)
6764
      {
6765
        field = iprot.readFieldBegin();
6766
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6767
          break;
6768
        }
6769
        switch (field.id) {
6770
          default:
6771
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6772
        }
6773
        iprot.readFieldEnd();
6774
      }
6775
      iprot.readStructEnd();
6776
      validate();
6777
    }
6778
 
6779
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6780
      validate();
6781
 
6782
      oprot.writeStructBegin(STRUCT_DESC);
6783
      oprot.writeFieldStop();
6784
      oprot.writeStructEnd();
6785
    }
6786
 
6787
    @Override
6788
    public String toString() {
6789
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_args(");
6790
      boolean first = true;
6791
 
6792
      sb.append(")");
6793
      return sb.toString();
6794
    }
6795
 
6796
    public void validate() throws org.apache.thrift.TException {
6797
      // check for required fields
6798
    }
6799
 
6800
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6801
      try {
6802
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6803
      } catch (org.apache.thrift.TException te) {
6804
        throw new java.io.IOException(te);
6805
      }
6806
    }
6807
 
6808
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6809
      try {
6810
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6811
      } catch (org.apache.thrift.TException te) {
6812
        throw new java.io.IOException(te);
6813
      }
6814
    }
6815
 
6816
  }
6817
 
6818
  public static class getActivePaymentGateways_result implements org.apache.thrift.TBase<getActivePaymentGateways_result, getActivePaymentGateways_result._Fields>, java.io.Serializable, Cloneable   {
6819
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_result");
6820
 
6821
    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);
6822
    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);
6823
 
6824
    private List<PaymentGateway> success; // required
6825
    private PaymentException pe; // required
6826
 
6827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6828
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6829
      SUCCESS((short)0, "success"),
6830
      PE((short)1, "pe");
6831
 
6832
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6833
 
6834
      static {
6835
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6836
          byName.put(field.getFieldName(), field);
6837
        }
6838
      }
6839
 
6840
      /**
6841
       * Find the _Fields constant that matches fieldId, or null if its not found.
6842
       */
6843
      public static _Fields findByThriftId(int fieldId) {
6844
        switch(fieldId) {
6845
          case 0: // SUCCESS
6846
            return SUCCESS;
6847
          case 1: // PE
6848
            return PE;
6849
          default:
6850
            return null;
6851
        }
6852
      }
6853
 
6854
      /**
6855
       * Find the _Fields constant that matches fieldId, throwing an exception
6856
       * if it is not found.
6857
       */
6858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6859
        _Fields fields = findByThriftId(fieldId);
6860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6861
        return fields;
6862
      }
6863
 
6864
      /**
6865
       * Find the _Fields constant that matches name, or null if its not found.
6866
       */
6867
      public static _Fields findByName(String name) {
6868
        return byName.get(name);
6869
      }
6870
 
6871
      private final short _thriftId;
6872
      private final String _fieldName;
6873
 
6874
      _Fields(short thriftId, String fieldName) {
6875
        _thriftId = thriftId;
6876
        _fieldName = fieldName;
6877
      }
6878
 
6879
      public short getThriftFieldId() {
6880
        return _thriftId;
6881
      }
6882
 
6883
      public String getFieldName() {
6884
        return _fieldName;
6885
      }
6886
    }
6887
 
6888
    // isset id assignments
6889
 
6890
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6891
    static {
6892
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6893
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6894
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6895
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class))));
6896
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6897
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6898
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6899
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_result.class, metaDataMap);
6900
    }
6901
 
6902
    public getActivePaymentGateways_result() {
6903
    }
6904
 
6905
    public getActivePaymentGateways_result(
6906
      List<PaymentGateway> success,
6907
      PaymentException pe)
6908
    {
6909
      this();
6910
      this.success = success;
6911
      this.pe = pe;
6912
    }
6913
 
6914
    /**
6915
     * Performs a deep copy on <i>other</i>.
6916
     */
6917
    public getActivePaymentGateways_result(getActivePaymentGateways_result other) {
6918
      if (other.isSetSuccess()) {
6919
        List<PaymentGateway> __this__success = new ArrayList<PaymentGateway>();
6920
        for (PaymentGateway other_element : other.success) {
6921
          __this__success.add(new PaymentGateway(other_element));
6922
        }
6923
        this.success = __this__success;
6924
      }
6925
      if (other.isSetPe()) {
6926
        this.pe = new PaymentException(other.pe);
6927
      }
6928
    }
6929
 
6930
    public getActivePaymentGateways_result deepCopy() {
6931
      return new getActivePaymentGateways_result(this);
6932
    }
6933
 
6934
    @Override
6935
    public void clear() {
6936
      this.success = null;
6937
      this.pe = null;
6938
    }
6939
 
6940
    public int getSuccessSize() {
6941
      return (this.success == null) ? 0 : this.success.size();
6942
    }
6943
 
6944
    public java.util.Iterator<PaymentGateway> getSuccessIterator() {
6945
      return (this.success == null) ? null : this.success.iterator();
6946
    }
6947
 
6948
    public void addToSuccess(PaymentGateway elem) {
6949
      if (this.success == null) {
6950
        this.success = new ArrayList<PaymentGateway>();
6951
      }
6952
      this.success.add(elem);
6953
    }
6954
 
6955
    public List<PaymentGateway> getSuccess() {
6956
      return this.success;
6957
    }
6958
 
6959
    public void setSuccess(List<PaymentGateway> success) {
6960
      this.success = success;
6961
    }
6962
 
6963
    public void unsetSuccess() {
6964
      this.success = null;
6965
    }
6966
 
6967
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6968
    public boolean isSetSuccess() {
6969
      return this.success != null;
6970
    }
6971
 
6972
    public void setSuccessIsSet(boolean value) {
6973
      if (!value) {
6974
        this.success = null;
6975
      }
6976
    }
6977
 
6978
    public PaymentException getPe() {
6979
      return this.pe;
6980
    }
6981
 
6982
    public void setPe(PaymentException pe) {
6983
      this.pe = pe;
6984
    }
6985
 
6986
    public void unsetPe() {
6987
      this.pe = null;
6988
    }
6989
 
6990
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
6991
    public boolean isSetPe() {
6992
      return this.pe != null;
6993
    }
6994
 
6995
    public void setPeIsSet(boolean value) {
6996
      if (!value) {
6997
        this.pe = null;
6998
      }
6999
    }
7000
 
7001
    public void setFieldValue(_Fields field, Object value) {
7002
      switch (field) {
7003
      case SUCCESS:
7004
        if (value == null) {
7005
          unsetSuccess();
7006
        } else {
7007
          setSuccess((List<PaymentGateway>)value);
7008
        }
7009
        break;
7010
 
7011
      case PE:
7012
        if (value == null) {
7013
          unsetPe();
7014
        } else {
7015
          setPe((PaymentException)value);
7016
        }
7017
        break;
7018
 
7019
      }
7020
    }
7021
 
7022
    public Object getFieldValue(_Fields field) {
7023
      switch (field) {
7024
      case SUCCESS:
7025
        return getSuccess();
7026
 
7027
      case PE:
7028
        return getPe();
7029
 
7030
      }
7031
      throw new IllegalStateException();
7032
    }
7033
 
7034
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7035
    public boolean isSet(_Fields field) {
7036
      if (field == null) {
7037
        throw new IllegalArgumentException();
7038
      }
7039
 
7040
      switch (field) {
7041
      case SUCCESS:
7042
        return isSetSuccess();
7043
      case PE:
7044
        return isSetPe();
7045
      }
7046
      throw new IllegalStateException();
7047
    }
7048
 
7049
    @Override
7050
    public boolean equals(Object that) {
7051
      if (that == null)
7052
        return false;
7053
      if (that instanceof getActivePaymentGateways_result)
7054
        return this.equals((getActivePaymentGateways_result)that);
7055
      return false;
7056
    }
7057
 
7058
    public boolean equals(getActivePaymentGateways_result that) {
7059
      if (that == null)
7060
        return false;
7061
 
7062
      boolean this_present_success = true && this.isSetSuccess();
7063
      boolean that_present_success = true && that.isSetSuccess();
7064
      if (this_present_success || that_present_success) {
7065
        if (!(this_present_success && that_present_success))
7066
          return false;
7067
        if (!this.success.equals(that.success))
7068
          return false;
7069
      }
7070
 
7071
      boolean this_present_pe = true && this.isSetPe();
7072
      boolean that_present_pe = true && that.isSetPe();
7073
      if (this_present_pe || that_present_pe) {
7074
        if (!(this_present_pe && that_present_pe))
7075
          return false;
7076
        if (!this.pe.equals(that.pe))
7077
          return false;
7078
      }
7079
 
7080
      return true;
7081
    }
7082
 
7083
    @Override
7084
    public int hashCode() {
7085
      return 0;
7086
    }
7087
 
7088
    public int compareTo(getActivePaymentGateways_result other) {
7089
      if (!getClass().equals(other.getClass())) {
7090
        return getClass().getName().compareTo(other.getClass().getName());
7091
      }
7092
 
7093
      int lastComparison = 0;
7094
      getActivePaymentGateways_result typedOther = (getActivePaymentGateways_result)other;
7095
 
7096
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7097
      if (lastComparison != 0) {
7098
        return lastComparison;
7099
      }
7100
      if (isSetSuccess()) {
7101
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7102
        if (lastComparison != 0) {
7103
          return lastComparison;
7104
        }
7105
      }
7106
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
7107
      if (lastComparison != 0) {
7108
        return lastComparison;
7109
      }
7110
      if (isSetPe()) {
7111
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7112
        if (lastComparison != 0) {
7113
          return lastComparison;
7114
        }
7115
      }
7116
      return 0;
7117
    }
7118
 
7119
    public _Fields fieldForId(int fieldId) {
7120
      return _Fields.findByThriftId(fieldId);
7121
    }
7122
 
7123
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7124
      org.apache.thrift.protocol.TField field;
7125
      iprot.readStructBegin();
7126
      while (true)
7127
      {
7128
        field = iprot.readFieldBegin();
7129
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7130
          break;
7131
        }
7132
        switch (field.id) {
7133
          case 0: // SUCCESS
7134
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7135
              {
7136
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
7137
                this.success = new ArrayList<PaymentGateway>(_list24.size);
7138
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
7139
                {
7140
                  PaymentGateway _elem26; // required
7141
                  _elem26 = new PaymentGateway();
7142
                  _elem26.read(iprot);
7143
                  this.success.add(_elem26);
7144
                }
7145
                iprot.readListEnd();
7146
              }
7147
            } else { 
7148
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7149
            }
7150
            break;
7151
          case 1: // PE
7152
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7153
              this.pe = new PaymentException();
7154
              this.pe.read(iprot);
7155
            } else { 
7156
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7157
            }
7158
            break;
7159
          default:
7160
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7161
        }
7162
        iprot.readFieldEnd();
7163
      }
7164
      iprot.readStructEnd();
7165
      validate();
7166
    }
7167
 
7168
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7169
      oprot.writeStructBegin(STRUCT_DESC);
7170
 
7171
      if (this.isSetSuccess()) {
7172
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7173
        {
7174
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7175
          for (PaymentGateway _iter27 : this.success)
7176
          {
7177
            _iter27.write(oprot);
7178
          }
7179
          oprot.writeListEnd();
7180
        }
7181
        oprot.writeFieldEnd();
7182
      } else if (this.isSetPe()) {
7183
        oprot.writeFieldBegin(PE_FIELD_DESC);
7184
        this.pe.write(oprot);
7185
        oprot.writeFieldEnd();
7186
      }
7187
      oprot.writeFieldStop();
7188
      oprot.writeStructEnd();
7189
    }
7190
 
7191
    @Override
7192
    public String toString() {
7193
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_result(");
7194
      boolean first = true;
7195
 
7196
      sb.append("success:");
7197
      if (this.success == null) {
7198
        sb.append("null");
7199
      } else {
7200
        sb.append(this.success);
7201
      }
7202
      first = false;
7203
      if (!first) sb.append(", ");
7204
      sb.append("pe:");
7205
      if (this.pe == null) {
7206
        sb.append("null");
7207
      } else {
7208
        sb.append(this.pe);
7209
      }
7210
      first = false;
7211
      sb.append(")");
7212
      return sb.toString();
7213
    }
7214
 
7215
    public void validate() throws org.apache.thrift.TException {
7216
      // check for required fields
7217
    }
7218
 
7219
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7220
      try {
7221
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7222
      } catch (org.apache.thrift.TException te) {
7223
        throw new java.io.IOException(te);
7224
      }
7225
    }
7226
 
7227
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7228
      try {
7229
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7230
      } catch (org.apache.thrift.TException te) {
7231
        throw new java.io.IOException(te);
7232
      }
7233
    }
7234
 
7235
  }
7236
 
3430 rajveer 7237
  public static class getPayment_args implements org.apache.thrift.TBase<getPayment_args, getPayment_args._Fields>, java.io.Serializable, Cloneable   {
7238
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_args");
420 ashish 7239
 
3430 rajveer 7240
    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 7241
 
3430 rajveer 7242
    private long id; // required
420 ashish 7243
 
7244
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7245
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7246
      ID((short)1, "id");
7247
 
7248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7249
 
7250
      static {
7251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7252
          byName.put(field.getFieldName(), field);
7253
        }
7254
      }
7255
 
7256
      /**
7257
       * Find the _Fields constant that matches fieldId, or null if its not found.
7258
       */
7259
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7260
        switch(fieldId) {
7261
          case 1: // ID
7262
            return ID;
7263
          default:
7264
            return null;
7265
        }
420 ashish 7266
      }
7267
 
7268
      /**
7269
       * Find the _Fields constant that matches fieldId, throwing an exception
7270
       * if it is not found.
7271
       */
7272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7273
        _Fields fields = findByThriftId(fieldId);
7274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7275
        return fields;
7276
      }
7277
 
7278
      /**
7279
       * Find the _Fields constant that matches name, or null if its not found.
7280
       */
7281
      public static _Fields findByName(String name) {
7282
        return byName.get(name);
7283
      }
7284
 
7285
      private final short _thriftId;
7286
      private final String _fieldName;
7287
 
7288
      _Fields(short thriftId, String fieldName) {
7289
        _thriftId = thriftId;
7290
        _fieldName = fieldName;
7291
      }
7292
 
7293
      public short getThriftFieldId() {
7294
        return _thriftId;
7295
      }
7296
 
7297
      public String getFieldName() {
7298
        return _fieldName;
7299
      }
7300
    }
7301
 
7302
    // isset id assignments
7303
    private static final int __ID_ISSET_ID = 0;
7304
    private BitSet __isset_bit_vector = new BitSet(1);
7305
 
3430 rajveer 7306
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7307
    static {
3430 rajveer 7308
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7309
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7310
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7311
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7312
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 7313
    }
7314
 
695 rajveer 7315
    public getPayment_args() {
420 ashish 7316
    }
7317
 
695 rajveer 7318
    public getPayment_args(
420 ashish 7319
      long id)
7320
    {
7321
      this();
7322
      this.id = id;
7323
      setIdIsSet(true);
7324
    }
7325
 
7326
    /**
7327
     * Performs a deep copy on <i>other</i>.
7328
     */
695 rajveer 7329
    public getPayment_args(getPayment_args other) {
420 ashish 7330
      __isset_bit_vector.clear();
7331
      __isset_bit_vector.or(other.__isset_bit_vector);
7332
      this.id = other.id;
7333
    }
7334
 
695 rajveer 7335
    public getPayment_args deepCopy() {
7336
      return new getPayment_args(this);
420 ashish 7337
    }
7338
 
3430 rajveer 7339
    @Override
7340
    public void clear() {
7341
      setIdIsSet(false);
7342
      this.id = 0;
420 ashish 7343
    }
7344
 
7345
    public long getId() {
7346
      return this.id;
7347
    }
7348
 
3430 rajveer 7349
    public void setId(long id) {
420 ashish 7350
      this.id = id;
7351
      setIdIsSet(true);
7352
    }
7353
 
7354
    public void unsetId() {
7355
      __isset_bit_vector.clear(__ID_ISSET_ID);
7356
    }
7357
 
3430 rajveer 7358
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 7359
    public boolean isSetId() {
7360
      return __isset_bit_vector.get(__ID_ISSET_ID);
7361
    }
7362
 
7363
    public void setIdIsSet(boolean value) {
7364
      __isset_bit_vector.set(__ID_ISSET_ID, value);
7365
    }
7366
 
7367
    public void setFieldValue(_Fields field, Object value) {
7368
      switch (field) {
7369
      case ID:
7370
        if (value == null) {
7371
          unsetId();
7372
        } else {
7373
          setId((Long)value);
7374
        }
7375
        break;
7376
 
7377
      }
7378
    }
7379
 
7380
    public Object getFieldValue(_Fields field) {
7381
      switch (field) {
7382
      case ID:
3430 rajveer 7383
        return Long.valueOf(getId());
420 ashish 7384
 
7385
      }
7386
      throw new IllegalStateException();
7387
    }
7388
 
3430 rajveer 7389
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7390
    public boolean isSet(_Fields field) {
7391
      if (field == null) {
7392
        throw new IllegalArgumentException();
7393
      }
420 ashish 7394
 
7395
      switch (field) {
7396
      case ID:
7397
        return isSetId();
7398
      }
7399
      throw new IllegalStateException();
7400
    }
7401
 
7402
    @Override
7403
    public boolean equals(Object that) {
7404
      if (that == null)
7405
        return false;
695 rajveer 7406
      if (that instanceof getPayment_args)
7407
        return this.equals((getPayment_args)that);
420 ashish 7408
      return false;
7409
    }
7410
 
695 rajveer 7411
    public boolean equals(getPayment_args that) {
420 ashish 7412
      if (that == null)
7413
        return false;
7414
 
7415
      boolean this_present_id = true;
7416
      boolean that_present_id = true;
7417
      if (this_present_id || that_present_id) {
7418
        if (!(this_present_id && that_present_id))
7419
          return false;
7420
        if (this.id != that.id)
7421
          return false;
7422
      }
7423
 
7424
      return true;
7425
    }
7426
 
7427
    @Override
7428
    public int hashCode() {
7429
      return 0;
7430
    }
7431
 
695 rajveer 7432
    public int compareTo(getPayment_args other) {
420 ashish 7433
      if (!getClass().equals(other.getClass())) {
7434
        return getClass().getName().compareTo(other.getClass().getName());
7435
      }
7436
 
7437
      int lastComparison = 0;
695 rajveer 7438
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 7439
 
3430 rajveer 7440
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 7441
      if (lastComparison != 0) {
7442
        return lastComparison;
7443
      }
3430 rajveer 7444
      if (isSetId()) {
7445
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
7446
        if (lastComparison != 0) {
7447
          return lastComparison;
7448
        }
420 ashish 7449
      }
7450
      return 0;
7451
    }
7452
 
3430 rajveer 7453
    public _Fields fieldForId(int fieldId) {
7454
      return _Fields.findByThriftId(fieldId);
7455
    }
7456
 
7457
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7458
      org.apache.thrift.protocol.TField field;
420 ashish 7459
      iprot.readStructBegin();
7460
      while (true)
7461
      {
7462
        field = iprot.readFieldBegin();
3430 rajveer 7463
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7464
          break;
7465
        }
3430 rajveer 7466
        switch (field.id) {
7467
          case 1: // ID
7468
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7469
              this.id = iprot.readI64();
7470
              setIdIsSet(true);
7471
            } else { 
7472
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7473
            }
7474
            break;
7475
          default:
7476
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7477
        }
3430 rajveer 7478
        iprot.readFieldEnd();
420 ashish 7479
      }
7480
      iprot.readStructEnd();
7481
      validate();
7482
    }
7483
 
3430 rajveer 7484
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7485
      validate();
7486
 
7487
      oprot.writeStructBegin(STRUCT_DESC);
7488
      oprot.writeFieldBegin(ID_FIELD_DESC);
7489
      oprot.writeI64(this.id);
7490
      oprot.writeFieldEnd();
7491
      oprot.writeFieldStop();
7492
      oprot.writeStructEnd();
7493
    }
7494
 
7495
    @Override
7496
    public String toString() {
695 rajveer 7497
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 7498
      boolean first = true;
7499
 
7500
      sb.append("id:");
7501
      sb.append(this.id);
7502
      first = false;
7503
      sb.append(")");
7504
      return sb.toString();
7505
    }
7506
 
3430 rajveer 7507
    public void validate() throws org.apache.thrift.TException {
420 ashish 7508
      // check for required fields
7509
    }
7510
 
3430 rajveer 7511
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7512
      try {
7513
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7514
      } catch (org.apache.thrift.TException te) {
7515
        throw new java.io.IOException(te);
7516
      }
7517
    }
7518
 
7519
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7520
      try {
7521
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7522
        __isset_bit_vector = new BitSet(1);
7523
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7524
      } catch (org.apache.thrift.TException te) {
7525
        throw new java.io.IOException(te);
7526
      }
7527
    }
7528
 
420 ashish 7529
  }
7530
 
3430 rajveer 7531
  public static class getPayment_result implements org.apache.thrift.TBase<getPayment_result, getPayment_result._Fields>, java.io.Serializable, Cloneable   {
7532
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_result");
420 ashish 7533
 
3430 rajveer 7534
    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);
7535
    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 7536
 
3430 rajveer 7537
    private Payment success; // required
7538
    private PaymentException pe; // required
420 ashish 7539
 
7540
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7541
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7542
      SUCCESS((short)0, "success"),
7543
      PE((short)1, "pe");
7544
 
7545
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7546
 
7547
      static {
7548
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7549
          byName.put(field.getFieldName(), field);
7550
        }
7551
      }
7552
 
7553
      /**
7554
       * Find the _Fields constant that matches fieldId, or null if its not found.
7555
       */
7556
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7557
        switch(fieldId) {
7558
          case 0: // SUCCESS
7559
            return SUCCESS;
7560
          case 1: // PE
7561
            return PE;
7562
          default:
7563
            return null;
7564
        }
420 ashish 7565
      }
7566
 
7567
      /**
7568
       * Find the _Fields constant that matches fieldId, throwing an exception
7569
       * if it is not found.
7570
       */
7571
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7572
        _Fields fields = findByThriftId(fieldId);
7573
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7574
        return fields;
7575
      }
7576
 
7577
      /**
7578
       * Find the _Fields constant that matches name, or null if its not found.
7579
       */
7580
      public static _Fields findByName(String name) {
7581
        return byName.get(name);
7582
      }
7583
 
7584
      private final short _thriftId;
7585
      private final String _fieldName;
7586
 
7587
      _Fields(short thriftId, String fieldName) {
7588
        _thriftId = thriftId;
7589
        _fieldName = fieldName;
7590
      }
7591
 
7592
      public short getThriftFieldId() {
7593
        return _thriftId;
7594
      }
7595
 
7596
      public String getFieldName() {
7597
        return _fieldName;
7598
      }
7599
    }
7600
 
7601
    // isset id assignments
7602
 
3430 rajveer 7603
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7604
    static {
3430 rajveer 7605
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7606
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7607
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
7608
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7609
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7610
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7611
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 7612
    }
7613
 
695 rajveer 7614
    public getPayment_result() {
420 ashish 7615
    }
7616
 
695 rajveer 7617
    public getPayment_result(
7618
      Payment success,
420 ashish 7619
      PaymentException pe)
7620
    {
7621
      this();
7622
      this.success = success;
7623
      this.pe = pe;
7624
    }
7625
 
7626
    /**
7627
     * Performs a deep copy on <i>other</i>.
7628
     */
695 rajveer 7629
    public getPayment_result(getPayment_result other) {
420 ashish 7630
      if (other.isSetSuccess()) {
695 rajveer 7631
        this.success = new Payment(other.success);
420 ashish 7632
      }
7633
      if (other.isSetPe()) {
7634
        this.pe = new PaymentException(other.pe);
7635
      }
7636
    }
7637
 
695 rajveer 7638
    public getPayment_result deepCopy() {
7639
      return new getPayment_result(this);
420 ashish 7640
    }
7641
 
3430 rajveer 7642
    @Override
7643
    public void clear() {
7644
      this.success = null;
7645
      this.pe = null;
420 ashish 7646
    }
7647
 
695 rajveer 7648
    public Payment getSuccess() {
420 ashish 7649
      return this.success;
7650
    }
7651
 
3430 rajveer 7652
    public void setSuccess(Payment success) {
420 ashish 7653
      this.success = success;
7654
    }
7655
 
7656
    public void unsetSuccess() {
7657
      this.success = null;
7658
    }
7659
 
3430 rajveer 7660
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 7661
    public boolean isSetSuccess() {
7662
      return this.success != null;
7663
    }
7664
 
7665
    public void setSuccessIsSet(boolean value) {
7666
      if (!value) {
7667
        this.success = null;
7668
      }
7669
    }
7670
 
7671
    public PaymentException getPe() {
7672
      return this.pe;
7673
    }
7674
 
3430 rajveer 7675
    public void setPe(PaymentException pe) {
420 ashish 7676
      this.pe = pe;
7677
    }
7678
 
7679
    public void unsetPe() {
7680
      this.pe = null;
7681
    }
7682
 
3430 rajveer 7683
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 7684
    public boolean isSetPe() {
7685
      return this.pe != null;
7686
    }
7687
 
7688
    public void setPeIsSet(boolean value) {
7689
      if (!value) {
7690
        this.pe = null;
7691
      }
7692
    }
7693
 
7694
    public void setFieldValue(_Fields field, Object value) {
7695
      switch (field) {
7696
      case SUCCESS:
7697
        if (value == null) {
7698
          unsetSuccess();
7699
        } else {
695 rajveer 7700
          setSuccess((Payment)value);
420 ashish 7701
        }
7702
        break;
7703
 
7704
      case PE:
7705
        if (value == null) {
7706
          unsetPe();
7707
        } else {
7708
          setPe((PaymentException)value);
7709
        }
7710
        break;
7711
 
7712
      }
7713
    }
7714
 
7715
    public Object getFieldValue(_Fields field) {
7716
      switch (field) {
7717
      case SUCCESS:
7718
        return getSuccess();
7719
 
7720
      case PE:
7721
        return getPe();
7722
 
7723
      }
7724
      throw new IllegalStateException();
7725
    }
7726
 
3430 rajveer 7727
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7728
    public boolean isSet(_Fields field) {
7729
      if (field == null) {
7730
        throw new IllegalArgumentException();
7731
      }
420 ashish 7732
 
7733
      switch (field) {
7734
      case SUCCESS:
7735
        return isSetSuccess();
7736
      case PE:
7737
        return isSetPe();
7738
      }
7739
      throw new IllegalStateException();
7740
    }
7741
 
7742
    @Override
7743
    public boolean equals(Object that) {
7744
      if (that == null)
7745
        return false;
695 rajveer 7746
      if (that instanceof getPayment_result)
7747
        return this.equals((getPayment_result)that);
420 ashish 7748
      return false;
7749
    }
7750
 
695 rajveer 7751
    public boolean equals(getPayment_result that) {
420 ashish 7752
      if (that == null)
7753
        return false;
7754
 
7755
      boolean this_present_success = true && this.isSetSuccess();
7756
      boolean that_present_success = true && that.isSetSuccess();
7757
      if (this_present_success || that_present_success) {
7758
        if (!(this_present_success && that_present_success))
7759
          return false;
7760
        if (!this.success.equals(that.success))
7761
          return false;
7762
      }
7763
 
7764
      boolean this_present_pe = true && this.isSetPe();
7765
      boolean that_present_pe = true && that.isSetPe();
7766
      if (this_present_pe || that_present_pe) {
7767
        if (!(this_present_pe && that_present_pe))
7768
          return false;
7769
        if (!this.pe.equals(that.pe))
7770
          return false;
7771
      }
7772
 
7773
      return true;
7774
    }
7775
 
7776
    @Override
7777
    public int hashCode() {
7778
      return 0;
7779
    }
7780
 
695 rajveer 7781
    public int compareTo(getPayment_result other) {
420 ashish 7782
      if (!getClass().equals(other.getClass())) {
7783
        return getClass().getName().compareTo(other.getClass().getName());
7784
      }
7785
 
7786
      int lastComparison = 0;
695 rajveer 7787
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 7788
 
3430 rajveer 7789
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 7790
      if (lastComparison != 0) {
7791
        return lastComparison;
7792
      }
3430 rajveer 7793
      if (isSetSuccess()) {
7794
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7795
        if (lastComparison != 0) {
7796
          return lastComparison;
7797
        }
420 ashish 7798
      }
3430 rajveer 7799
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 7800
      if (lastComparison != 0) {
7801
        return lastComparison;
7802
      }
3430 rajveer 7803
      if (isSetPe()) {
7804
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7805
        if (lastComparison != 0) {
7806
          return lastComparison;
7807
        }
420 ashish 7808
      }
7809
      return 0;
7810
    }
7811
 
3430 rajveer 7812
    public _Fields fieldForId(int fieldId) {
7813
      return _Fields.findByThriftId(fieldId);
7814
    }
7815
 
7816
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7817
      org.apache.thrift.protocol.TField field;
420 ashish 7818
      iprot.readStructBegin();
7819
      while (true)
7820
      {
7821
        field = iprot.readFieldBegin();
3430 rajveer 7822
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7823
          break;
7824
        }
3430 rajveer 7825
        switch (field.id) {
7826
          case 0: // SUCCESS
7827
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7828
              this.success = new Payment();
7829
              this.success.read(iprot);
7830
            } else { 
7831
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7832
            }
7833
            break;
7834
          case 1: // PE
7835
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7836
              this.pe = new PaymentException();
7837
              this.pe.read(iprot);
7838
            } else { 
7839
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7840
            }
7841
            break;
7842
          default:
7843
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7844
        }
3430 rajveer 7845
        iprot.readFieldEnd();
420 ashish 7846
      }
7847
      iprot.readStructEnd();
7848
      validate();
7849
    }
7850
 
3430 rajveer 7851
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7852
      oprot.writeStructBegin(STRUCT_DESC);
7853
 
695 rajveer 7854
      if (this.isSetSuccess()) {
7855
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7856
        this.success.write(oprot);
7857
        oprot.writeFieldEnd();
7858
      } else if (this.isSetPe()) {
420 ashish 7859
        oprot.writeFieldBegin(PE_FIELD_DESC);
7860
        this.pe.write(oprot);
7861
        oprot.writeFieldEnd();
7862
      }
7863
      oprot.writeFieldStop();
7864
      oprot.writeStructEnd();
7865
    }
7866
 
7867
    @Override
7868
    public String toString() {
695 rajveer 7869
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 7870
      boolean first = true;
7871
 
695 rajveer 7872
      sb.append("success:");
7873
      if (this.success == null) {
7874
        sb.append("null");
7875
      } else {
7876
        sb.append(this.success);
7877
      }
7878
      first = false;
7879
      if (!first) sb.append(", ");
420 ashish 7880
      sb.append("pe:");
7881
      if (this.pe == null) {
7882
        sb.append("null");
7883
      } else {
7884
        sb.append(this.pe);
7885
      }
7886
      first = false;
7887
      sb.append(")");
7888
      return sb.toString();
7889
    }
7890
 
3430 rajveer 7891
    public void validate() throws org.apache.thrift.TException {
420 ashish 7892
      // check for required fields
7893
    }
7894
 
3430 rajveer 7895
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7896
      try {
7897
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7898
      } catch (org.apache.thrift.TException te) {
7899
        throw new java.io.IOException(te);
7900
      }
7901
    }
7902
 
7903
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7904
      try {
7905
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7906
      } catch (org.apache.thrift.TException te) {
7907
        throw new java.io.IOException(te);
7908
      }
7909
    }
7910
 
420 ashish 7911
  }
7912
 
3430 rajveer 7913
  public static class getPaymentForTxnId_args implements org.apache.thrift.TBase<getPaymentForTxnId_args, getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
7914
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_args");
420 ashish 7915
 
3430 rajveer 7916
    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 7917
 
3430 rajveer 7918
    private long txnId; // required
420 ashish 7919
 
7920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7921
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 7922
      TXN_ID((short)1, "txnId");
420 ashish 7923
 
7924
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7925
 
7926
      static {
7927
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7928
          byName.put(field.getFieldName(), field);
7929
        }
7930
      }
7931
 
7932
      /**
7933
       * Find the _Fields constant that matches fieldId, or null if its not found.
7934
       */
7935
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7936
        switch(fieldId) {
7937
          case 1: // TXN_ID
7938
            return TXN_ID;
7939
          default:
7940
            return null;
7941
        }
420 ashish 7942
      }
7943
 
7944
      /**
7945
       * Find the _Fields constant that matches fieldId, throwing an exception
7946
       * if it is not found.
7947
       */
7948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7949
        _Fields fields = findByThriftId(fieldId);
7950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7951
        return fields;
7952
      }
7953
 
7954
      /**
7955
       * Find the _Fields constant that matches name, or null if its not found.
7956
       */
7957
      public static _Fields findByName(String name) {
7958
        return byName.get(name);
7959
      }
7960
 
7961
      private final short _thriftId;
7962
      private final String _fieldName;
7963
 
7964
      _Fields(short thriftId, String fieldName) {
7965
        _thriftId = thriftId;
7966
        _fieldName = fieldName;
7967
      }
7968
 
7969
      public short getThriftFieldId() {
7970
        return _thriftId;
7971
      }
7972
 
7973
      public String getFieldName() {
7974
        return _fieldName;
7975
      }
7976
    }
7977
 
7978
    // isset id assignments
695 rajveer 7979
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 7980
    private BitSet __isset_bit_vector = new BitSet(1);
7981
 
3430 rajveer 7982
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7983
    static {
3430 rajveer 7984
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7985
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7986
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7987
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7988
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 7989
    }
7990
 
695 rajveer 7991
    public getPaymentForTxnId_args() {
420 ashish 7992
    }
7993
 
695 rajveer 7994
    public getPaymentForTxnId_args(
7995
      long txnId)
420 ashish 7996
    {
7997
      this();
695 rajveer 7998
      this.txnId = txnId;
7999
      setTxnIdIsSet(true);
420 ashish 8000
    }
8001
 
8002
    /**
8003
     * Performs a deep copy on <i>other</i>.
8004
     */
695 rajveer 8005
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 8006
      __isset_bit_vector.clear();
8007
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 8008
      this.txnId = other.txnId;
420 ashish 8009
    }
8010
 
695 rajveer 8011
    public getPaymentForTxnId_args deepCopy() {
8012
      return new getPaymentForTxnId_args(this);
420 ashish 8013
    }
8014
 
3430 rajveer 8015
    @Override
8016
    public void clear() {
8017
      setTxnIdIsSet(false);
8018
      this.txnId = 0;
420 ashish 8019
    }
8020
 
695 rajveer 8021
    public long getTxnId() {
8022
      return this.txnId;
420 ashish 8023
    }
8024
 
3430 rajveer 8025
    public void setTxnId(long txnId) {
695 rajveer 8026
      this.txnId = txnId;
8027
      setTxnIdIsSet(true);
420 ashish 8028
    }
8029
 
695 rajveer 8030
    public void unsetTxnId() {
8031
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 8032
    }
8033
 
3430 rajveer 8034
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 8035
    public boolean isSetTxnId() {
8036
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 8037
    }
8038
 
695 rajveer 8039
    public void setTxnIdIsSet(boolean value) {
8040
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 8041
    }
8042
 
8043
    public void setFieldValue(_Fields field, Object value) {
8044
      switch (field) {
695 rajveer 8045
      case TXN_ID:
420 ashish 8046
        if (value == null) {
695 rajveer 8047
          unsetTxnId();
420 ashish 8048
        } else {
695 rajveer 8049
          setTxnId((Long)value);
420 ashish 8050
        }
8051
        break;
8052
 
8053
      }
8054
    }
8055
 
8056
    public Object getFieldValue(_Fields field) {
8057
      switch (field) {
695 rajveer 8058
      case TXN_ID:
3430 rajveer 8059
        return Long.valueOf(getTxnId());
420 ashish 8060
 
8061
      }
8062
      throw new IllegalStateException();
8063
    }
8064
 
3430 rajveer 8065
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8066
    public boolean isSet(_Fields field) {
8067
      if (field == null) {
8068
        throw new IllegalArgumentException();
8069
      }
420 ashish 8070
 
8071
      switch (field) {
695 rajveer 8072
      case TXN_ID:
8073
        return isSetTxnId();
420 ashish 8074
      }
8075
      throw new IllegalStateException();
8076
    }
8077
 
8078
    @Override
8079
    public boolean equals(Object that) {
8080
      if (that == null)
8081
        return false;
695 rajveer 8082
      if (that instanceof getPaymentForTxnId_args)
8083
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 8084
      return false;
8085
    }
8086
 
695 rajveer 8087
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 8088
      if (that == null)
8089
        return false;
8090
 
695 rajveer 8091
      boolean this_present_txnId = true;
8092
      boolean that_present_txnId = true;
8093
      if (this_present_txnId || that_present_txnId) {
8094
        if (!(this_present_txnId && that_present_txnId))
420 ashish 8095
          return false;
695 rajveer 8096
        if (this.txnId != that.txnId)
420 ashish 8097
          return false;
8098
      }
8099
 
8100
      return true;
8101
    }
8102
 
8103
    @Override
8104
    public int hashCode() {
8105
      return 0;
8106
    }
8107
 
695 rajveer 8108
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 8109
      if (!getClass().equals(other.getClass())) {
8110
        return getClass().getName().compareTo(other.getClass().getName());
8111
      }
8112
 
8113
      int lastComparison = 0;
695 rajveer 8114
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 8115
 
3430 rajveer 8116
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
420 ashish 8117
      if (lastComparison != 0) {
8118
        return lastComparison;
8119
      }
3430 rajveer 8120
      if (isSetTxnId()) {
8121
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
8122
        if (lastComparison != 0) {
8123
          return lastComparison;
8124
        }
420 ashish 8125
      }
8126
      return 0;
8127
    }
8128
 
3430 rajveer 8129
    public _Fields fieldForId(int fieldId) {
8130
      return _Fields.findByThriftId(fieldId);
8131
    }
8132
 
8133
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8134
      org.apache.thrift.protocol.TField field;
420 ashish 8135
      iprot.readStructBegin();
8136
      while (true)
8137
      {
8138
        field = iprot.readFieldBegin();
3430 rajveer 8139
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8140
          break;
8141
        }
3430 rajveer 8142
        switch (field.id) {
8143
          case 1: // TXN_ID
8144
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8145
              this.txnId = iprot.readI64();
8146
              setTxnIdIsSet(true);
8147
            } else { 
8148
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8149
            }
8150
            break;
8151
          default:
8152
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8153
        }
3430 rajveer 8154
        iprot.readFieldEnd();
420 ashish 8155
      }
8156
      iprot.readStructEnd();
8157
      validate();
8158
    }
8159
 
3430 rajveer 8160
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8161
      validate();
8162
 
8163
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 8164
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
8165
      oprot.writeI64(this.txnId);
420 ashish 8166
      oprot.writeFieldEnd();
8167
      oprot.writeFieldStop();
8168
      oprot.writeStructEnd();
8169
    }
8170
 
8171
    @Override
8172
    public String toString() {
695 rajveer 8173
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 8174
      boolean first = true;
8175
 
695 rajveer 8176
      sb.append("txnId:");
8177
      sb.append(this.txnId);
420 ashish 8178
      first = false;
8179
      sb.append(")");
8180
      return sb.toString();
8181
    }
8182
 
3430 rajveer 8183
    public void validate() throws org.apache.thrift.TException {
420 ashish 8184
      // check for required fields
8185
    }
8186
 
3430 rajveer 8187
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8188
      try {
8189
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8190
      } catch (org.apache.thrift.TException te) {
8191
        throw new java.io.IOException(te);
8192
      }
8193
    }
8194
 
8195
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8196
      try {
8197
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8198
        __isset_bit_vector = new BitSet(1);
8199
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8200
      } catch (org.apache.thrift.TException te) {
8201
        throw new java.io.IOException(te);
8202
      }
8203
    }
8204
 
420 ashish 8205
  }
8206
 
3430 rajveer 8207
  public static class getPaymentForTxnId_result implements org.apache.thrift.TBase<getPaymentForTxnId_result, getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
8208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_result");
420 ashish 8209
 
3430 rajveer 8210
    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);
8211
    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 8212
 
3430 rajveer 8213
    private List<Payment> success; // required
8214
    private PaymentException pe; // required
420 ashish 8215
 
8216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8217
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 8218
      SUCCESS((short)0, "success"),
8219
      PE((short)1, "pe");
8220
 
8221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8222
 
8223
      static {
8224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8225
          byName.put(field.getFieldName(), field);
8226
        }
8227
      }
8228
 
8229
      /**
8230
       * Find the _Fields constant that matches fieldId, or null if its not found.
8231
       */
8232
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8233
        switch(fieldId) {
8234
          case 0: // SUCCESS
8235
            return SUCCESS;
8236
          case 1: // PE
8237
            return PE;
8238
          default:
8239
            return null;
8240
        }
420 ashish 8241
      }
8242
 
8243
      /**
8244
       * Find the _Fields constant that matches fieldId, throwing an exception
8245
       * if it is not found.
8246
       */
8247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8248
        _Fields fields = findByThriftId(fieldId);
8249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8250
        return fields;
8251
      }
8252
 
8253
      /**
8254
       * Find the _Fields constant that matches name, or null if its not found.
8255
       */
8256
      public static _Fields findByName(String name) {
8257
        return byName.get(name);
8258
      }
8259
 
8260
      private final short _thriftId;
8261
      private final String _fieldName;
8262
 
8263
      _Fields(short thriftId, String fieldName) {
8264
        _thriftId = thriftId;
8265
        _fieldName = fieldName;
8266
      }
8267
 
8268
      public short getThriftFieldId() {
8269
        return _thriftId;
8270
      }
8271
 
8272
      public String getFieldName() {
8273
        return _fieldName;
8274
      }
8275
    }
8276
 
8277
    // isset id assignments
8278
 
3430 rajveer 8279
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8280
    static {
3430 rajveer 8281
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8282
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8283
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8284
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
8285
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8286
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8287
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8288
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 8289
    }
8290
 
695 rajveer 8291
    public getPaymentForTxnId_result() {
420 ashish 8292
    }
8293
 
695 rajveer 8294
    public getPaymentForTxnId_result(
8295
      List<Payment> success,
420 ashish 8296
      PaymentException pe)
8297
    {
8298
      this();
8299
      this.success = success;
8300
      this.pe = pe;
8301
    }
8302
 
8303
    /**
8304
     * Performs a deep copy on <i>other</i>.
8305
     */
695 rajveer 8306
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 8307
      if (other.isSetSuccess()) {
695 rajveer 8308
        List<Payment> __this__success = new ArrayList<Payment>();
8309
        for (Payment other_element : other.success) {
8310
          __this__success.add(new Payment(other_element));
8311
        }
8312
        this.success = __this__success;
420 ashish 8313
      }
8314
      if (other.isSetPe()) {
8315
        this.pe = new PaymentException(other.pe);
8316
      }
8317
    }
8318
 
695 rajveer 8319
    public getPaymentForTxnId_result deepCopy() {
8320
      return new getPaymentForTxnId_result(this);
420 ashish 8321
    }
8322
 
3430 rajveer 8323
    @Override
8324
    public void clear() {
8325
      this.success = null;
8326
      this.pe = null;
420 ashish 8327
    }
8328
 
695 rajveer 8329
    public int getSuccessSize() {
8330
      return (this.success == null) ? 0 : this.success.size();
8331
    }
8332
 
8333
    public java.util.Iterator<Payment> getSuccessIterator() {
8334
      return (this.success == null) ? null : this.success.iterator();
8335
    }
8336
 
8337
    public void addToSuccess(Payment elem) {
8338
      if (this.success == null) {
8339
        this.success = new ArrayList<Payment>();
8340
      }
8341
      this.success.add(elem);
8342
    }
8343
 
8344
    public List<Payment> getSuccess() {
420 ashish 8345
      return this.success;
8346
    }
8347
 
3430 rajveer 8348
    public void setSuccess(List<Payment> success) {
420 ashish 8349
      this.success = success;
8350
    }
8351
 
8352
    public void unsetSuccess() {
8353
      this.success = null;
8354
    }
8355
 
3430 rajveer 8356
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 8357
    public boolean isSetSuccess() {
8358
      return this.success != null;
8359
    }
8360
 
8361
    public void setSuccessIsSet(boolean value) {
8362
      if (!value) {
8363
        this.success = null;
8364
      }
8365
    }
8366
 
8367
    public PaymentException getPe() {
8368
      return this.pe;
8369
    }
8370
 
3430 rajveer 8371
    public void setPe(PaymentException pe) {
420 ashish 8372
      this.pe = pe;
8373
    }
8374
 
8375
    public void unsetPe() {
8376
      this.pe = null;
8377
    }
8378
 
3430 rajveer 8379
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 8380
    public boolean isSetPe() {
8381
      return this.pe != null;
8382
    }
8383
 
8384
    public void setPeIsSet(boolean value) {
8385
      if (!value) {
8386
        this.pe = null;
8387
      }
8388
    }
8389
 
8390
    public void setFieldValue(_Fields field, Object value) {
8391
      switch (field) {
8392
      case SUCCESS:
8393
        if (value == null) {
8394
          unsetSuccess();
8395
        } else {
695 rajveer 8396
          setSuccess((List<Payment>)value);
420 ashish 8397
        }
8398
        break;
8399
 
8400
      case PE:
8401
        if (value == null) {
8402
          unsetPe();
8403
        } else {
8404
          setPe((PaymentException)value);
8405
        }
8406
        break;
8407
 
8408
      }
8409
    }
8410
 
8411
    public Object getFieldValue(_Fields field) {
8412
      switch (field) {
8413
      case SUCCESS:
8414
        return getSuccess();
8415
 
8416
      case PE:
8417
        return getPe();
8418
 
8419
      }
8420
      throw new IllegalStateException();
8421
    }
8422
 
3430 rajveer 8423
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8424
    public boolean isSet(_Fields field) {
8425
      if (field == null) {
8426
        throw new IllegalArgumentException();
8427
      }
420 ashish 8428
 
8429
      switch (field) {
8430
      case SUCCESS:
8431
        return isSetSuccess();
8432
      case PE:
8433
        return isSetPe();
8434
      }
8435
      throw new IllegalStateException();
8436
    }
8437
 
8438
    @Override
8439
    public boolean equals(Object that) {
8440
      if (that == null)
8441
        return false;
695 rajveer 8442
      if (that instanceof getPaymentForTxnId_result)
8443
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 8444
      return false;
8445
    }
8446
 
695 rajveer 8447
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 8448
      if (that == null)
8449
        return false;
8450
 
8451
      boolean this_present_success = true && this.isSetSuccess();
8452
      boolean that_present_success = true && that.isSetSuccess();
8453
      if (this_present_success || that_present_success) {
8454
        if (!(this_present_success && that_present_success))
8455
          return false;
8456
        if (!this.success.equals(that.success))
8457
          return false;
8458
      }
8459
 
8460
      boolean this_present_pe = true && this.isSetPe();
8461
      boolean that_present_pe = true && that.isSetPe();
8462
      if (this_present_pe || that_present_pe) {
8463
        if (!(this_present_pe && that_present_pe))
8464
          return false;
8465
        if (!this.pe.equals(that.pe))
8466
          return false;
8467
      }
8468
 
8469
      return true;
8470
    }
8471
 
8472
    @Override
8473
    public int hashCode() {
8474
      return 0;
8475
    }
8476
 
695 rajveer 8477
    public int compareTo(getPaymentForTxnId_result other) {
8478
      if (!getClass().equals(other.getClass())) {
8479
        return getClass().getName().compareTo(other.getClass().getName());
8480
      }
8481
 
8482
      int lastComparison = 0;
8483
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
8484
 
3430 rajveer 8485
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 8486
      if (lastComparison != 0) {
8487
        return lastComparison;
8488
      }
3430 rajveer 8489
      if (isSetSuccess()) {
8490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8491
        if (lastComparison != 0) {
8492
          return lastComparison;
8493
        }
695 rajveer 8494
      }
3430 rajveer 8495
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 8496
      if (lastComparison != 0) {
8497
        return lastComparison;
8498
      }
3430 rajveer 8499
      if (isSetPe()) {
8500
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
8501
        if (lastComparison != 0) {
8502
          return lastComparison;
8503
        }
695 rajveer 8504
      }
8505
      return 0;
8506
    }
8507
 
3430 rajveer 8508
    public _Fields fieldForId(int fieldId) {
8509
      return _Fields.findByThriftId(fieldId);
8510
    }
8511
 
8512
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8513
      org.apache.thrift.protocol.TField field;
420 ashish 8514
      iprot.readStructBegin();
8515
      while (true)
8516
      {
8517
        field = iprot.readFieldBegin();
3430 rajveer 8518
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8519
          break;
8520
        }
3430 rajveer 8521
        switch (field.id) {
8522
          case 0: // SUCCESS
8523
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8524
              {
4600 varun.gupt 8525
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
8526
                this.success = new ArrayList<Payment>(_list28.size);
8527
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
695 rajveer 8528
                {
4600 varun.gupt 8529
                  Payment _elem30; // required
8530
                  _elem30 = new Payment();
8531
                  _elem30.read(iprot);
8532
                  this.success.add(_elem30);
695 rajveer 8533
                }
3430 rajveer 8534
                iprot.readListEnd();
420 ashish 8535
              }
3430 rajveer 8536
            } else { 
8537
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8538
            }
8539
            break;
8540
          case 1: // PE
8541
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8542
              this.pe = new PaymentException();
8543
              this.pe.read(iprot);
8544
            } else { 
8545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8546
            }
8547
            break;
8548
          default:
8549
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8550
        }
3430 rajveer 8551
        iprot.readFieldEnd();
420 ashish 8552
      }
8553
      iprot.readStructEnd();
8554
      validate();
8555
    }
8556
 
3430 rajveer 8557
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8558
      oprot.writeStructBegin(STRUCT_DESC);
8559
 
8560
      if (this.isSetSuccess()) {
8561
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 8562
        {
3430 rajveer 8563
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4600 varun.gupt 8564
          for (Payment _iter31 : this.success)
695 rajveer 8565
          {
4600 varun.gupt 8566
            _iter31.write(oprot);
695 rajveer 8567
          }
8568
          oprot.writeListEnd();
8569
        }
420 ashish 8570
        oprot.writeFieldEnd();
8571
      } else if (this.isSetPe()) {
8572
        oprot.writeFieldBegin(PE_FIELD_DESC);
8573
        this.pe.write(oprot);
8574
        oprot.writeFieldEnd();
8575
      }
8576
      oprot.writeFieldStop();
8577
      oprot.writeStructEnd();
8578
    }
8579
 
8580
    @Override
8581
    public String toString() {
695 rajveer 8582
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 8583
      boolean first = true;
8584
 
8585
      sb.append("success:");
8586
      if (this.success == null) {
8587
        sb.append("null");
8588
      } else {
8589
        sb.append(this.success);
8590
      }
8591
      first = false;
8592
      if (!first) sb.append(", ");
8593
      sb.append("pe:");
8594
      if (this.pe == null) {
8595
        sb.append("null");
8596
      } else {
8597
        sb.append(this.pe);
8598
      }
8599
      first = false;
8600
      sb.append(")");
8601
      return sb.toString();
8602
    }
8603
 
3430 rajveer 8604
    public void validate() throws org.apache.thrift.TException {
420 ashish 8605
      // check for required fields
8606
    }
8607
 
3430 rajveer 8608
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8609
      try {
8610
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8611
      } catch (org.apache.thrift.TException te) {
8612
        throw new java.io.IOException(te);
8613
      }
8614
    }
8615
 
8616
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8617
      try {
8618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8619
      } catch (org.apache.thrift.TException te) {
8620
        throw new java.io.IOException(te);
8621
      }
8622
    }
8623
 
420 ashish 8624
  }
8625
 
4600 varun.gupt 8626
  public static class getSuccessfulPaymentForTxnId_args implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_args, getSuccessfulPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
8627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_args");
8628
 
8629
    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);
8630
 
8631
    private long txnId; // required
8632
 
8633
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8634
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8635
      TXN_ID((short)1, "txnId");
8636
 
8637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8638
 
8639
      static {
8640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8641
          byName.put(field.getFieldName(), field);
8642
        }
8643
      }
8644
 
8645
      /**
8646
       * Find the _Fields constant that matches fieldId, or null if its not found.
8647
       */
8648
      public static _Fields findByThriftId(int fieldId) {
8649
        switch(fieldId) {
8650
          case 1: // TXN_ID
8651
            return TXN_ID;
8652
          default:
8653
            return null;
8654
        }
8655
      }
8656
 
8657
      /**
8658
       * Find the _Fields constant that matches fieldId, throwing an exception
8659
       * if it is not found.
8660
       */
8661
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8662
        _Fields fields = findByThriftId(fieldId);
8663
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8664
        return fields;
8665
      }
8666
 
8667
      /**
8668
       * Find the _Fields constant that matches name, or null if its not found.
8669
       */
8670
      public static _Fields findByName(String name) {
8671
        return byName.get(name);
8672
      }
8673
 
8674
      private final short _thriftId;
8675
      private final String _fieldName;
8676
 
8677
      _Fields(short thriftId, String fieldName) {
8678
        _thriftId = thriftId;
8679
        _fieldName = fieldName;
8680
      }
8681
 
8682
      public short getThriftFieldId() {
8683
        return _thriftId;
8684
      }
8685
 
8686
      public String getFieldName() {
8687
        return _fieldName;
8688
      }
8689
    }
8690
 
8691
    // isset id assignments
8692
    private static final int __TXNID_ISSET_ID = 0;
8693
    private BitSet __isset_bit_vector = new BitSet(1);
8694
 
8695
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8696
    static {
8697
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8698
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8699
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8700
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8701
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_args.class, metaDataMap);
8702
    }
8703
 
8704
    public getSuccessfulPaymentForTxnId_args() {
8705
    }
8706
 
8707
    public getSuccessfulPaymentForTxnId_args(
8708
      long txnId)
8709
    {
8710
      this();
8711
      this.txnId = txnId;
8712
      setTxnIdIsSet(true);
8713
    }
8714
 
8715
    /**
8716
     * Performs a deep copy on <i>other</i>.
8717
     */
8718
    public getSuccessfulPaymentForTxnId_args(getSuccessfulPaymentForTxnId_args other) {
8719
      __isset_bit_vector.clear();
8720
      __isset_bit_vector.or(other.__isset_bit_vector);
8721
      this.txnId = other.txnId;
8722
    }
8723
 
8724
    public getSuccessfulPaymentForTxnId_args deepCopy() {
8725
      return new getSuccessfulPaymentForTxnId_args(this);
8726
    }
8727
 
8728
    @Override
8729
    public void clear() {
8730
      setTxnIdIsSet(false);
8731
      this.txnId = 0;
8732
    }
8733
 
8734
    public long getTxnId() {
8735
      return this.txnId;
8736
    }
8737
 
8738
    public void setTxnId(long txnId) {
8739
      this.txnId = txnId;
8740
      setTxnIdIsSet(true);
8741
    }
8742
 
8743
    public void unsetTxnId() {
8744
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
8745
    }
8746
 
8747
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
8748
    public boolean isSetTxnId() {
8749
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
8750
    }
8751
 
8752
    public void setTxnIdIsSet(boolean value) {
8753
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
8754
    }
8755
 
8756
    public void setFieldValue(_Fields field, Object value) {
8757
      switch (field) {
8758
      case TXN_ID:
8759
        if (value == null) {
8760
          unsetTxnId();
8761
        } else {
8762
          setTxnId((Long)value);
8763
        }
8764
        break;
8765
 
8766
      }
8767
    }
8768
 
8769
    public Object getFieldValue(_Fields field) {
8770
      switch (field) {
8771
      case TXN_ID:
8772
        return Long.valueOf(getTxnId());
8773
 
8774
      }
8775
      throw new IllegalStateException();
8776
    }
8777
 
8778
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8779
    public boolean isSet(_Fields field) {
8780
      if (field == null) {
8781
        throw new IllegalArgumentException();
8782
      }
8783
 
8784
      switch (field) {
8785
      case TXN_ID:
8786
        return isSetTxnId();
8787
      }
8788
      throw new IllegalStateException();
8789
    }
8790
 
8791
    @Override
8792
    public boolean equals(Object that) {
8793
      if (that == null)
8794
        return false;
8795
      if (that instanceof getSuccessfulPaymentForTxnId_args)
8796
        return this.equals((getSuccessfulPaymentForTxnId_args)that);
8797
      return false;
8798
    }
8799
 
8800
    public boolean equals(getSuccessfulPaymentForTxnId_args that) {
8801
      if (that == null)
8802
        return false;
8803
 
8804
      boolean this_present_txnId = true;
8805
      boolean that_present_txnId = true;
8806
      if (this_present_txnId || that_present_txnId) {
8807
        if (!(this_present_txnId && that_present_txnId))
8808
          return false;
8809
        if (this.txnId != that.txnId)
8810
          return false;
8811
      }
8812
 
8813
      return true;
8814
    }
8815
 
8816
    @Override
8817
    public int hashCode() {
8818
      return 0;
8819
    }
8820
 
8821
    public int compareTo(getSuccessfulPaymentForTxnId_args other) {
8822
      if (!getClass().equals(other.getClass())) {
8823
        return getClass().getName().compareTo(other.getClass().getName());
8824
      }
8825
 
8826
      int lastComparison = 0;
8827
      getSuccessfulPaymentForTxnId_args typedOther = (getSuccessfulPaymentForTxnId_args)other;
8828
 
8829
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
8830
      if (lastComparison != 0) {
8831
        return lastComparison;
8832
      }
8833
      if (isSetTxnId()) {
8834
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
8835
        if (lastComparison != 0) {
8836
          return lastComparison;
8837
        }
8838
      }
8839
      return 0;
8840
    }
8841
 
8842
    public _Fields fieldForId(int fieldId) {
8843
      return _Fields.findByThriftId(fieldId);
8844
    }
8845
 
8846
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8847
      org.apache.thrift.protocol.TField field;
8848
      iprot.readStructBegin();
8849
      while (true)
8850
      {
8851
        field = iprot.readFieldBegin();
8852
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8853
          break;
8854
        }
8855
        switch (field.id) {
8856
          case 1: // TXN_ID
8857
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8858
              this.txnId = iprot.readI64();
8859
              setTxnIdIsSet(true);
8860
            } else { 
8861
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8862
            }
8863
            break;
8864
          default:
8865
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8866
        }
8867
        iprot.readFieldEnd();
8868
      }
8869
      iprot.readStructEnd();
8870
      validate();
8871
    }
8872
 
8873
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8874
      validate();
8875
 
8876
      oprot.writeStructBegin(STRUCT_DESC);
8877
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
8878
      oprot.writeI64(this.txnId);
8879
      oprot.writeFieldEnd();
8880
      oprot.writeFieldStop();
8881
      oprot.writeStructEnd();
8882
    }
8883
 
8884
    @Override
8885
    public String toString() {
8886
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_args(");
8887
      boolean first = true;
8888
 
8889
      sb.append("txnId:");
8890
      sb.append(this.txnId);
8891
      first = false;
8892
      sb.append(")");
8893
      return sb.toString();
8894
    }
8895
 
8896
    public void validate() throws org.apache.thrift.TException {
8897
      // check for required fields
8898
    }
8899
 
8900
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8901
      try {
8902
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8903
      } catch (org.apache.thrift.TException te) {
8904
        throw new java.io.IOException(te);
8905
      }
8906
    }
8907
 
8908
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8909
      try {
8910
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8911
        __isset_bit_vector = new BitSet(1);
8912
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8913
      } catch (org.apache.thrift.TException te) {
8914
        throw new java.io.IOException(te);
8915
      }
8916
    }
8917
 
8918
  }
8919
 
8920
  public static class getSuccessfulPaymentForTxnId_result implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_result, getSuccessfulPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
8921
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_result");
8922
 
8923
    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);
8924
    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);
8925
 
8926
    private Payment success; // required
8927
    private PaymentException pe; // required
8928
 
8929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8931
      SUCCESS((short)0, "success"),
8932
      PE((short)1, "pe");
8933
 
8934
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8935
 
8936
      static {
8937
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8938
          byName.put(field.getFieldName(), field);
8939
        }
8940
      }
8941
 
8942
      /**
8943
       * Find the _Fields constant that matches fieldId, or null if its not found.
8944
       */
8945
      public static _Fields findByThriftId(int fieldId) {
8946
        switch(fieldId) {
8947
          case 0: // SUCCESS
8948
            return SUCCESS;
8949
          case 1: // PE
8950
            return PE;
8951
          default:
8952
            return null;
8953
        }
8954
      }
8955
 
8956
      /**
8957
       * Find the _Fields constant that matches fieldId, throwing an exception
8958
       * if it is not found.
8959
       */
8960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8961
        _Fields fields = findByThriftId(fieldId);
8962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8963
        return fields;
8964
      }
8965
 
8966
      /**
8967
       * Find the _Fields constant that matches name, or null if its not found.
8968
       */
8969
      public static _Fields findByName(String name) {
8970
        return byName.get(name);
8971
      }
8972
 
8973
      private final short _thriftId;
8974
      private final String _fieldName;
8975
 
8976
      _Fields(short thriftId, String fieldName) {
8977
        _thriftId = thriftId;
8978
        _fieldName = fieldName;
8979
      }
8980
 
8981
      public short getThriftFieldId() {
8982
        return _thriftId;
8983
      }
8984
 
8985
      public String getFieldName() {
8986
        return _fieldName;
8987
      }
8988
    }
8989
 
8990
    // isset id assignments
8991
 
8992
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8993
    static {
8994
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8995
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8996
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
8997
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8998
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8999
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9000
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_result.class, metaDataMap);
9001
    }
9002
 
9003
    public getSuccessfulPaymentForTxnId_result() {
9004
    }
9005
 
9006
    public getSuccessfulPaymentForTxnId_result(
9007
      Payment success,
9008
      PaymentException pe)
9009
    {
9010
      this();
9011
      this.success = success;
9012
      this.pe = pe;
9013
    }
9014
 
9015
    /**
9016
     * Performs a deep copy on <i>other</i>.
9017
     */
9018
    public getSuccessfulPaymentForTxnId_result(getSuccessfulPaymentForTxnId_result other) {
9019
      if (other.isSetSuccess()) {
9020
        this.success = new Payment(other.success);
9021
      }
9022
      if (other.isSetPe()) {
9023
        this.pe = new PaymentException(other.pe);
9024
      }
9025
    }
9026
 
9027
    public getSuccessfulPaymentForTxnId_result deepCopy() {
9028
      return new getSuccessfulPaymentForTxnId_result(this);
9029
    }
9030
 
9031
    @Override
9032
    public void clear() {
9033
      this.success = null;
9034
      this.pe = null;
9035
    }
9036
 
9037
    public Payment getSuccess() {
9038
      return this.success;
9039
    }
9040
 
9041
    public void setSuccess(Payment success) {
9042
      this.success = success;
9043
    }
9044
 
9045
    public void unsetSuccess() {
9046
      this.success = null;
9047
    }
9048
 
9049
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9050
    public boolean isSetSuccess() {
9051
      return this.success != null;
9052
    }
9053
 
9054
    public void setSuccessIsSet(boolean value) {
9055
      if (!value) {
9056
        this.success = null;
9057
      }
9058
    }
9059
 
9060
    public PaymentException getPe() {
9061
      return this.pe;
9062
    }
9063
 
9064
    public void setPe(PaymentException pe) {
9065
      this.pe = pe;
9066
    }
9067
 
9068
    public void unsetPe() {
9069
      this.pe = null;
9070
    }
9071
 
9072
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
9073
    public boolean isSetPe() {
9074
      return this.pe != null;
9075
    }
9076
 
9077
    public void setPeIsSet(boolean value) {
9078
      if (!value) {
9079
        this.pe = null;
9080
      }
9081
    }
9082
 
9083
    public void setFieldValue(_Fields field, Object value) {
9084
      switch (field) {
9085
      case SUCCESS:
9086
        if (value == null) {
9087
          unsetSuccess();
9088
        } else {
9089
          setSuccess((Payment)value);
9090
        }
9091
        break;
9092
 
9093
      case PE:
9094
        if (value == null) {
9095
          unsetPe();
9096
        } else {
9097
          setPe((PaymentException)value);
9098
        }
9099
        break;
9100
 
9101
      }
9102
    }
9103
 
9104
    public Object getFieldValue(_Fields field) {
9105
      switch (field) {
9106
      case SUCCESS:
9107
        return getSuccess();
9108
 
9109
      case PE:
9110
        return getPe();
9111
 
9112
      }
9113
      throw new IllegalStateException();
9114
    }
9115
 
9116
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9117
    public boolean isSet(_Fields field) {
9118
      if (field == null) {
9119
        throw new IllegalArgumentException();
9120
      }
9121
 
9122
      switch (field) {
9123
      case SUCCESS:
9124
        return isSetSuccess();
9125
      case PE:
9126
        return isSetPe();
9127
      }
9128
      throw new IllegalStateException();
9129
    }
9130
 
9131
    @Override
9132
    public boolean equals(Object that) {
9133
      if (that == null)
9134
        return false;
9135
      if (that instanceof getSuccessfulPaymentForTxnId_result)
9136
        return this.equals((getSuccessfulPaymentForTxnId_result)that);
9137
      return false;
9138
    }
9139
 
9140
    public boolean equals(getSuccessfulPaymentForTxnId_result that) {
9141
      if (that == null)
9142
        return false;
9143
 
9144
      boolean this_present_success = true && this.isSetSuccess();
9145
      boolean that_present_success = true && that.isSetSuccess();
9146
      if (this_present_success || that_present_success) {
9147
        if (!(this_present_success && that_present_success))
9148
          return false;
9149
        if (!this.success.equals(that.success))
9150
          return false;
9151
      }
9152
 
9153
      boolean this_present_pe = true && this.isSetPe();
9154
      boolean that_present_pe = true && that.isSetPe();
9155
      if (this_present_pe || that_present_pe) {
9156
        if (!(this_present_pe && that_present_pe))
9157
          return false;
9158
        if (!this.pe.equals(that.pe))
9159
          return false;
9160
      }
9161
 
9162
      return true;
9163
    }
9164
 
9165
    @Override
9166
    public int hashCode() {
9167
      return 0;
9168
    }
9169
 
9170
    public int compareTo(getSuccessfulPaymentForTxnId_result other) {
9171
      if (!getClass().equals(other.getClass())) {
9172
        return getClass().getName().compareTo(other.getClass().getName());
9173
      }
9174
 
9175
      int lastComparison = 0;
9176
      getSuccessfulPaymentForTxnId_result typedOther = (getSuccessfulPaymentForTxnId_result)other;
9177
 
9178
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9179
      if (lastComparison != 0) {
9180
        return lastComparison;
9181
      }
9182
      if (isSetSuccess()) {
9183
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9184
        if (lastComparison != 0) {
9185
          return lastComparison;
9186
        }
9187
      }
9188
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
9189
      if (lastComparison != 0) {
9190
        return lastComparison;
9191
      }
9192
      if (isSetPe()) {
9193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
9194
        if (lastComparison != 0) {
9195
          return lastComparison;
9196
        }
9197
      }
9198
      return 0;
9199
    }
9200
 
9201
    public _Fields fieldForId(int fieldId) {
9202
      return _Fields.findByThriftId(fieldId);
9203
    }
9204
 
9205
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9206
      org.apache.thrift.protocol.TField field;
9207
      iprot.readStructBegin();
9208
      while (true)
9209
      {
9210
        field = iprot.readFieldBegin();
9211
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9212
          break;
9213
        }
9214
        switch (field.id) {
9215
          case 0: // SUCCESS
9216
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9217
              this.success = new Payment();
9218
              this.success.read(iprot);
9219
            } else { 
9220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9221
            }
9222
            break;
9223
          case 1: // PE
9224
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9225
              this.pe = new PaymentException();
9226
              this.pe.read(iprot);
9227
            } else { 
9228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9229
            }
9230
            break;
9231
          default:
9232
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9233
        }
9234
        iprot.readFieldEnd();
9235
      }
9236
      iprot.readStructEnd();
9237
      validate();
9238
    }
9239
 
9240
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9241
      oprot.writeStructBegin(STRUCT_DESC);
9242
 
9243
      if (this.isSetSuccess()) {
9244
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9245
        this.success.write(oprot);
9246
        oprot.writeFieldEnd();
9247
      } else if (this.isSetPe()) {
9248
        oprot.writeFieldBegin(PE_FIELD_DESC);
9249
        this.pe.write(oprot);
9250
        oprot.writeFieldEnd();
9251
      }
9252
      oprot.writeFieldStop();
9253
      oprot.writeStructEnd();
9254
    }
9255
 
9256
    @Override
9257
    public String toString() {
9258
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_result(");
9259
      boolean first = true;
9260
 
9261
      sb.append("success:");
9262
      if (this.success == null) {
9263
        sb.append("null");
9264
      } else {
9265
        sb.append(this.success);
9266
      }
9267
      first = false;
9268
      if (!first) sb.append(", ");
9269
      sb.append("pe:");
9270
      if (this.pe == null) {
9271
        sb.append("null");
9272
      } else {
9273
        sb.append(this.pe);
9274
      }
9275
      first = false;
9276
      sb.append(")");
9277
      return sb.toString();
9278
    }
9279
 
9280
    public void validate() throws org.apache.thrift.TException {
9281
      // check for required fields
9282
    }
9283
 
9284
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9285
      try {
9286
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9287
      } catch (org.apache.thrift.TException te) {
9288
        throw new java.io.IOException(te);
9289
      }
9290
    }
9291
 
9292
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9293
      try {
9294
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9295
      } catch (org.apache.thrift.TException te) {
9296
        throw new java.io.IOException(te);
9297
      }
9298
    }
9299
 
9300
  }
9301
 
3430 rajveer 9302
  public static class updatePaymentDetails_args implements org.apache.thrift.TBase<updatePaymentDetails_args, updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable   {
9303
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_args");
420 ashish 9304
 
3430 rajveer 9305
    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);
9306
    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);
9307
    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);
9308
    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);
9309
    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);
9310
    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);
9311
    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);
9312
    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);
9313
    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);
9314
    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);
9315
    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);
9316
    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 9317
 
3430 rajveer 9318
    private long id; // required
9319
    private String gatewayPaymentId; // required
9320
    private String sessionId; // required
9321
    private String gatewayTxnStatus; // required
9322
    private String description; // required
9323
    private String gatewayTxnId; // required
9324
    private String authCode; // required
9325
    private String referenceCode; // required
9326
    private String errorCode; // required
9327
    private PaymentStatus status; // required
9328
    private String gatewayTxnDate; // required
9329
    private List<Attribute> attributes; // required
420 ashish 9330
 
9331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9332
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 9333
      ID((short)1, "id"),
695 rajveer 9334
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
9335
      SESSION_ID((short)3, "sessionId"),
9336
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
9337
      DESCRIPTION((short)5, "description"),
9338
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
9339
      AUTH_CODE((short)7, "authCode"),
9340
      REFERENCE_CODE((short)8, "referenceCode"),
9341
      ERROR_CODE((short)9, "errorCode"),
9342
      /**
9343
       * 
9344
       * @see PaymentStatus
9345
       */
9346
      STATUS((short)10, "status"),
1119 rajveer 9347
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
9348
      ATTRIBUTES((short)12, "attributes");
420 ashish 9349
 
9350
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9351
 
9352
      static {
9353
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9354
          byName.put(field.getFieldName(), field);
9355
        }
9356
      }
9357
 
9358
      /**
9359
       * Find the _Fields constant that matches fieldId, or null if its not found.
9360
       */
9361
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9362
        switch(fieldId) {
9363
          case 1: // ID
9364
            return ID;
9365
          case 2: // GATEWAY_PAYMENT_ID
9366
            return GATEWAY_PAYMENT_ID;
9367
          case 3: // SESSION_ID
9368
            return SESSION_ID;
9369
          case 4: // GATEWAY_TXN_STATUS
9370
            return GATEWAY_TXN_STATUS;
9371
          case 5: // DESCRIPTION
9372
            return DESCRIPTION;
9373
          case 6: // GATEWAY_TXN_ID
9374
            return GATEWAY_TXN_ID;
9375
          case 7: // AUTH_CODE
9376
            return AUTH_CODE;
9377
          case 8: // REFERENCE_CODE
9378
            return REFERENCE_CODE;
9379
          case 9: // ERROR_CODE
9380
            return ERROR_CODE;
9381
          case 10: // STATUS
9382
            return STATUS;
9383
          case 11: // GATEWAY_TXN_DATE
9384
            return GATEWAY_TXN_DATE;
9385
          case 12: // ATTRIBUTES
9386
            return ATTRIBUTES;
9387
          default:
9388
            return null;
9389
        }
420 ashish 9390
      }
9391
 
9392
      /**
9393
       * Find the _Fields constant that matches fieldId, throwing an exception
9394
       * if it is not found.
9395
       */
9396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9397
        _Fields fields = findByThriftId(fieldId);
9398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9399
        return fields;
9400
      }
9401
 
9402
      /**
9403
       * Find the _Fields constant that matches name, or null if its not found.
9404
       */
9405
      public static _Fields findByName(String name) {
9406
        return byName.get(name);
9407
      }
9408
 
9409
      private final short _thriftId;
9410
      private final String _fieldName;
9411
 
9412
      _Fields(short thriftId, String fieldName) {
9413
        _thriftId = thriftId;
9414
        _fieldName = fieldName;
9415
      }
9416
 
9417
      public short getThriftFieldId() {
9418
        return _thriftId;
9419
      }
9420
 
9421
      public String getFieldName() {
9422
        return _fieldName;
9423
      }
9424
    }
9425
 
9426
    // isset id assignments
9427
    private static final int __ID_ISSET_ID = 0;
9428
    private BitSet __isset_bit_vector = new BitSet(1);
9429
 
3430 rajveer 9430
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 9431
    static {
3430 rajveer 9432
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9433
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9434
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9435
      tmpMap.put(_Fields.GATEWAY_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9436
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9437
      tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9438
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9439
      tmpMap.put(_Fields.GATEWAY_TXN_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9440
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9441
      tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9442
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9443
      tmpMap.put(_Fields.GATEWAY_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9444
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9445
      tmpMap.put(_Fields.AUTH_CODE, new org.apache.thrift.meta_data.FieldMetaData("authCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9446
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9447
      tmpMap.put(_Fields.REFERENCE_CODE, new org.apache.thrift.meta_data.FieldMetaData("referenceCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9448
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9449
      tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9450
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9451
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9452
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
9453
      tmpMap.put(_Fields.GATEWAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9454
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9455
      tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9456
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9457
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
9458
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9459
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 9460
    }
9461
 
695 rajveer 9462
    public updatePaymentDetails_args() {
420 ashish 9463
    }
9464
 
695 rajveer 9465
    public updatePaymentDetails_args(
420 ashish 9466
      long id,
695 rajveer 9467
      String gatewayPaymentId,
9468
      String sessionId,
9469
      String gatewayTxnStatus,
9470
      String description,
9471
      String gatewayTxnId,
9472
      String authCode,
9473
      String referenceCode,
9474
      String errorCode,
9475
      PaymentStatus status,
1119 rajveer 9476
      String gatewayTxnDate,
695 rajveer 9477
      List<Attribute> attributes)
420 ashish 9478
    {
9479
      this();
9480
      this.id = id;
9481
      setIdIsSet(true);
695 rajveer 9482
      this.gatewayPaymentId = gatewayPaymentId;
9483
      this.sessionId = sessionId;
9484
      this.gatewayTxnStatus = gatewayTxnStatus;
9485
      this.description = description;
9486
      this.gatewayTxnId = gatewayTxnId;
9487
      this.authCode = authCode;
9488
      this.referenceCode = referenceCode;
9489
      this.errorCode = errorCode;
9490
      this.status = status;
1119 rajveer 9491
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 9492
      this.attributes = attributes;
420 ashish 9493
    }
9494
 
9495
    /**
9496
     * Performs a deep copy on <i>other</i>.
9497
     */
695 rajveer 9498
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 9499
      __isset_bit_vector.clear();
9500
      __isset_bit_vector.or(other.__isset_bit_vector);
9501
      this.id = other.id;
695 rajveer 9502
      if (other.isSetGatewayPaymentId()) {
9503
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 9504
      }
695 rajveer 9505
      if (other.isSetSessionId()) {
9506
        this.sessionId = other.sessionId;
420 ashish 9507
      }
695 rajveer 9508
      if (other.isSetGatewayTxnStatus()) {
9509
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 9510
      }
695 rajveer 9511
      if (other.isSetDescription()) {
9512
        this.description = other.description;
420 ashish 9513
      }
695 rajveer 9514
      if (other.isSetGatewayTxnId()) {
9515
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 9516
      }
695 rajveer 9517
      if (other.isSetAuthCode()) {
9518
        this.authCode = other.authCode;
420 ashish 9519
      }
695 rajveer 9520
      if (other.isSetReferenceCode()) {
9521
        this.referenceCode = other.referenceCode;
420 ashish 9522
      }
695 rajveer 9523
      if (other.isSetErrorCode()) {
9524
        this.errorCode = other.errorCode;
9525
      }
9526
      if (other.isSetStatus()) {
9527
        this.status = other.status;
9528
      }
1119 rajveer 9529
      if (other.isSetGatewayTxnDate()) {
9530
        this.gatewayTxnDate = other.gatewayTxnDate;
9531
      }
695 rajveer 9532
      if (other.isSetAttributes()) {
9533
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
9534
        for (Attribute other_element : other.attributes) {
9535
          __this__attributes.add(new Attribute(other_element));
9536
        }
9537
        this.attributes = __this__attributes;
9538
      }
420 ashish 9539
    }
9540
 
695 rajveer 9541
    public updatePaymentDetails_args deepCopy() {
9542
      return new updatePaymentDetails_args(this);
420 ashish 9543
    }
9544
 
3430 rajveer 9545
    @Override
9546
    public void clear() {
9547
      setIdIsSet(false);
9548
      this.id = 0;
9549
      this.gatewayPaymentId = null;
9550
      this.sessionId = null;
9551
      this.gatewayTxnStatus = null;
9552
      this.description = null;
9553
      this.gatewayTxnId = null;
9554
      this.authCode = null;
9555
      this.referenceCode = null;
9556
      this.errorCode = null;
9557
      this.status = null;
9558
      this.gatewayTxnDate = null;
9559
      this.attributes = null;
420 ashish 9560
    }
9561
 
9562
    public long getId() {
9563
      return this.id;
9564
    }
9565
 
3430 rajveer 9566
    public void setId(long id) {
420 ashish 9567
      this.id = id;
9568
      setIdIsSet(true);
9569
    }
9570
 
9571
    public void unsetId() {
9572
      __isset_bit_vector.clear(__ID_ISSET_ID);
9573
    }
9574
 
3430 rajveer 9575
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 9576
    public boolean isSetId() {
9577
      return __isset_bit_vector.get(__ID_ISSET_ID);
9578
    }
9579
 
9580
    public void setIdIsSet(boolean value) {
9581
      __isset_bit_vector.set(__ID_ISSET_ID, value);
9582
    }
9583
 
695 rajveer 9584
    public String getGatewayPaymentId() {
9585
      return this.gatewayPaymentId;
420 ashish 9586
    }
9587
 
3430 rajveer 9588
    public void setGatewayPaymentId(String gatewayPaymentId) {
695 rajveer 9589
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 9590
    }
9591
 
695 rajveer 9592
    public void unsetGatewayPaymentId() {
9593
      this.gatewayPaymentId = null;
420 ashish 9594
    }
9595
 
3430 rajveer 9596
    /** Returns true if field gatewayPaymentId is set (has been assigned a value) and false otherwise */
695 rajveer 9597
    public boolean isSetGatewayPaymentId() {
9598
      return this.gatewayPaymentId != null;
420 ashish 9599
    }
9600
 
695 rajveer 9601
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 9602
      if (!value) {
695 rajveer 9603
        this.gatewayPaymentId = null;
420 ashish 9604
      }
9605
    }
9606
 
695 rajveer 9607
    public String getSessionId() {
9608
      return this.sessionId;
420 ashish 9609
    }
9610
 
3430 rajveer 9611
    public void setSessionId(String sessionId) {
695 rajveer 9612
      this.sessionId = sessionId;
420 ashish 9613
    }
9614
 
695 rajveer 9615
    public void unsetSessionId() {
9616
      this.sessionId = null;
420 ashish 9617
    }
9618
 
3430 rajveer 9619
    /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
695 rajveer 9620
    public boolean isSetSessionId() {
9621
      return this.sessionId != null;
420 ashish 9622
    }
9623
 
695 rajveer 9624
    public void setSessionIdIsSet(boolean value) {
420 ashish 9625
      if (!value) {
695 rajveer 9626
        this.sessionId = null;
420 ashish 9627
      }
9628
    }
9629
 
695 rajveer 9630
    public String getGatewayTxnStatus() {
9631
      return this.gatewayTxnStatus;
420 ashish 9632
    }
9633
 
3430 rajveer 9634
    public void setGatewayTxnStatus(String gatewayTxnStatus) {
695 rajveer 9635
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 9636
    }
9637
 
695 rajveer 9638
    public void unsetGatewayTxnStatus() {
9639
      this.gatewayTxnStatus = null;
420 ashish 9640
    }
9641
 
3430 rajveer 9642
    /** Returns true if field gatewayTxnStatus is set (has been assigned a value) and false otherwise */
695 rajveer 9643
    public boolean isSetGatewayTxnStatus() {
9644
      return this.gatewayTxnStatus != null;
420 ashish 9645
    }
9646
 
695 rajveer 9647
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 9648
      if (!value) {
695 rajveer 9649
        this.gatewayTxnStatus = null;
420 ashish 9650
      }
9651
    }
9652
 
695 rajveer 9653
    public String getDescription() {
9654
      return this.description;
420 ashish 9655
    }
9656
 
3430 rajveer 9657
    public void setDescription(String description) {
695 rajveer 9658
      this.description = description;
420 ashish 9659
    }
9660
 
695 rajveer 9661
    public void unsetDescription() {
9662
      this.description = null;
420 ashish 9663
    }
9664
 
3430 rajveer 9665
    /** Returns true if field description is set (has been assigned a value) and false otherwise */
695 rajveer 9666
    public boolean isSetDescription() {
9667
      return this.description != null;
420 ashish 9668
    }
9669
 
695 rajveer 9670
    public void setDescriptionIsSet(boolean value) {
420 ashish 9671
      if (!value) {
695 rajveer 9672
        this.description = null;
420 ashish 9673
      }
9674
    }
9675
 
695 rajveer 9676
    public String getGatewayTxnId() {
9677
      return this.gatewayTxnId;
420 ashish 9678
    }
9679
 
3430 rajveer 9680
    public void setGatewayTxnId(String gatewayTxnId) {
695 rajveer 9681
      this.gatewayTxnId = gatewayTxnId;
420 ashish 9682
    }
9683
 
695 rajveer 9684
    public void unsetGatewayTxnId() {
9685
      this.gatewayTxnId = null;
420 ashish 9686
    }
9687
 
3430 rajveer 9688
    /** Returns true if field gatewayTxnId is set (has been assigned a value) and false otherwise */
695 rajveer 9689
    public boolean isSetGatewayTxnId() {
9690
      return this.gatewayTxnId != null;
420 ashish 9691
    }
9692
 
695 rajveer 9693
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 9694
      if (!value) {
695 rajveer 9695
        this.gatewayTxnId = null;
420 ashish 9696
      }
9697
    }
9698
 
695 rajveer 9699
    public String getAuthCode() {
9700
      return this.authCode;
420 ashish 9701
    }
9702
 
3430 rajveer 9703
    public void setAuthCode(String authCode) {
695 rajveer 9704
      this.authCode = authCode;
420 ashish 9705
    }
9706
 
695 rajveer 9707
    public void unsetAuthCode() {
9708
      this.authCode = null;
420 ashish 9709
    }
9710
 
3430 rajveer 9711
    /** Returns true if field authCode is set (has been assigned a value) and false otherwise */
695 rajveer 9712
    public boolean isSetAuthCode() {
9713
      return this.authCode != null;
420 ashish 9714
    }
9715
 
695 rajveer 9716
    public void setAuthCodeIsSet(boolean value) {
420 ashish 9717
      if (!value) {
695 rajveer 9718
        this.authCode = null;
420 ashish 9719
      }
9720
    }
9721
 
695 rajveer 9722
    public String getReferenceCode() {
9723
      return this.referenceCode;
420 ashish 9724
    }
9725
 
3430 rajveer 9726
    public void setReferenceCode(String referenceCode) {
695 rajveer 9727
      this.referenceCode = referenceCode;
420 ashish 9728
    }
9729
 
695 rajveer 9730
    public void unsetReferenceCode() {
9731
      this.referenceCode = null;
420 ashish 9732
    }
9733
 
3430 rajveer 9734
    /** Returns true if field referenceCode is set (has been assigned a value) and false otherwise */
695 rajveer 9735
    public boolean isSetReferenceCode() {
9736
      return this.referenceCode != null;
420 ashish 9737
    }
9738
 
695 rajveer 9739
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 9740
      if (!value) {
695 rajveer 9741
        this.referenceCode = null;
420 ashish 9742
      }
9743
    }
9744
 
695 rajveer 9745
    public String getErrorCode() {
9746
      return this.errorCode;
9747
    }
9748
 
3430 rajveer 9749
    public void setErrorCode(String errorCode) {
695 rajveer 9750
      this.errorCode = errorCode;
9751
    }
9752
 
9753
    public void unsetErrorCode() {
9754
      this.errorCode = null;
9755
    }
9756
 
3430 rajveer 9757
    /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
695 rajveer 9758
    public boolean isSetErrorCode() {
9759
      return this.errorCode != null;
9760
    }
9761
 
9762
    public void setErrorCodeIsSet(boolean value) {
9763
      if (!value) {
9764
        this.errorCode = null;
9765
      }
9766
    }
9767
 
9768
    /**
9769
     * 
9770
     * @see PaymentStatus
9771
     */
9772
    public PaymentStatus getStatus() {
9773
      return this.status;
9774
    }
9775
 
9776
    /**
9777
     * 
9778
     * @see PaymentStatus
9779
     */
3430 rajveer 9780
    public void setStatus(PaymentStatus status) {
695 rajveer 9781
      this.status = status;
9782
    }
9783
 
9784
    public void unsetStatus() {
9785
      this.status = null;
9786
    }
9787
 
3430 rajveer 9788
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
695 rajveer 9789
    public boolean isSetStatus() {
9790
      return this.status != null;
9791
    }
9792
 
9793
    public void setStatusIsSet(boolean value) {
9794
      if (!value) {
9795
        this.status = null;
9796
      }
9797
    }
9798
 
1119 rajveer 9799
    public String getGatewayTxnDate() {
9800
      return this.gatewayTxnDate;
9801
    }
9802
 
3430 rajveer 9803
    public void setGatewayTxnDate(String gatewayTxnDate) {
1119 rajveer 9804
      this.gatewayTxnDate = gatewayTxnDate;
9805
    }
9806
 
9807
    public void unsetGatewayTxnDate() {
9808
      this.gatewayTxnDate = null;
9809
    }
9810
 
3430 rajveer 9811
    /** Returns true if field gatewayTxnDate is set (has been assigned a value) and false otherwise */
1119 rajveer 9812
    public boolean isSetGatewayTxnDate() {
9813
      return this.gatewayTxnDate != null;
9814
    }
9815
 
9816
    public void setGatewayTxnDateIsSet(boolean value) {
9817
      if (!value) {
9818
        this.gatewayTxnDate = null;
9819
      }
9820
    }
9821
 
695 rajveer 9822
    public int getAttributesSize() {
9823
      return (this.attributes == null) ? 0 : this.attributes.size();
9824
    }
9825
 
9826
    public java.util.Iterator<Attribute> getAttributesIterator() {
9827
      return (this.attributes == null) ? null : this.attributes.iterator();
9828
    }
9829
 
9830
    public void addToAttributes(Attribute elem) {
9831
      if (this.attributes == null) {
9832
        this.attributes = new ArrayList<Attribute>();
9833
      }
9834
      this.attributes.add(elem);
9835
    }
9836
 
9837
    public List<Attribute> getAttributes() {
9838
      return this.attributes;
9839
    }
9840
 
3430 rajveer 9841
    public void setAttributes(List<Attribute> attributes) {
695 rajveer 9842
      this.attributes = attributes;
9843
    }
9844
 
9845
    public void unsetAttributes() {
9846
      this.attributes = null;
9847
    }
9848
 
3430 rajveer 9849
    /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
695 rajveer 9850
    public boolean isSetAttributes() {
9851
      return this.attributes != null;
9852
    }
9853
 
9854
    public void setAttributesIsSet(boolean value) {
9855
      if (!value) {
9856
        this.attributes = null;
9857
      }
9858
    }
9859
 
420 ashish 9860
    public void setFieldValue(_Fields field, Object value) {
9861
      switch (field) {
9862
      case ID:
9863
        if (value == null) {
9864
          unsetId();
9865
        } else {
9866
          setId((Long)value);
9867
        }
9868
        break;
9869
 
695 rajveer 9870
      case GATEWAY_PAYMENT_ID:
420 ashish 9871
        if (value == null) {
695 rajveer 9872
          unsetGatewayPaymentId();
420 ashish 9873
        } else {
695 rajveer 9874
          setGatewayPaymentId((String)value);
420 ashish 9875
        }
9876
        break;
9877
 
695 rajveer 9878
      case SESSION_ID:
420 ashish 9879
        if (value == null) {
695 rajveer 9880
          unsetSessionId();
420 ashish 9881
        } else {
695 rajveer 9882
          setSessionId((String)value);
420 ashish 9883
        }
9884
        break;
9885
 
695 rajveer 9886
      case GATEWAY_TXN_STATUS:
420 ashish 9887
        if (value == null) {
695 rajveer 9888
          unsetGatewayTxnStatus();
420 ashish 9889
        } else {
695 rajveer 9890
          setGatewayTxnStatus((String)value);
420 ashish 9891
        }
9892
        break;
9893
 
695 rajveer 9894
      case DESCRIPTION:
420 ashish 9895
        if (value == null) {
695 rajveer 9896
          unsetDescription();
420 ashish 9897
        } else {
695 rajveer 9898
          setDescription((String)value);
420 ashish 9899
        }
9900
        break;
9901
 
695 rajveer 9902
      case GATEWAY_TXN_ID:
420 ashish 9903
        if (value == null) {
695 rajveer 9904
          unsetGatewayTxnId();
420 ashish 9905
        } else {
695 rajveer 9906
          setGatewayTxnId((String)value);
420 ashish 9907
        }
9908
        break;
9909
 
9910
      case AUTH_CODE:
9911
        if (value == null) {
695 rajveer 9912
          unsetAuthCode();
420 ashish 9913
        } else {
695 rajveer 9914
          setAuthCode((String)value);
420 ashish 9915
        }
9916
        break;
9917
 
695 rajveer 9918
      case REFERENCE_CODE:
420 ashish 9919
        if (value == null) {
695 rajveer 9920
          unsetReferenceCode();
420 ashish 9921
        } else {
695 rajveer 9922
          setReferenceCode((String)value);
420 ashish 9923
        }
9924
        break;
9925
 
695 rajveer 9926
      case ERROR_CODE:
9927
        if (value == null) {
9928
          unsetErrorCode();
9929
        } else {
9930
          setErrorCode((String)value);
9931
        }
9932
        break;
9933
 
9934
      case STATUS:
9935
        if (value == null) {
9936
          unsetStatus();
9937
        } else {
9938
          setStatus((PaymentStatus)value);
9939
        }
9940
        break;
9941
 
1119 rajveer 9942
      case GATEWAY_TXN_DATE:
9943
        if (value == null) {
9944
          unsetGatewayTxnDate();
9945
        } else {
9946
          setGatewayTxnDate((String)value);
9947
        }
9948
        break;
9949
 
695 rajveer 9950
      case ATTRIBUTES:
9951
        if (value == null) {
9952
          unsetAttributes();
9953
        } else {
9954
          setAttributes((List<Attribute>)value);
9955
        }
9956
        break;
9957
 
420 ashish 9958
      }
9959
    }
9960
 
9961
    public Object getFieldValue(_Fields field) {
9962
      switch (field) {
9963
      case ID:
3430 rajveer 9964
        return Long.valueOf(getId());
420 ashish 9965
 
695 rajveer 9966
      case GATEWAY_PAYMENT_ID:
9967
        return getGatewayPaymentId();
420 ashish 9968
 
695 rajveer 9969
      case SESSION_ID:
9970
        return getSessionId();
420 ashish 9971
 
695 rajveer 9972
      case GATEWAY_TXN_STATUS:
9973
        return getGatewayTxnStatus();
420 ashish 9974
 
695 rajveer 9975
      case DESCRIPTION:
9976
        return getDescription();
420 ashish 9977
 
695 rajveer 9978
      case GATEWAY_TXN_ID:
9979
        return getGatewayTxnId();
420 ashish 9980
 
9981
      case AUTH_CODE:
695 rajveer 9982
        return getAuthCode();
420 ashish 9983
 
695 rajveer 9984
      case REFERENCE_CODE:
9985
        return getReferenceCode();
420 ashish 9986
 
695 rajveer 9987
      case ERROR_CODE:
9988
        return getErrorCode();
9989
 
9990
      case STATUS:
9991
        return getStatus();
9992
 
1119 rajveer 9993
      case GATEWAY_TXN_DATE:
9994
        return getGatewayTxnDate();
9995
 
695 rajveer 9996
      case ATTRIBUTES:
9997
        return getAttributes();
9998
 
420 ashish 9999
      }
10000
      throw new IllegalStateException();
10001
    }
10002
 
3430 rajveer 10003
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10004
    public boolean isSet(_Fields field) {
10005
      if (field == null) {
10006
        throw new IllegalArgumentException();
10007
      }
420 ashish 10008
 
10009
      switch (field) {
10010
      case ID:
10011
        return isSetId();
695 rajveer 10012
      case GATEWAY_PAYMENT_ID:
10013
        return isSetGatewayPaymentId();
420 ashish 10014
      case SESSION_ID:
695 rajveer 10015
        return isSetSessionId();
10016
      case GATEWAY_TXN_STATUS:
10017
        return isSetGatewayTxnStatus();
10018
      case DESCRIPTION:
10019
        return isSetDescription();
10020
      case GATEWAY_TXN_ID:
10021
        return isSetGatewayTxnId();
420 ashish 10022
      case AUTH_CODE:
695 rajveer 10023
        return isSetAuthCode();
10024
      case REFERENCE_CODE:
10025
        return isSetReferenceCode();
10026
      case ERROR_CODE:
10027
        return isSetErrorCode();
10028
      case STATUS:
10029
        return isSetStatus();
1119 rajveer 10030
      case GATEWAY_TXN_DATE:
10031
        return isSetGatewayTxnDate();
695 rajveer 10032
      case ATTRIBUTES:
10033
        return isSetAttributes();
420 ashish 10034
      }
10035
      throw new IllegalStateException();
10036
    }
10037
 
10038
    @Override
10039
    public boolean equals(Object that) {
10040
      if (that == null)
10041
        return false;
695 rajveer 10042
      if (that instanceof updatePaymentDetails_args)
10043
        return this.equals((updatePaymentDetails_args)that);
420 ashish 10044
      return false;
10045
    }
10046
 
695 rajveer 10047
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 10048
      if (that == null)
10049
        return false;
10050
 
10051
      boolean this_present_id = true;
10052
      boolean that_present_id = true;
10053
      if (this_present_id || that_present_id) {
10054
        if (!(this_present_id && that_present_id))
10055
          return false;
10056
        if (this.id != that.id)
10057
          return false;
10058
      }
10059
 
695 rajveer 10060
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
10061
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
10062
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
10063
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 10064
          return false;
695 rajveer 10065
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 10066
          return false;
10067
      }
10068
 
695 rajveer 10069
      boolean this_present_sessionId = true && this.isSetSessionId();
10070
      boolean that_present_sessionId = true && that.isSetSessionId();
10071
      if (this_present_sessionId || that_present_sessionId) {
10072
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 10073
          return false;
695 rajveer 10074
        if (!this.sessionId.equals(that.sessionId))
420 ashish 10075
          return false;
10076
      }
10077
 
695 rajveer 10078
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
10079
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
10080
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
10081
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 10082
          return false;
695 rajveer 10083
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 10084
          return false;
10085
      }
10086
 
695 rajveer 10087
      boolean this_present_description = true && this.isSetDescription();
10088
      boolean that_present_description = true && that.isSetDescription();
10089
      if (this_present_description || that_present_description) {
10090
        if (!(this_present_description && that_present_description))
420 ashish 10091
          return false;
695 rajveer 10092
        if (!this.description.equals(that.description))
420 ashish 10093
          return false;
10094
      }
10095
 
695 rajveer 10096
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
10097
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
10098
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
10099
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 10100
          return false;
695 rajveer 10101
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 10102
          return false;
10103
      }
10104
 
695 rajveer 10105
      boolean this_present_authCode = true && this.isSetAuthCode();
10106
      boolean that_present_authCode = true && that.isSetAuthCode();
10107
      if (this_present_authCode || that_present_authCode) {
10108
        if (!(this_present_authCode && that_present_authCode))
420 ashish 10109
          return false;
695 rajveer 10110
        if (!this.authCode.equals(that.authCode))
420 ashish 10111
          return false;
10112
      }
10113
 
695 rajveer 10114
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
10115
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
10116
      if (this_present_referenceCode || that_present_referenceCode) {
10117
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 10118
          return false;
695 rajveer 10119
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 10120
          return false;
10121
      }
10122
 
695 rajveer 10123
      boolean this_present_errorCode = true && this.isSetErrorCode();
10124
      boolean that_present_errorCode = true && that.isSetErrorCode();
10125
      if (this_present_errorCode || that_present_errorCode) {
10126
        if (!(this_present_errorCode && that_present_errorCode))
10127
          return false;
10128
        if (!this.errorCode.equals(that.errorCode))
10129
          return false;
10130
      }
10131
 
10132
      boolean this_present_status = true && this.isSetStatus();
10133
      boolean that_present_status = true && that.isSetStatus();
10134
      if (this_present_status || that_present_status) {
10135
        if (!(this_present_status && that_present_status))
10136
          return false;
10137
        if (!this.status.equals(that.status))
10138
          return false;
10139
      }
10140
 
1119 rajveer 10141
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
10142
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
10143
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
10144
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
10145
          return false;
10146
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
10147
          return false;
10148
      }
10149
 
695 rajveer 10150
      boolean this_present_attributes = true && this.isSetAttributes();
10151
      boolean that_present_attributes = true && that.isSetAttributes();
10152
      if (this_present_attributes || that_present_attributes) {
10153
        if (!(this_present_attributes && that_present_attributes))
10154
          return false;
10155
        if (!this.attributes.equals(that.attributes))
10156
          return false;
10157
      }
10158
 
420 ashish 10159
      return true;
10160
    }
10161
 
10162
    @Override
10163
    public int hashCode() {
10164
      return 0;
10165
    }
10166
 
695 rajveer 10167
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 10168
      if (!getClass().equals(other.getClass())) {
10169
        return getClass().getName().compareTo(other.getClass().getName());
10170
      }
10171
 
10172
      int lastComparison = 0;
695 rajveer 10173
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 10174
 
3430 rajveer 10175
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 10176
      if (lastComparison != 0) {
10177
        return lastComparison;
10178
      }
3430 rajveer 10179
      if (isSetId()) {
10180
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
10181
        if (lastComparison != 0) {
10182
          return lastComparison;
10183
        }
420 ashish 10184
      }
3430 rajveer 10185
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(typedOther.isSetGatewayPaymentId());
420 ashish 10186
      if (lastComparison != 0) {
10187
        return lastComparison;
10188
      }
3430 rajveer 10189
      if (isSetGatewayPaymentId()) {
10190
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayPaymentId, typedOther.gatewayPaymentId);
10191
        if (lastComparison != 0) {
10192
          return lastComparison;
10193
        }
420 ashish 10194
      }
3430 rajveer 10195
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId());
420 ashish 10196
      if (lastComparison != 0) {
10197
        return lastComparison;
10198
      }
3430 rajveer 10199
      if (isSetSessionId()) {
10200
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId);
10201
        if (lastComparison != 0) {
10202
          return lastComparison;
10203
        }
420 ashish 10204
      }
3430 rajveer 10205
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(typedOther.isSetGatewayTxnStatus());
420 ashish 10206
      if (lastComparison != 0) {
10207
        return lastComparison;
10208
      }
3430 rajveer 10209
      if (isSetGatewayTxnStatus()) {
10210
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnStatus, typedOther.gatewayTxnStatus);
10211
        if (lastComparison != 0) {
10212
          return lastComparison;
10213
        }
420 ashish 10214
      }
3430 rajveer 10215
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
420 ashish 10216
      if (lastComparison != 0) {
10217
        return lastComparison;
10218
      }
3430 rajveer 10219
      if (isSetDescription()) {
10220
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
10221
        if (lastComparison != 0) {
10222
          return lastComparison;
10223
        }
420 ashish 10224
      }
3430 rajveer 10225
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(typedOther.isSetGatewayTxnId());
420 ashish 10226
      if (lastComparison != 0) {
10227
        return lastComparison;
10228
      }
3430 rajveer 10229
      if (isSetGatewayTxnId()) {
10230
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnId, typedOther.gatewayTxnId);
10231
        if (lastComparison != 0) {
10232
          return lastComparison;
10233
        }
420 ashish 10234
      }
3430 rajveer 10235
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(typedOther.isSetAuthCode());
420 ashish 10236
      if (lastComparison != 0) {
10237
        return lastComparison;
10238
      }
3430 rajveer 10239
      if (isSetAuthCode()) {
10240
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authCode, typedOther.authCode);
10241
        if (lastComparison != 0) {
10242
          return lastComparison;
10243
        }
420 ashish 10244
      }
3430 rajveer 10245
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(typedOther.isSetReferenceCode());
420 ashish 10246
      if (lastComparison != 0) {
10247
        return lastComparison;
10248
      }
3430 rajveer 10249
      if (isSetReferenceCode()) {
10250
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenceCode, typedOther.referenceCode);
10251
        if (lastComparison != 0) {
10252
          return lastComparison;
10253
        }
420 ashish 10254
      }
3430 rajveer 10255
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode());
695 rajveer 10256
      if (lastComparison != 0) {
10257
        return lastComparison;
10258
      }
3430 rajveer 10259
      if (isSetErrorCode()) {
10260
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode);
10261
        if (lastComparison != 0) {
10262
          return lastComparison;
10263
        }
695 rajveer 10264
      }
3430 rajveer 10265
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
695 rajveer 10266
      if (lastComparison != 0) {
10267
        return lastComparison;
10268
      }
3430 rajveer 10269
      if (isSetStatus()) {
10270
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
10271
        if (lastComparison != 0) {
10272
          return lastComparison;
10273
        }
695 rajveer 10274
      }
3430 rajveer 10275
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(typedOther.isSetGatewayTxnDate());
1119 rajveer 10276
      if (lastComparison != 0) {
10277
        return lastComparison;
10278
      }
3430 rajveer 10279
      if (isSetGatewayTxnDate()) {
10280
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnDate, typedOther.gatewayTxnDate);
10281
        if (lastComparison != 0) {
10282
          return lastComparison;
10283
        }
1119 rajveer 10284
      }
3430 rajveer 10285
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
695 rajveer 10286
      if (lastComparison != 0) {
10287
        return lastComparison;
10288
      }
3430 rajveer 10289
      if (isSetAttributes()) {
10290
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
10291
        if (lastComparison != 0) {
10292
          return lastComparison;
10293
        }
695 rajveer 10294
      }
420 ashish 10295
      return 0;
10296
    }
10297
 
3430 rajveer 10298
    public _Fields fieldForId(int fieldId) {
10299
      return _Fields.findByThriftId(fieldId);
10300
    }
10301
 
10302
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10303
      org.apache.thrift.protocol.TField field;
420 ashish 10304
      iprot.readStructBegin();
10305
      while (true)
10306
      {
10307
        field = iprot.readFieldBegin();
3430 rajveer 10308
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 10309
          break;
10310
        }
3430 rajveer 10311
        switch (field.id) {
10312
          case 1: // ID
10313
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10314
              this.id = iprot.readI64();
10315
              setIdIsSet(true);
10316
            } else { 
10317
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10318
            }
10319
            break;
10320
          case 2: // GATEWAY_PAYMENT_ID
10321
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10322
              this.gatewayPaymentId = iprot.readString();
10323
            } else { 
10324
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10325
            }
10326
            break;
10327
          case 3: // SESSION_ID
10328
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10329
              this.sessionId = iprot.readString();
10330
            } else { 
10331
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10332
            }
10333
            break;
10334
          case 4: // GATEWAY_TXN_STATUS
10335
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10336
              this.gatewayTxnStatus = iprot.readString();
10337
            } else { 
10338
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10339
            }
10340
            break;
10341
          case 5: // DESCRIPTION
10342
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10343
              this.description = iprot.readString();
10344
            } else { 
10345
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10346
            }
10347
            break;
10348
          case 6: // GATEWAY_TXN_ID
10349
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10350
              this.gatewayTxnId = iprot.readString();
10351
            } else { 
10352
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10353
            }
10354
            break;
10355
          case 7: // AUTH_CODE
10356
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10357
              this.authCode = iprot.readString();
10358
            } else { 
10359
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10360
            }
10361
            break;
10362
          case 8: // REFERENCE_CODE
10363
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10364
              this.referenceCode = iprot.readString();
10365
            } else { 
10366
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10367
            }
10368
            break;
10369
          case 9: // ERROR_CODE
10370
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10371
              this.errorCode = iprot.readString();
10372
            } else { 
10373
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10374
            }
10375
            break;
10376
          case 10: // STATUS
10377
            if (field.type == org.apache.thrift.protocol.TType.I32) {
10378
              this.status = PaymentStatus.findByValue(iprot.readI32());
10379
            } else { 
10380
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10381
            }
10382
            break;
10383
          case 11: // GATEWAY_TXN_DATE
10384
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10385
              this.gatewayTxnDate = iprot.readString();
10386
            } else { 
10387
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10388
            }
10389
            break;
10390
          case 12: // ATTRIBUTES
10391
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10392
              {
4600 varun.gupt 10393
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
10394
                this.attributes = new ArrayList<Attribute>(_list32.size);
10395
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
695 rajveer 10396
                {
4600 varun.gupt 10397
                  Attribute _elem34; // required
10398
                  _elem34 = new Attribute();
10399
                  _elem34.read(iprot);
10400
                  this.attributes.add(_elem34);
695 rajveer 10401
                }
3430 rajveer 10402
                iprot.readListEnd();
695 rajveer 10403
              }
3430 rajveer 10404
            } else { 
10405
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10406
            }
10407
            break;
10408
          default:
10409
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 10410
        }
3430 rajveer 10411
        iprot.readFieldEnd();
420 ashish 10412
      }
10413
      iprot.readStructEnd();
10414
      validate();
10415
    }
10416
 
3430 rajveer 10417
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 10418
      validate();
10419
 
10420
      oprot.writeStructBegin(STRUCT_DESC);
10421
      oprot.writeFieldBegin(ID_FIELD_DESC);
10422
      oprot.writeI64(this.id);
10423
      oprot.writeFieldEnd();
695 rajveer 10424
      if (this.gatewayPaymentId != null) {
10425
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
10426
        oprot.writeString(this.gatewayPaymentId);
420 ashish 10427
        oprot.writeFieldEnd();
10428
      }
695 rajveer 10429
      if (this.sessionId != null) {
10430
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
10431
        oprot.writeString(this.sessionId);
420 ashish 10432
        oprot.writeFieldEnd();
10433
      }
695 rajveer 10434
      if (this.gatewayTxnStatus != null) {
10435
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
10436
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 10437
        oprot.writeFieldEnd();
10438
      }
695 rajveer 10439
      if (this.description != null) {
10440
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
10441
        oprot.writeString(this.description);
420 ashish 10442
        oprot.writeFieldEnd();
10443
      }
695 rajveer 10444
      if (this.gatewayTxnId != null) {
10445
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
10446
        oprot.writeString(this.gatewayTxnId);
420 ashish 10447
        oprot.writeFieldEnd();
10448
      }
695 rajveer 10449
      if (this.authCode != null) {
420 ashish 10450
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 10451
        oprot.writeString(this.authCode);
420 ashish 10452
        oprot.writeFieldEnd();
10453
      }
695 rajveer 10454
      if (this.referenceCode != null) {
10455
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
10456
        oprot.writeString(this.referenceCode);
420 ashish 10457
        oprot.writeFieldEnd();
10458
      }
695 rajveer 10459
      if (this.errorCode != null) {
10460
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
10461
        oprot.writeString(this.errorCode);
10462
        oprot.writeFieldEnd();
10463
      }
10464
      if (this.status != null) {
10465
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
10466
        oprot.writeI32(this.status.getValue());
10467
        oprot.writeFieldEnd();
10468
      }
1119 rajveer 10469
      if (this.gatewayTxnDate != null) {
10470
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
10471
        oprot.writeString(this.gatewayTxnDate);
10472
        oprot.writeFieldEnd();
10473
      }
695 rajveer 10474
      if (this.attributes != null) {
10475
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
10476
        {
3430 rajveer 10477
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
4600 varun.gupt 10478
          for (Attribute _iter35 : this.attributes)
695 rajveer 10479
          {
4600 varun.gupt 10480
            _iter35.write(oprot);
695 rajveer 10481
          }
10482
          oprot.writeListEnd();
10483
        }
10484
        oprot.writeFieldEnd();
10485
      }
420 ashish 10486
      oprot.writeFieldStop();
10487
      oprot.writeStructEnd();
10488
    }
10489
 
10490
    @Override
10491
    public String toString() {
695 rajveer 10492
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 10493
      boolean first = true;
10494
 
10495
      sb.append("id:");
10496
      sb.append(this.id);
10497
      first = false;
10498
      if (!first) sb.append(", ");
695 rajveer 10499
      sb.append("gatewayPaymentId:");
10500
      if (this.gatewayPaymentId == null) {
420 ashish 10501
        sb.append("null");
10502
      } else {
695 rajveer 10503
        sb.append(this.gatewayPaymentId);
420 ashish 10504
      }
10505
      first = false;
10506
      if (!first) sb.append(", ");
695 rajveer 10507
      sb.append("sessionId:");
10508
      if (this.sessionId == null) {
420 ashish 10509
        sb.append("null");
10510
      } else {
695 rajveer 10511
        sb.append(this.sessionId);
420 ashish 10512
      }
10513
      first = false;
10514
      if (!first) sb.append(", ");
695 rajveer 10515
      sb.append("gatewayTxnStatus:");
10516
      if (this.gatewayTxnStatus == null) {
420 ashish 10517
        sb.append("null");
10518
      } else {
695 rajveer 10519
        sb.append(this.gatewayTxnStatus);
420 ashish 10520
      }
10521
      first = false;
10522
      if (!first) sb.append(", ");
695 rajveer 10523
      sb.append("description:");
10524
      if (this.description == null) {
420 ashish 10525
        sb.append("null");
10526
      } else {
695 rajveer 10527
        sb.append(this.description);
420 ashish 10528
      }
10529
      first = false;
10530
      if (!first) sb.append(", ");
695 rajveer 10531
      sb.append("gatewayTxnId:");
10532
      if (this.gatewayTxnId == null) {
420 ashish 10533
        sb.append("null");
10534
      } else {
695 rajveer 10535
        sb.append(this.gatewayTxnId);
420 ashish 10536
      }
10537
      first = false;
10538
      if (!first) sb.append(", ");
695 rajveer 10539
      sb.append("authCode:");
10540
      if (this.authCode == null) {
420 ashish 10541
        sb.append("null");
10542
      } else {
695 rajveer 10543
        sb.append(this.authCode);
420 ashish 10544
      }
10545
      first = false;
10546
      if (!first) sb.append(", ");
695 rajveer 10547
      sb.append("referenceCode:");
10548
      if (this.referenceCode == null) {
420 ashish 10549
        sb.append("null");
10550
      } else {
695 rajveer 10551
        sb.append(this.referenceCode);
420 ashish 10552
      }
10553
      first = false;
695 rajveer 10554
      if (!first) sb.append(", ");
10555
      sb.append("errorCode:");
10556
      if (this.errorCode == null) {
10557
        sb.append("null");
10558
      } else {
10559
        sb.append(this.errorCode);
10560
      }
10561
      first = false;
10562
      if (!first) sb.append(", ");
10563
      sb.append("status:");
10564
      if (this.status == null) {
10565
        sb.append("null");
10566
      } else {
10567
        sb.append(this.status);
10568
      }
10569
      first = false;
10570
      if (!first) sb.append(", ");
1119 rajveer 10571
      sb.append("gatewayTxnDate:");
10572
      if (this.gatewayTxnDate == null) {
10573
        sb.append("null");
10574
      } else {
10575
        sb.append(this.gatewayTxnDate);
10576
      }
10577
      first = false;
10578
      if (!first) sb.append(", ");
695 rajveer 10579
      sb.append("attributes:");
10580
      if (this.attributes == null) {
10581
        sb.append("null");
10582
      } else {
10583
        sb.append(this.attributes);
10584
      }
10585
      first = false;
420 ashish 10586
      sb.append(")");
10587
      return sb.toString();
10588
    }
10589
 
3430 rajveer 10590
    public void validate() throws org.apache.thrift.TException {
420 ashish 10591
      // check for required fields
10592
    }
10593
 
3430 rajveer 10594
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10595
      try {
10596
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10597
      } catch (org.apache.thrift.TException te) {
10598
        throw new java.io.IOException(te);
10599
      }
10600
    }
10601
 
10602
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10603
      try {
10604
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10605
        __isset_bit_vector = new BitSet(1);
10606
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10607
      } catch (org.apache.thrift.TException te) {
10608
        throw new java.io.IOException(te);
10609
      }
10610
    }
10611
 
420 ashish 10612
  }
10613
 
3430 rajveer 10614
  public static class updatePaymentDetails_result implements org.apache.thrift.TBase<updatePaymentDetails_result, updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable   {
10615
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_result");
420 ashish 10616
 
3430 rajveer 10617
    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);
10618
    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 10619
 
3430 rajveer 10620
    private boolean success; // required
10621
    private PaymentException pe; // required
420 ashish 10622
 
10623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10624
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 10625
      SUCCESS((short)0, "success"),
420 ashish 10626
      PE((short)1, "pe");
10627
 
10628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10629
 
10630
      static {
10631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10632
          byName.put(field.getFieldName(), field);
10633
        }
10634
      }
10635
 
10636
      /**
10637
       * Find the _Fields constant that matches fieldId, or null if its not found.
10638
       */
10639
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10640
        switch(fieldId) {
10641
          case 0: // SUCCESS
10642
            return SUCCESS;
10643
          case 1: // PE
10644
            return PE;
10645
          default:
10646
            return null;
10647
        }
420 ashish 10648
      }
10649
 
10650
      /**
10651
       * Find the _Fields constant that matches fieldId, throwing an exception
10652
       * if it is not found.
10653
       */
10654
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10655
        _Fields fields = findByThriftId(fieldId);
10656
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10657
        return fields;
10658
      }
10659
 
10660
      /**
10661
       * Find the _Fields constant that matches name, or null if its not found.
10662
       */
10663
      public static _Fields findByName(String name) {
10664
        return byName.get(name);
10665
      }
10666
 
10667
      private final short _thriftId;
10668
      private final String _fieldName;
10669
 
10670
      _Fields(short thriftId, String fieldName) {
10671
        _thriftId = thriftId;
10672
        _fieldName = fieldName;
10673
      }
10674
 
10675
      public short getThriftFieldId() {
10676
        return _thriftId;
10677
      }
10678
 
10679
      public String getFieldName() {
10680
        return _fieldName;
10681
      }
10682
    }
10683
 
10684
    // isset id assignments
695 rajveer 10685
    private static final int __SUCCESS_ISSET_ID = 0;
10686
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 10687
 
3430 rajveer 10688
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 10689
    static {
3430 rajveer 10690
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10691
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10692
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
10693
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10694
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10695
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10696
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 10697
    }
10698
 
695 rajveer 10699
    public updatePaymentDetails_result() {
420 ashish 10700
    }
10701
 
695 rajveer 10702
    public updatePaymentDetails_result(
10703
      boolean success,
420 ashish 10704
      PaymentException pe)
10705
    {
10706
      this();
695 rajveer 10707
      this.success = success;
10708
      setSuccessIsSet(true);
420 ashish 10709
      this.pe = pe;
10710
    }
10711
 
10712
    /**
10713
     * Performs a deep copy on <i>other</i>.
10714
     */
695 rajveer 10715
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
10716
      __isset_bit_vector.clear();
10717
      __isset_bit_vector.or(other.__isset_bit_vector);
10718
      this.success = other.success;
420 ashish 10719
      if (other.isSetPe()) {
10720
        this.pe = new PaymentException(other.pe);
10721
      }
10722
    }
10723
 
695 rajveer 10724
    public updatePaymentDetails_result deepCopy() {
10725
      return new updatePaymentDetails_result(this);
420 ashish 10726
    }
10727
 
3430 rajveer 10728
    @Override
10729
    public void clear() {
10730
      setSuccessIsSet(false);
10731
      this.success = false;
10732
      this.pe = null;
420 ashish 10733
    }
10734
 
695 rajveer 10735
    public boolean isSuccess() {
10736
      return this.success;
10737
    }
10738
 
3430 rajveer 10739
    public void setSuccess(boolean success) {
695 rajveer 10740
      this.success = success;
10741
      setSuccessIsSet(true);
10742
    }
10743
 
10744
    public void unsetSuccess() {
10745
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10746
    }
10747
 
3430 rajveer 10748
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
695 rajveer 10749
    public boolean isSetSuccess() {
10750
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10751
    }
10752
 
10753
    public void setSuccessIsSet(boolean value) {
10754
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10755
    }
10756
 
420 ashish 10757
    public PaymentException getPe() {
10758
      return this.pe;
10759
    }
10760
 
3430 rajveer 10761
    public void setPe(PaymentException pe) {
420 ashish 10762
      this.pe = pe;
10763
    }
10764
 
10765
    public void unsetPe() {
10766
      this.pe = null;
10767
    }
10768
 
3430 rajveer 10769
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 10770
    public boolean isSetPe() {
10771
      return this.pe != null;
10772
    }
10773
 
10774
    public void setPeIsSet(boolean value) {
10775
      if (!value) {
10776
        this.pe = null;
10777
      }
10778
    }
10779
 
10780
    public void setFieldValue(_Fields field, Object value) {
10781
      switch (field) {
695 rajveer 10782
      case SUCCESS:
10783
        if (value == null) {
10784
          unsetSuccess();
10785
        } else {
10786
          setSuccess((Boolean)value);
10787
        }
10788
        break;
10789
 
420 ashish 10790
      case PE:
10791
        if (value == null) {
10792
          unsetPe();
10793
        } else {
10794
          setPe((PaymentException)value);
10795
        }
10796
        break;
10797
 
10798
      }
10799
    }
10800
 
10801
    public Object getFieldValue(_Fields field) {
10802
      switch (field) {
695 rajveer 10803
      case SUCCESS:
3430 rajveer 10804
        return Boolean.valueOf(isSuccess());
695 rajveer 10805
 
420 ashish 10806
      case PE:
10807
        return getPe();
10808
 
10809
      }
10810
      throw new IllegalStateException();
10811
    }
10812
 
3430 rajveer 10813
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10814
    public boolean isSet(_Fields field) {
10815
      if (field == null) {
10816
        throw new IllegalArgumentException();
10817
      }
420 ashish 10818
 
10819
      switch (field) {
695 rajveer 10820
      case SUCCESS:
10821
        return isSetSuccess();
420 ashish 10822
      case PE:
10823
        return isSetPe();
10824
      }
10825
      throw new IllegalStateException();
10826
    }
10827
 
10828
    @Override
10829
    public boolean equals(Object that) {
10830
      if (that == null)
10831
        return false;
695 rajveer 10832
      if (that instanceof updatePaymentDetails_result)
10833
        return this.equals((updatePaymentDetails_result)that);
420 ashish 10834
      return false;
10835
    }
10836
 
695 rajveer 10837
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 10838
      if (that == null)
10839
        return false;
10840
 
695 rajveer 10841
      boolean this_present_success = true;
10842
      boolean that_present_success = true;
10843
      if (this_present_success || that_present_success) {
10844
        if (!(this_present_success && that_present_success))
10845
          return false;
10846
        if (this.success != that.success)
10847
          return false;
10848
      }
10849
 
420 ashish 10850
      boolean this_present_pe = true && this.isSetPe();
10851
      boolean that_present_pe = true && that.isSetPe();
10852
      if (this_present_pe || that_present_pe) {
10853
        if (!(this_present_pe && that_present_pe))
10854
          return false;
10855
        if (!this.pe.equals(that.pe))
10856
          return false;
10857
      }
10858
 
10859
      return true;
10860
    }
10861
 
10862
    @Override
10863
    public int hashCode() {
10864
      return 0;
10865
    }
10866
 
695 rajveer 10867
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 10868
      if (!getClass().equals(other.getClass())) {
10869
        return getClass().getName().compareTo(other.getClass().getName());
10870
      }
10871
 
10872
      int lastComparison = 0;
695 rajveer 10873
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 10874
 
3430 rajveer 10875
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 10876
      if (lastComparison != 0) {
10877
        return lastComparison;
10878
      }
3430 rajveer 10879
      if (isSetSuccess()) {
10880
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10881
        if (lastComparison != 0) {
10882
          return lastComparison;
10883
        }
695 rajveer 10884
      }
3430 rajveer 10885
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 10886
      if (lastComparison != 0) {
10887
        return lastComparison;
10888
      }
3430 rajveer 10889
      if (isSetPe()) {
10890
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
10891
        if (lastComparison != 0) {
10892
          return lastComparison;
10893
        }
420 ashish 10894
      }
10895
      return 0;
10896
    }
10897
 
3430 rajveer 10898
    public _Fields fieldForId(int fieldId) {
10899
      return _Fields.findByThriftId(fieldId);
10900
    }
10901
 
10902
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10903
      org.apache.thrift.protocol.TField field;
420 ashish 10904
      iprot.readStructBegin();
10905
      while (true)
10906
      {
10907
        field = iprot.readFieldBegin();
3430 rajveer 10908
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 10909
          break;
10910
        }
3430 rajveer 10911
        switch (field.id) {
10912
          case 0: // SUCCESS
10913
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
10914
              this.success = iprot.readBool();
10915
              setSuccessIsSet(true);
10916
            } else { 
10917
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10918
            }
10919
            break;
10920
          case 1: // PE
10921
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10922
              this.pe = new PaymentException();
10923
              this.pe.read(iprot);
10924
            } else { 
10925
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10926
            }
10927
            break;
10928
          default:
10929
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 10930
        }
3430 rajveer 10931
        iprot.readFieldEnd();
420 ashish 10932
      }
10933
      iprot.readStructEnd();
10934
      validate();
10935
    }
10936
 
3430 rajveer 10937
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 10938
      oprot.writeStructBegin(STRUCT_DESC);
10939
 
695 rajveer 10940
      if (this.isSetSuccess()) {
10941
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10942
        oprot.writeBool(this.success);
10943
        oprot.writeFieldEnd();
10944
      } else if (this.isSetPe()) {
420 ashish 10945
        oprot.writeFieldBegin(PE_FIELD_DESC);
10946
        this.pe.write(oprot);
10947
        oprot.writeFieldEnd();
10948
      }
10949
      oprot.writeFieldStop();
10950
      oprot.writeStructEnd();
10951
    }
10952
 
10953
    @Override
10954
    public String toString() {
695 rajveer 10955
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 10956
      boolean first = true;
10957
 
695 rajveer 10958
      sb.append("success:");
10959
      sb.append(this.success);
10960
      first = false;
10961
      if (!first) sb.append(", ");
420 ashish 10962
      sb.append("pe:");
10963
      if (this.pe == null) {
10964
        sb.append("null");
10965
      } else {
10966
        sb.append(this.pe);
10967
      }
10968
      first = false;
10969
      sb.append(")");
10970
      return sb.toString();
10971
    }
10972
 
3430 rajveer 10973
    public void validate() throws org.apache.thrift.TException {
420 ashish 10974
      // check for required fields
10975
    }
10976
 
3430 rajveer 10977
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10978
      try {
10979
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10980
      } catch (org.apache.thrift.TException te) {
10981
        throw new java.io.IOException(te);
10982
      }
10983
    }
10984
 
10985
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10986
      try {
10987
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10988
      } catch (org.apache.thrift.TException te) {
10989
        throw new java.io.IOException(te);
10990
      }
10991
    }
10992
 
420 ashish 10993
  }
10994
 
3430 rajveer 10995
  public static class getSuccessfulPaymentsAmountRange_args implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_args, getSuccessfulPaymentsAmountRange_args._Fields>, java.io.Serializable, Cloneable   {
10996
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_args");
1629 ankur.sing 10997
 
10998
 
10999
 
11000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11001
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 11002
;
11003
 
11004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11005
 
11006
      static {
11007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11008
          byName.put(field.getFieldName(), field);
11009
        }
11010
      }
11011
 
11012
      /**
11013
       * Find the _Fields constant that matches fieldId, or null if its not found.
11014
       */
11015
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11016
        switch(fieldId) {
11017
          default:
11018
            return null;
11019
        }
1629 ankur.sing 11020
      }
11021
 
11022
      /**
11023
       * Find the _Fields constant that matches fieldId, throwing an exception
11024
       * if it is not found.
11025
       */
11026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11027
        _Fields fields = findByThriftId(fieldId);
11028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11029
        return fields;
11030
      }
11031
 
11032
      /**
11033
       * Find the _Fields constant that matches name, or null if its not found.
11034
       */
11035
      public static _Fields findByName(String name) {
11036
        return byName.get(name);
11037
      }
11038
 
11039
      private final short _thriftId;
11040
      private final String _fieldName;
11041
 
11042
      _Fields(short thriftId, String fieldName) {
11043
        _thriftId = thriftId;
11044
        _fieldName = fieldName;
11045
      }
11046
 
11047
      public short getThriftFieldId() {
11048
        return _thriftId;
11049
      }
11050
 
11051
      public String getFieldName() {
11052
        return _fieldName;
11053
      }
11054
    }
3430 rajveer 11055
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 11056
    static {
3430 rajveer 11057
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11058
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11059
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_args.class, metaDataMap);
1629 ankur.sing 11060
    }
11061
 
1731 ankur.sing 11062
    public getSuccessfulPaymentsAmountRange_args() {
1629 ankur.sing 11063
    }
11064
 
11065
    /**
11066
     * Performs a deep copy on <i>other</i>.
11067
     */
1731 ankur.sing 11068
    public getSuccessfulPaymentsAmountRange_args(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 11069
    }
11070
 
1731 ankur.sing 11071
    public getSuccessfulPaymentsAmountRange_args deepCopy() {
11072
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 11073
    }
11074
 
3430 rajveer 11075
    @Override
11076
    public void clear() {
1629 ankur.sing 11077
    }
11078
 
11079
    public void setFieldValue(_Fields field, Object value) {
11080
      switch (field) {
11081
      }
11082
    }
11083
 
11084
    public Object getFieldValue(_Fields field) {
11085
      switch (field) {
11086
      }
11087
      throw new IllegalStateException();
11088
    }
11089
 
3430 rajveer 11090
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11091
    public boolean isSet(_Fields field) {
11092
      if (field == null) {
11093
        throw new IllegalArgumentException();
11094
      }
1629 ankur.sing 11095
 
11096
      switch (field) {
11097
      }
11098
      throw new IllegalStateException();
11099
    }
11100
 
11101
    @Override
11102
    public boolean equals(Object that) {
11103
      if (that == null)
11104
        return false;
1731 ankur.sing 11105
      if (that instanceof getSuccessfulPaymentsAmountRange_args)
11106
        return this.equals((getSuccessfulPaymentsAmountRange_args)that);
1629 ankur.sing 11107
      return false;
11108
    }
11109
 
1731 ankur.sing 11110
    public boolean equals(getSuccessfulPaymentsAmountRange_args that) {
1629 ankur.sing 11111
      if (that == null)
11112
        return false;
11113
 
11114
      return true;
11115
    }
11116
 
11117
    @Override
11118
    public int hashCode() {
11119
      return 0;
11120
    }
11121
 
1731 ankur.sing 11122
    public int compareTo(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 11123
      if (!getClass().equals(other.getClass())) {
11124
        return getClass().getName().compareTo(other.getClass().getName());
11125
      }
11126
 
11127
      int lastComparison = 0;
1731 ankur.sing 11128
      getSuccessfulPaymentsAmountRange_args typedOther = (getSuccessfulPaymentsAmountRange_args)other;
1629 ankur.sing 11129
 
11130
      return 0;
11131
    }
11132
 
3430 rajveer 11133
    public _Fields fieldForId(int fieldId) {
11134
      return _Fields.findByThriftId(fieldId);
11135
    }
11136
 
11137
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11138
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 11139
      iprot.readStructBegin();
11140
      while (true)
11141
      {
11142
        field = iprot.readFieldBegin();
3430 rajveer 11143
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 11144
          break;
11145
        }
3430 rajveer 11146
        switch (field.id) {
11147
          default:
11148
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 11149
        }
3430 rajveer 11150
        iprot.readFieldEnd();
1629 ankur.sing 11151
      }
11152
      iprot.readStructEnd();
11153
      validate();
11154
    }
11155
 
3430 rajveer 11156
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 11157
      validate();
11158
 
11159
      oprot.writeStructBegin(STRUCT_DESC);
11160
      oprot.writeFieldStop();
11161
      oprot.writeStructEnd();
11162
    }
11163
 
11164
    @Override
11165
    public String toString() {
1731 ankur.sing 11166
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_args(");
1629 ankur.sing 11167
      boolean first = true;
11168
 
11169
      sb.append(")");
11170
      return sb.toString();
11171
    }
11172
 
3430 rajveer 11173
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 11174
      // check for required fields
11175
    }
11176
 
3430 rajveer 11177
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11178
      try {
11179
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11180
      } catch (org.apache.thrift.TException te) {
11181
        throw new java.io.IOException(te);
11182
      }
11183
    }
11184
 
11185
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11186
      try {
11187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11188
      } catch (org.apache.thrift.TException te) {
11189
        throw new java.io.IOException(te);
11190
      }
11191
    }
11192
 
1629 ankur.sing 11193
  }
11194
 
3430 rajveer 11195
  public static class getSuccessfulPaymentsAmountRange_result implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_result, getSuccessfulPaymentsAmountRange_result._Fields>, java.io.Serializable, Cloneable   {
11196
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_result");
1629 ankur.sing 11197
 
3430 rajveer 11198
    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 11199
 
3430 rajveer 11200
    private List<Double> success; // required
1629 ankur.sing 11201
 
11202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11203
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 11204
      SUCCESS((short)0, "success");
11205
 
11206
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11207
 
11208
      static {
11209
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11210
          byName.put(field.getFieldName(), field);
11211
        }
11212
      }
11213
 
11214
      /**
11215
       * Find the _Fields constant that matches fieldId, or null if its not found.
11216
       */
11217
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11218
        switch(fieldId) {
11219
          case 0: // SUCCESS
11220
            return SUCCESS;
11221
          default:
11222
            return null;
11223
        }
1629 ankur.sing 11224
      }
11225
 
11226
      /**
11227
       * Find the _Fields constant that matches fieldId, throwing an exception
11228
       * if it is not found.
11229
       */
11230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11231
        _Fields fields = findByThriftId(fieldId);
11232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11233
        return fields;
11234
      }
11235
 
11236
      /**
11237
       * Find the _Fields constant that matches name, or null if its not found.
11238
       */
11239
      public static _Fields findByName(String name) {
11240
        return byName.get(name);
11241
      }
11242
 
11243
      private final short _thriftId;
11244
      private final String _fieldName;
11245
 
11246
      _Fields(short thriftId, String fieldName) {
11247
        _thriftId = thriftId;
11248
        _fieldName = fieldName;
11249
      }
11250
 
11251
      public short getThriftFieldId() {
11252
        return _thriftId;
11253
      }
11254
 
11255
      public String getFieldName() {
11256
        return _fieldName;
11257
      }
11258
    }
11259
 
11260
    // isset id assignments
11261
 
3430 rajveer 11262
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 11263
    static {
3430 rajveer 11264
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11265
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11266
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11267
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
11268
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11269
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_result.class, metaDataMap);
1629 ankur.sing 11270
    }
11271
 
1731 ankur.sing 11272
    public getSuccessfulPaymentsAmountRange_result() {
1629 ankur.sing 11273
    }
11274
 
1731 ankur.sing 11275
    public getSuccessfulPaymentsAmountRange_result(
11276
      List<Double> success)
1629 ankur.sing 11277
    {
11278
      this();
11279
      this.success = success;
11280
    }
11281
 
11282
    /**
11283
     * Performs a deep copy on <i>other</i>.
11284
     */
1731 ankur.sing 11285
    public getSuccessfulPaymentsAmountRange_result(getSuccessfulPaymentsAmountRange_result other) {
11286
      if (other.isSetSuccess()) {
11287
        List<Double> __this__success = new ArrayList<Double>();
11288
        for (Double other_element : other.success) {
11289
          __this__success.add(other_element);
1629 ankur.sing 11290
        }
1731 ankur.sing 11291
        this.success = __this__success;
1629 ankur.sing 11292
      }
11293
    }
11294
 
1731 ankur.sing 11295
    public getSuccessfulPaymentsAmountRange_result deepCopy() {
11296
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 11297
    }
11298
 
3430 rajveer 11299
    @Override
11300
    public void clear() {
11301
      this.success = null;
1629 ankur.sing 11302
    }
11303
 
1731 ankur.sing 11304
    public int getSuccessSize() {
11305
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 11306
    }
11307
 
1731 ankur.sing 11308
    public java.util.Iterator<Double> getSuccessIterator() {
11309
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 11310
    }
11311
 
1731 ankur.sing 11312
    public void addToSuccess(double elem) {
11313
      if (this.success == null) {
11314
        this.success = new ArrayList<Double>();
1629 ankur.sing 11315
      }
1731 ankur.sing 11316
      this.success.add(elem);
1629 ankur.sing 11317
    }
11318
 
1731 ankur.sing 11319
    public List<Double> getSuccess() {
1629 ankur.sing 11320
      return this.success;
11321
    }
11322
 
3430 rajveer 11323
    public void setSuccess(List<Double> success) {
1629 ankur.sing 11324
      this.success = success;
11325
    }
11326
 
11327
    public void unsetSuccess() {
1731 ankur.sing 11328
      this.success = null;
1629 ankur.sing 11329
    }
11330
 
3430 rajveer 11331
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1629 ankur.sing 11332
    public boolean isSetSuccess() {
1731 ankur.sing 11333
      return this.success != null;
1629 ankur.sing 11334
    }
11335
 
11336
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 11337
      if (!value) {
11338
        this.success = null;
11339
      }
1629 ankur.sing 11340
    }
11341
 
11342
    public void setFieldValue(_Fields field, Object value) {
11343
      switch (field) {
11344
      case SUCCESS:
11345
        if (value == null) {
11346
          unsetSuccess();
11347
        } else {
1731 ankur.sing 11348
          setSuccess((List<Double>)value);
1629 ankur.sing 11349
        }
11350
        break;
11351
 
11352
      }
11353
    }
11354
 
11355
    public Object getFieldValue(_Fields field) {
11356
      switch (field) {
11357
      case SUCCESS:
1731 ankur.sing 11358
        return getSuccess();
1629 ankur.sing 11359
 
11360
      }
11361
      throw new IllegalStateException();
11362
    }
11363
 
3430 rajveer 11364
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11365
    public boolean isSet(_Fields field) {
11366
      if (field == null) {
11367
        throw new IllegalArgumentException();
11368
      }
1629 ankur.sing 11369
 
11370
      switch (field) {
11371
      case SUCCESS:
11372
        return isSetSuccess();
11373
      }
11374
      throw new IllegalStateException();
11375
    }
11376
 
11377
    @Override
11378
    public boolean equals(Object that) {
11379
      if (that == null)
11380
        return false;
1731 ankur.sing 11381
      if (that instanceof getSuccessfulPaymentsAmountRange_result)
11382
        return this.equals((getSuccessfulPaymentsAmountRange_result)that);
1629 ankur.sing 11383
      return false;
11384
    }
11385
 
1731 ankur.sing 11386
    public boolean equals(getSuccessfulPaymentsAmountRange_result that) {
1629 ankur.sing 11387
      if (that == null)
11388
        return false;
11389
 
1731 ankur.sing 11390
      boolean this_present_success = true && this.isSetSuccess();
11391
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 11392
      if (this_present_success || that_present_success) {
11393
        if (!(this_present_success && that_present_success))
11394
          return false;
1731 ankur.sing 11395
        if (!this.success.equals(that.success))
1629 ankur.sing 11396
          return false;
11397
      }
11398
 
11399
      return true;
11400
    }
11401
 
11402
    @Override
11403
    public int hashCode() {
11404
      return 0;
11405
    }
11406
 
1731 ankur.sing 11407
    public int compareTo(getSuccessfulPaymentsAmountRange_result other) {
1629 ankur.sing 11408
      if (!getClass().equals(other.getClass())) {
11409
        return getClass().getName().compareTo(other.getClass().getName());
11410
      }
11411
 
11412
      int lastComparison = 0;
1731 ankur.sing 11413
      getSuccessfulPaymentsAmountRange_result typedOther = (getSuccessfulPaymentsAmountRange_result)other;
1629 ankur.sing 11414
 
3430 rajveer 11415
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1629 ankur.sing 11416
      if (lastComparison != 0) {
11417
        return lastComparison;
11418
      }
3430 rajveer 11419
      if (isSetSuccess()) {
11420
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11421
        if (lastComparison != 0) {
11422
          return lastComparison;
11423
        }
1629 ankur.sing 11424
      }
11425
      return 0;
11426
    }
11427
 
3430 rajveer 11428
    public _Fields fieldForId(int fieldId) {
11429
      return _Fields.findByThriftId(fieldId);
11430
    }
11431
 
11432
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11433
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 11434
      iprot.readStructBegin();
11435
      while (true)
11436
      {
11437
        field = iprot.readFieldBegin();
3430 rajveer 11438
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 11439
          break;
11440
        }
3430 rajveer 11441
        switch (field.id) {
11442
          case 0: // SUCCESS
11443
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11444
              {
4600 varun.gupt 11445
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
11446
                this.success = new ArrayList<Double>(_list36.size);
11447
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
1731 ankur.sing 11448
                {
4600 varun.gupt 11449
                  double _elem38; // required
11450
                  _elem38 = iprot.readDouble();
11451
                  this.success.add(_elem38);
1731 ankur.sing 11452
                }
3430 rajveer 11453
                iprot.readListEnd();
1629 ankur.sing 11454
              }
3430 rajveer 11455
            } else { 
11456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11457
            }
11458
            break;
11459
          default:
11460
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 11461
        }
3430 rajveer 11462
        iprot.readFieldEnd();
1629 ankur.sing 11463
      }
11464
      iprot.readStructEnd();
11465
      validate();
11466
    }
11467
 
3430 rajveer 11468
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 11469
      oprot.writeStructBegin(STRUCT_DESC);
11470
 
11471
      if (this.isSetSuccess()) {
11472
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 11473
        {
3430 rajveer 11474
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
4600 varun.gupt 11475
          for (double _iter39 : this.success)
1731 ankur.sing 11476
          {
4600 varun.gupt 11477
            oprot.writeDouble(_iter39);
1731 ankur.sing 11478
          }
11479
          oprot.writeListEnd();
11480
        }
1629 ankur.sing 11481
        oprot.writeFieldEnd();
11482
      }
11483
      oprot.writeFieldStop();
11484
      oprot.writeStructEnd();
11485
    }
11486
 
11487
    @Override
11488
    public String toString() {
1731 ankur.sing 11489
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_result(");
1629 ankur.sing 11490
      boolean first = true;
11491
 
11492
      sb.append("success:");
1731 ankur.sing 11493
      if (this.success == null) {
11494
        sb.append("null");
11495
      } else {
11496
        sb.append(this.success);
11497
      }
1629 ankur.sing 11498
      first = false;
11499
      sb.append(")");
11500
      return sb.toString();
11501
    }
11502
 
3430 rajveer 11503
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 11504
      // check for required fields
11505
    }
11506
 
3430 rajveer 11507
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11508
      try {
11509
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11510
      } catch (org.apache.thrift.TException te) {
11511
        throw new java.io.IOException(te);
11512
      }
11513
    }
11514
 
11515
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11516
      try {
11517
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11518
      } catch (org.apache.thrift.TException te) {
11519
        throw new java.io.IOException(te);
11520
      }
11521
    }
11522
 
1629 ankur.sing 11523
  }
11524
 
3430 rajveer 11525
  public static class initializeHdfcPayment_args implements org.apache.thrift.TBase<initializeHdfcPayment_args, initializeHdfcPayment_args._Fields>, java.io.Serializable, Cloneable   {
11526
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_args");
2462 chandransh 11527
 
3430 rajveer 11528
    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 11529
 
3430 rajveer 11530
    private long merchantPaymentId; // required
2462 chandransh 11531
 
11532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11533
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 11534
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
11535
 
11536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11537
 
11538
      static {
11539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11540
          byName.put(field.getFieldName(), field);
11541
        }
11542
      }
11543
 
11544
      /**
11545
       * Find the _Fields constant that matches fieldId, or null if its not found.
11546
       */
11547
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11548
        switch(fieldId) {
11549
          case 1: // MERCHANT_PAYMENT_ID
11550
            return MERCHANT_PAYMENT_ID;
11551
          default:
11552
            return null;
11553
        }
2462 chandransh 11554
      }
11555
 
11556
      /**
11557
       * Find the _Fields constant that matches fieldId, throwing an exception
11558
       * if it is not found.
11559
       */
11560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11561
        _Fields fields = findByThriftId(fieldId);
11562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11563
        return fields;
11564
      }
11565
 
11566
      /**
11567
       * Find the _Fields constant that matches name, or null if its not found.
11568
       */
11569
      public static _Fields findByName(String name) {
11570
        return byName.get(name);
11571
      }
11572
 
11573
      private final short _thriftId;
11574
      private final String _fieldName;
11575
 
11576
      _Fields(short thriftId, String fieldName) {
11577
        _thriftId = thriftId;
11578
        _fieldName = fieldName;
11579
      }
11580
 
11581
      public short getThriftFieldId() {
11582
        return _thriftId;
11583
      }
11584
 
11585
      public String getFieldName() {
11586
        return _fieldName;
11587
      }
11588
    }
11589
 
11590
    // isset id assignments
11591
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
11592
    private BitSet __isset_bit_vector = new BitSet(1);
11593
 
3430 rajveer 11594
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 11595
    static {
3430 rajveer 11596
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11597
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11598
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11599
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11600
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_args.class, metaDataMap);
2462 chandransh 11601
    }
11602
 
3010 chandransh 11603
    public initializeHdfcPayment_args() {
2462 chandransh 11604
    }
11605
 
3010 chandransh 11606
    public initializeHdfcPayment_args(
2462 chandransh 11607
      long merchantPaymentId)
11608
    {
11609
      this();
11610
      this.merchantPaymentId = merchantPaymentId;
11611
      setMerchantPaymentIdIsSet(true);
11612
    }
11613
 
11614
    /**
11615
     * Performs a deep copy on <i>other</i>.
11616
     */
3010 chandransh 11617
    public initializeHdfcPayment_args(initializeHdfcPayment_args other) {
2462 chandransh 11618
      __isset_bit_vector.clear();
11619
      __isset_bit_vector.or(other.__isset_bit_vector);
11620
      this.merchantPaymentId = other.merchantPaymentId;
11621
    }
11622
 
3010 chandransh 11623
    public initializeHdfcPayment_args deepCopy() {
11624
      return new initializeHdfcPayment_args(this);
2462 chandransh 11625
    }
11626
 
3430 rajveer 11627
    @Override
11628
    public void clear() {
11629
      setMerchantPaymentIdIsSet(false);
11630
      this.merchantPaymentId = 0;
2462 chandransh 11631
    }
11632
 
11633
    public long getMerchantPaymentId() {
11634
      return this.merchantPaymentId;
11635
    }
11636
 
3430 rajveer 11637
    public void setMerchantPaymentId(long merchantPaymentId) {
2462 chandransh 11638
      this.merchantPaymentId = merchantPaymentId;
11639
      setMerchantPaymentIdIsSet(true);
11640
    }
11641
 
11642
    public void unsetMerchantPaymentId() {
11643
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
11644
    }
11645
 
3430 rajveer 11646
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
2462 chandransh 11647
    public boolean isSetMerchantPaymentId() {
11648
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
11649
    }
11650
 
11651
    public void setMerchantPaymentIdIsSet(boolean value) {
11652
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
11653
    }
11654
 
11655
    public void setFieldValue(_Fields field, Object value) {
11656
      switch (field) {
11657
      case MERCHANT_PAYMENT_ID:
11658
        if (value == null) {
11659
          unsetMerchantPaymentId();
11660
        } else {
11661
          setMerchantPaymentId((Long)value);
11662
        }
11663
        break;
11664
 
11665
      }
11666
    }
11667
 
11668
    public Object getFieldValue(_Fields field) {
11669
      switch (field) {
11670
      case MERCHANT_PAYMENT_ID:
3430 rajveer 11671
        return Long.valueOf(getMerchantPaymentId());
2462 chandransh 11672
 
11673
      }
11674
      throw new IllegalStateException();
11675
    }
11676
 
3430 rajveer 11677
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11678
    public boolean isSet(_Fields field) {
11679
      if (field == null) {
11680
        throw new IllegalArgumentException();
11681
      }
2462 chandransh 11682
 
11683
      switch (field) {
11684
      case MERCHANT_PAYMENT_ID:
11685
        return isSetMerchantPaymentId();
11686
      }
11687
      throw new IllegalStateException();
11688
    }
11689
 
11690
    @Override
11691
    public boolean equals(Object that) {
11692
      if (that == null)
11693
        return false;
3010 chandransh 11694
      if (that instanceof initializeHdfcPayment_args)
11695
        return this.equals((initializeHdfcPayment_args)that);
2462 chandransh 11696
      return false;
11697
    }
11698
 
3010 chandransh 11699
    public boolean equals(initializeHdfcPayment_args that) {
2462 chandransh 11700
      if (that == null)
11701
        return false;
11702
 
11703
      boolean this_present_merchantPaymentId = true;
11704
      boolean that_present_merchantPaymentId = true;
11705
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
11706
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
11707
          return false;
11708
        if (this.merchantPaymentId != that.merchantPaymentId)
11709
          return false;
11710
      }
11711
 
11712
      return true;
11713
    }
11714
 
11715
    @Override
11716
    public int hashCode() {
11717
      return 0;
11718
    }
11719
 
3010 chandransh 11720
    public int compareTo(initializeHdfcPayment_args other) {
2462 chandransh 11721
      if (!getClass().equals(other.getClass())) {
11722
        return getClass().getName().compareTo(other.getClass().getName());
11723
      }
11724
 
11725
      int lastComparison = 0;
3010 chandransh 11726
      initializeHdfcPayment_args typedOther = (initializeHdfcPayment_args)other;
2462 chandransh 11727
 
3430 rajveer 11728
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
2462 chandransh 11729
      if (lastComparison != 0) {
11730
        return lastComparison;
11731
      }
3430 rajveer 11732
      if (isSetMerchantPaymentId()) {
11733
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
11734
        if (lastComparison != 0) {
11735
          return lastComparison;
11736
        }
2462 chandransh 11737
      }
11738
      return 0;
11739
    }
11740
 
3430 rajveer 11741
    public _Fields fieldForId(int fieldId) {
11742
      return _Fields.findByThriftId(fieldId);
11743
    }
11744
 
11745
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11746
      org.apache.thrift.protocol.TField field;
2462 chandransh 11747
      iprot.readStructBegin();
11748
      while (true)
11749
      {
11750
        field = iprot.readFieldBegin();
3430 rajveer 11751
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 11752
          break;
11753
        }
3430 rajveer 11754
        switch (field.id) {
11755
          case 1: // MERCHANT_PAYMENT_ID
11756
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11757
              this.merchantPaymentId = iprot.readI64();
11758
              setMerchantPaymentIdIsSet(true);
11759
            } else { 
11760
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11761
            }
11762
            break;
11763
          default:
11764
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 11765
        }
3430 rajveer 11766
        iprot.readFieldEnd();
2462 chandransh 11767
      }
11768
      iprot.readStructEnd();
11769
      validate();
11770
    }
11771
 
3430 rajveer 11772
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 11773
      validate();
11774
 
11775
      oprot.writeStructBegin(STRUCT_DESC);
11776
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
11777
      oprot.writeI64(this.merchantPaymentId);
11778
      oprot.writeFieldEnd();
11779
      oprot.writeFieldStop();
11780
      oprot.writeStructEnd();
11781
    }
11782
 
11783
    @Override
11784
    public String toString() {
3010 chandransh 11785
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_args(");
2462 chandransh 11786
      boolean first = true;
11787
 
11788
      sb.append("merchantPaymentId:");
11789
      sb.append(this.merchantPaymentId);
11790
      first = false;
11791
      sb.append(")");
11792
      return sb.toString();
11793
    }
11794
 
3430 rajveer 11795
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 11796
      // check for required fields
11797
    }
11798
 
3430 rajveer 11799
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11800
      try {
11801
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11802
      } catch (org.apache.thrift.TException te) {
11803
        throw new java.io.IOException(te);
11804
      }
11805
    }
11806
 
11807
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11808
      try {
11809
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11810
      } catch (org.apache.thrift.TException te) {
11811
        throw new java.io.IOException(te);
11812
      }
11813
    }
11814
 
2462 chandransh 11815
  }
11816
 
3430 rajveer 11817
  public static class initializeHdfcPayment_result implements org.apache.thrift.TBase<initializeHdfcPayment_result, initializeHdfcPayment_result._Fields>, java.io.Serializable, Cloneable   {
11818
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_result");
2462 chandransh 11819
 
3430 rajveer 11820
    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);
11821
    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 11822
 
3430 rajveer 11823
    private String success; // required
11824
    private PaymentException pe; // required
2462 chandransh 11825
 
11826
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11827
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 11828
      SUCCESS((short)0, "success"),
11829
      PE((short)1, "pe");
11830
 
11831
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11832
 
11833
      static {
11834
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11835
          byName.put(field.getFieldName(), field);
11836
        }
11837
      }
11838
 
11839
      /**
11840
       * Find the _Fields constant that matches fieldId, or null if its not found.
11841
       */
11842
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11843
        switch(fieldId) {
11844
          case 0: // SUCCESS
11845
            return SUCCESS;
11846
          case 1: // PE
11847
            return PE;
11848
          default:
11849
            return null;
11850
        }
2462 chandransh 11851
      }
11852
 
11853
      /**
11854
       * Find the _Fields constant that matches fieldId, throwing an exception
11855
       * if it is not found.
11856
       */
11857
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11858
        _Fields fields = findByThriftId(fieldId);
11859
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11860
        return fields;
11861
      }
11862
 
11863
      /**
11864
       * Find the _Fields constant that matches name, or null if its not found.
11865
       */
11866
      public static _Fields findByName(String name) {
11867
        return byName.get(name);
11868
      }
11869
 
11870
      private final short _thriftId;
11871
      private final String _fieldName;
11872
 
11873
      _Fields(short thriftId, String fieldName) {
11874
        _thriftId = thriftId;
11875
        _fieldName = fieldName;
11876
      }
11877
 
11878
      public short getThriftFieldId() {
11879
        return _thriftId;
11880
      }
11881
 
11882
      public String getFieldName() {
11883
        return _fieldName;
11884
      }
11885
    }
11886
 
11887
    // isset id assignments
11888
 
3430 rajveer 11889
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 11890
    static {
3430 rajveer 11891
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11892
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11893
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
11894
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11895
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11896
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11897
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_result.class, metaDataMap);
2462 chandransh 11898
    }
11899
 
3010 chandransh 11900
    public initializeHdfcPayment_result() {
2462 chandransh 11901
    }
11902
 
3010 chandransh 11903
    public initializeHdfcPayment_result(
11904
      String success,
2462 chandransh 11905
      PaymentException pe)
11906
    {
11907
      this();
11908
      this.success = success;
11909
      this.pe = pe;
11910
    }
11911
 
11912
    /**
11913
     * Performs a deep copy on <i>other</i>.
11914
     */
3010 chandransh 11915
    public initializeHdfcPayment_result(initializeHdfcPayment_result other) {
2462 chandransh 11916
      if (other.isSetSuccess()) {
3010 chandransh 11917
        this.success = other.success;
2462 chandransh 11918
      }
11919
      if (other.isSetPe()) {
11920
        this.pe = new PaymentException(other.pe);
11921
      }
11922
    }
11923
 
3010 chandransh 11924
    public initializeHdfcPayment_result deepCopy() {
11925
      return new initializeHdfcPayment_result(this);
2462 chandransh 11926
    }
11927
 
3430 rajveer 11928
    @Override
11929
    public void clear() {
11930
      this.success = null;
11931
      this.pe = null;
2462 chandransh 11932
    }
11933
 
3010 chandransh 11934
    public String getSuccess() {
2462 chandransh 11935
      return this.success;
11936
    }
11937
 
3430 rajveer 11938
    public void setSuccess(String success) {
2462 chandransh 11939
      this.success = success;
11940
    }
11941
 
11942
    public void unsetSuccess() {
11943
      this.success = null;
11944
    }
11945
 
3430 rajveer 11946
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 11947
    public boolean isSetSuccess() {
11948
      return this.success != null;
11949
    }
11950
 
11951
    public void setSuccessIsSet(boolean value) {
11952
      if (!value) {
11953
        this.success = null;
11954
      }
11955
    }
11956
 
11957
    public PaymentException getPe() {
11958
      return this.pe;
11959
    }
11960
 
3430 rajveer 11961
    public void setPe(PaymentException pe) {
2462 chandransh 11962
      this.pe = pe;
11963
    }
11964
 
11965
    public void unsetPe() {
11966
      this.pe = null;
11967
    }
11968
 
3430 rajveer 11969
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 11970
    public boolean isSetPe() {
11971
      return this.pe != null;
11972
    }
11973
 
11974
    public void setPeIsSet(boolean value) {
11975
      if (!value) {
11976
        this.pe = null;
11977
      }
11978
    }
11979
 
11980
    public void setFieldValue(_Fields field, Object value) {
11981
      switch (field) {
11982
      case SUCCESS:
11983
        if (value == null) {
11984
          unsetSuccess();
11985
        } else {
3010 chandransh 11986
          setSuccess((String)value);
2462 chandransh 11987
        }
11988
        break;
11989
 
11990
      case PE:
11991
        if (value == null) {
11992
          unsetPe();
11993
        } else {
11994
          setPe((PaymentException)value);
11995
        }
11996
        break;
11997
 
11998
      }
11999
    }
12000
 
12001
    public Object getFieldValue(_Fields field) {
12002
      switch (field) {
12003
      case SUCCESS:
12004
        return getSuccess();
12005
 
12006
      case PE:
12007
        return getPe();
12008
 
12009
      }
12010
      throw new IllegalStateException();
12011
    }
12012
 
3430 rajveer 12013
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12014
    public boolean isSet(_Fields field) {
12015
      if (field == null) {
12016
        throw new IllegalArgumentException();
12017
      }
2462 chandransh 12018
 
12019
      switch (field) {
12020
      case SUCCESS:
12021
        return isSetSuccess();
12022
      case PE:
12023
        return isSetPe();
12024
      }
12025
      throw new IllegalStateException();
12026
    }
12027
 
12028
    @Override
12029
    public boolean equals(Object that) {
12030
      if (that == null)
12031
        return false;
3010 chandransh 12032
      if (that instanceof initializeHdfcPayment_result)
12033
        return this.equals((initializeHdfcPayment_result)that);
2462 chandransh 12034
      return false;
12035
    }
12036
 
3010 chandransh 12037
    public boolean equals(initializeHdfcPayment_result that) {
2462 chandransh 12038
      if (that == null)
12039
        return false;
12040
 
12041
      boolean this_present_success = true && this.isSetSuccess();
12042
      boolean that_present_success = true && that.isSetSuccess();
12043
      if (this_present_success || that_present_success) {
12044
        if (!(this_present_success && that_present_success))
12045
          return false;
12046
        if (!this.success.equals(that.success))
12047
          return false;
12048
      }
12049
 
12050
      boolean this_present_pe = true && this.isSetPe();
12051
      boolean that_present_pe = true && that.isSetPe();
12052
      if (this_present_pe || that_present_pe) {
12053
        if (!(this_present_pe && that_present_pe))
12054
          return false;
12055
        if (!this.pe.equals(that.pe))
12056
          return false;
12057
      }
12058
 
12059
      return true;
12060
    }
12061
 
12062
    @Override
12063
    public int hashCode() {
12064
      return 0;
12065
    }
12066
 
3010 chandransh 12067
    public int compareTo(initializeHdfcPayment_result other) {
12068
      if (!getClass().equals(other.getClass())) {
12069
        return getClass().getName().compareTo(other.getClass().getName());
12070
      }
12071
 
12072
      int lastComparison = 0;
12073
      initializeHdfcPayment_result typedOther = (initializeHdfcPayment_result)other;
12074
 
3430 rajveer 12075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3010 chandransh 12076
      if (lastComparison != 0) {
12077
        return lastComparison;
12078
      }
3430 rajveer 12079
      if (isSetSuccess()) {
12080
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12081
        if (lastComparison != 0) {
12082
          return lastComparison;
12083
        }
3010 chandransh 12084
      }
3430 rajveer 12085
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
3010 chandransh 12086
      if (lastComparison != 0) {
12087
        return lastComparison;
12088
      }
3430 rajveer 12089
      if (isSetPe()) {
12090
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
12091
        if (lastComparison != 0) {
12092
          return lastComparison;
12093
        }
3010 chandransh 12094
      }
12095
      return 0;
12096
    }
12097
 
3430 rajveer 12098
    public _Fields fieldForId(int fieldId) {
12099
      return _Fields.findByThriftId(fieldId);
12100
    }
12101
 
12102
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12103
      org.apache.thrift.protocol.TField field;
2462 chandransh 12104
      iprot.readStructBegin();
12105
      while (true)
12106
      {
12107
        field = iprot.readFieldBegin();
3430 rajveer 12108
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 12109
          break;
12110
        }
3430 rajveer 12111
        switch (field.id) {
12112
          case 0: // SUCCESS
12113
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12114
              this.success = iprot.readString();
12115
            } else { 
12116
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12117
            }
12118
            break;
12119
          case 1: // PE
12120
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12121
              this.pe = new PaymentException();
12122
              this.pe.read(iprot);
12123
            } else { 
12124
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12125
            }
12126
            break;
12127
          default:
12128
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 12129
        }
3430 rajveer 12130
        iprot.readFieldEnd();
2462 chandransh 12131
      }
12132
      iprot.readStructEnd();
12133
      validate();
12134
    }
12135
 
3430 rajveer 12136
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 12137
      oprot.writeStructBegin(STRUCT_DESC);
12138
 
12139
      if (this.isSetSuccess()) {
12140
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 12141
        oprot.writeString(this.success);
2462 chandransh 12142
        oprot.writeFieldEnd();
12143
      } else if (this.isSetPe()) {
12144
        oprot.writeFieldBegin(PE_FIELD_DESC);
12145
        this.pe.write(oprot);
12146
        oprot.writeFieldEnd();
12147
      }
12148
      oprot.writeFieldStop();
12149
      oprot.writeStructEnd();
12150
    }
12151
 
12152
    @Override
12153
    public String toString() {
3010 chandransh 12154
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_result(");
2462 chandransh 12155
      boolean first = true;
12156
 
12157
      sb.append("success:");
12158
      if (this.success == null) {
12159
        sb.append("null");
12160
      } else {
12161
        sb.append(this.success);
12162
      }
12163
      first = false;
12164
      if (!first) sb.append(", ");
12165
      sb.append("pe:");
12166
      if (this.pe == null) {
12167
        sb.append("null");
12168
      } else {
12169
        sb.append(this.pe);
12170
      }
12171
      first = false;
12172
      sb.append(")");
12173
      return sb.toString();
12174
    }
12175
 
3430 rajveer 12176
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 12177
      // check for required fields
12178
    }
12179
 
3430 rajveer 12180
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12181
      try {
12182
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12183
      } catch (org.apache.thrift.TException te) {
12184
        throw new java.io.IOException(te);
12185
      }
12186
    }
12187
 
12188
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12189
      try {
12190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12191
      } catch (org.apache.thrift.TException te) {
12192
        throw new java.io.IOException(te);
12193
      }
12194
    }
12195
 
2462 chandransh 12196
  }
12197
 
6050 anupam.sin 12198
  public static class doHdfcPaymentForDigitalOrder_args implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_args, doHdfcPaymentForDigitalOrder_args._Fields>, java.io.Serializable, Cloneable   {
12199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_args");
12200
 
12201
    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);
12202
    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 12203
    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 12204
 
12205
    private long merchantPaymentId; // required
12206
    private long rechargeOrderId; // required
6228 anupam.sin 12207
    private String phone; // required
6050 anupam.sin 12208
 
12209
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12210
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12211
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId"),
6228 anupam.sin 12212
      RECHARGE_ORDER_ID((short)2, "rechargeOrderId"),
12213
      PHONE((short)-1, "phone");
6050 anupam.sin 12214
 
12215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12216
 
12217
      static {
12218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12219
          byName.put(field.getFieldName(), field);
12220
        }
12221
      }
12222
 
12223
      /**
12224
       * Find the _Fields constant that matches fieldId, or null if its not found.
12225
       */
12226
      public static _Fields findByThriftId(int fieldId) {
12227
        switch(fieldId) {
12228
          case 1: // MERCHANT_PAYMENT_ID
12229
            return MERCHANT_PAYMENT_ID;
12230
          case 2: // RECHARGE_ORDER_ID
12231
            return RECHARGE_ORDER_ID;
6228 anupam.sin 12232
          case -1: // PHONE
12233
            return PHONE;
6050 anupam.sin 12234
          default:
12235
            return null;
12236
        }
12237
      }
12238
 
12239
      /**
12240
       * Find the _Fields constant that matches fieldId, throwing an exception
12241
       * if it is not found.
12242
       */
12243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12244
        _Fields fields = findByThriftId(fieldId);
12245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12246
        return fields;
12247
      }
12248
 
12249
      /**
12250
       * Find the _Fields constant that matches name, or null if its not found.
12251
       */
12252
      public static _Fields findByName(String name) {
12253
        return byName.get(name);
12254
      }
12255
 
12256
      private final short _thriftId;
12257
      private final String _fieldName;
12258
 
12259
      _Fields(short thriftId, String fieldName) {
12260
        _thriftId = thriftId;
12261
        _fieldName = fieldName;
12262
      }
12263
 
12264
      public short getThriftFieldId() {
12265
        return _thriftId;
12266
      }
12267
 
12268
      public String getFieldName() {
12269
        return _fieldName;
12270
      }
12271
    }
12272
 
12273
    // isset id assignments
12274
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
12275
    private static final int __RECHARGEORDERID_ISSET_ID = 1;
12276
    private BitSet __isset_bit_vector = new BitSet(2);
12277
 
12278
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12279
    static {
12280
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12281
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12282
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12283
      tmpMap.put(_Fields.RECHARGE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("rechargeOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12284
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6228 anupam.sin 12285
      tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12286
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6050 anupam.sin 12287
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12288
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_args.class, metaDataMap);
12289
    }
12290
 
12291
    public doHdfcPaymentForDigitalOrder_args() {
12292
    }
12293
 
12294
    public doHdfcPaymentForDigitalOrder_args(
12295
      long merchantPaymentId,
6228 anupam.sin 12296
      long rechargeOrderId,
12297
      String phone)
6050 anupam.sin 12298
    {
12299
      this();
12300
      this.merchantPaymentId = merchantPaymentId;
12301
      setMerchantPaymentIdIsSet(true);
12302
      this.rechargeOrderId = rechargeOrderId;
12303
      setRechargeOrderIdIsSet(true);
6228 anupam.sin 12304
      this.phone = phone;
6050 anupam.sin 12305
    }
12306
 
12307
    /**
12308
     * Performs a deep copy on <i>other</i>.
12309
     */
12310
    public doHdfcPaymentForDigitalOrder_args(doHdfcPaymentForDigitalOrder_args other) {
12311
      __isset_bit_vector.clear();
12312
      __isset_bit_vector.or(other.__isset_bit_vector);
12313
      this.merchantPaymentId = other.merchantPaymentId;
12314
      this.rechargeOrderId = other.rechargeOrderId;
6228 anupam.sin 12315
      if (other.isSetPhone()) {
12316
        this.phone = other.phone;
12317
      }
6050 anupam.sin 12318
    }
12319
 
12320
    public doHdfcPaymentForDigitalOrder_args deepCopy() {
12321
      return new doHdfcPaymentForDigitalOrder_args(this);
12322
    }
12323
 
12324
    @Override
12325
    public void clear() {
12326
      setMerchantPaymentIdIsSet(false);
12327
      this.merchantPaymentId = 0;
12328
      setRechargeOrderIdIsSet(false);
12329
      this.rechargeOrderId = 0;
6228 anupam.sin 12330
      this.phone = null;
6050 anupam.sin 12331
    }
12332
 
12333
    public long getMerchantPaymentId() {
12334
      return this.merchantPaymentId;
12335
    }
12336
 
12337
    public void setMerchantPaymentId(long merchantPaymentId) {
12338
      this.merchantPaymentId = merchantPaymentId;
12339
      setMerchantPaymentIdIsSet(true);
12340
    }
12341
 
12342
    public void unsetMerchantPaymentId() {
12343
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
12344
    }
12345
 
12346
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
12347
    public boolean isSetMerchantPaymentId() {
12348
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
12349
    }
12350
 
12351
    public void setMerchantPaymentIdIsSet(boolean value) {
12352
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
12353
    }
12354
 
12355
    public long getRechargeOrderId() {
12356
      return this.rechargeOrderId;
12357
    }
12358
 
12359
    public void setRechargeOrderId(long rechargeOrderId) {
12360
      this.rechargeOrderId = rechargeOrderId;
12361
      setRechargeOrderIdIsSet(true);
12362
    }
12363
 
12364
    public void unsetRechargeOrderId() {
12365
      __isset_bit_vector.clear(__RECHARGEORDERID_ISSET_ID);
12366
    }
12367
 
12368
    /** Returns true if field rechargeOrderId is set (has been assigned a value) and false otherwise */
12369
    public boolean isSetRechargeOrderId() {
12370
      return __isset_bit_vector.get(__RECHARGEORDERID_ISSET_ID);
12371
    }
12372
 
12373
    public void setRechargeOrderIdIsSet(boolean value) {
12374
      __isset_bit_vector.set(__RECHARGEORDERID_ISSET_ID, value);
12375
    }
12376
 
6228 anupam.sin 12377
    public String getPhone() {
12378
      return this.phone;
12379
    }
12380
 
12381
    public void setPhone(String phone) {
12382
      this.phone = phone;
12383
    }
12384
 
12385
    public void unsetPhone() {
12386
      this.phone = null;
12387
    }
12388
 
12389
    /** Returns true if field phone is set (has been assigned a value) and false otherwise */
12390
    public boolean isSetPhone() {
12391
      return this.phone != null;
12392
    }
12393
 
12394
    public void setPhoneIsSet(boolean value) {
12395
      if (!value) {
12396
        this.phone = null;
12397
      }
12398
    }
12399
 
6050 anupam.sin 12400
    public void setFieldValue(_Fields field, Object value) {
12401
      switch (field) {
12402
      case MERCHANT_PAYMENT_ID:
12403
        if (value == null) {
12404
          unsetMerchantPaymentId();
12405
        } else {
12406
          setMerchantPaymentId((Long)value);
12407
        }
12408
        break;
12409
 
12410
      case RECHARGE_ORDER_ID:
12411
        if (value == null) {
12412
          unsetRechargeOrderId();
12413
        } else {
12414
          setRechargeOrderId((Long)value);
12415
        }
12416
        break;
12417
 
6228 anupam.sin 12418
      case PHONE:
12419
        if (value == null) {
12420
          unsetPhone();
12421
        } else {
12422
          setPhone((String)value);
12423
        }
12424
        break;
12425
 
6050 anupam.sin 12426
      }
12427
    }
12428
 
12429
    public Object getFieldValue(_Fields field) {
12430
      switch (field) {
12431
      case MERCHANT_PAYMENT_ID:
12432
        return Long.valueOf(getMerchantPaymentId());
12433
 
12434
      case RECHARGE_ORDER_ID:
12435
        return Long.valueOf(getRechargeOrderId());
12436
 
6228 anupam.sin 12437
      case PHONE:
12438
        return getPhone();
12439
 
6050 anupam.sin 12440
      }
12441
      throw new IllegalStateException();
12442
    }
12443
 
12444
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12445
    public boolean isSet(_Fields field) {
12446
      if (field == null) {
12447
        throw new IllegalArgumentException();
12448
      }
12449
 
12450
      switch (field) {
12451
      case MERCHANT_PAYMENT_ID:
12452
        return isSetMerchantPaymentId();
12453
      case RECHARGE_ORDER_ID:
12454
        return isSetRechargeOrderId();
6228 anupam.sin 12455
      case PHONE:
12456
        return isSetPhone();
6050 anupam.sin 12457
      }
12458
      throw new IllegalStateException();
12459
    }
12460
 
12461
    @Override
12462
    public boolean equals(Object that) {
12463
      if (that == null)
12464
        return false;
12465
      if (that instanceof doHdfcPaymentForDigitalOrder_args)
12466
        return this.equals((doHdfcPaymentForDigitalOrder_args)that);
12467
      return false;
12468
    }
12469
 
12470
    public boolean equals(doHdfcPaymentForDigitalOrder_args that) {
12471
      if (that == null)
12472
        return false;
12473
 
12474
      boolean this_present_merchantPaymentId = true;
12475
      boolean that_present_merchantPaymentId = true;
12476
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
12477
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
12478
          return false;
12479
        if (this.merchantPaymentId != that.merchantPaymentId)
12480
          return false;
12481
      }
12482
 
12483
      boolean this_present_rechargeOrderId = true;
12484
      boolean that_present_rechargeOrderId = true;
12485
      if (this_present_rechargeOrderId || that_present_rechargeOrderId) {
12486
        if (!(this_present_rechargeOrderId && that_present_rechargeOrderId))
12487
          return false;
12488
        if (this.rechargeOrderId != that.rechargeOrderId)
12489
          return false;
12490
      }
12491
 
6228 anupam.sin 12492
      boolean this_present_phone = true && this.isSetPhone();
12493
      boolean that_present_phone = true && that.isSetPhone();
12494
      if (this_present_phone || that_present_phone) {
12495
        if (!(this_present_phone && that_present_phone))
12496
          return false;
12497
        if (!this.phone.equals(that.phone))
12498
          return false;
12499
      }
12500
 
6050 anupam.sin 12501
      return true;
12502
    }
12503
 
12504
    @Override
12505
    public int hashCode() {
12506
      return 0;
12507
    }
12508
 
12509
    public int compareTo(doHdfcPaymentForDigitalOrder_args other) {
12510
      if (!getClass().equals(other.getClass())) {
12511
        return getClass().getName().compareTo(other.getClass().getName());
12512
      }
12513
 
12514
      int lastComparison = 0;
12515
      doHdfcPaymentForDigitalOrder_args typedOther = (doHdfcPaymentForDigitalOrder_args)other;
12516
 
12517
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
12518
      if (lastComparison != 0) {
12519
        return lastComparison;
12520
      }
12521
      if (isSetMerchantPaymentId()) {
12522
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
12523
        if (lastComparison != 0) {
12524
          return lastComparison;
12525
        }
12526
      }
12527
      lastComparison = Boolean.valueOf(isSetRechargeOrderId()).compareTo(typedOther.isSetRechargeOrderId());
12528
      if (lastComparison != 0) {
12529
        return lastComparison;
12530
      }
12531
      if (isSetRechargeOrderId()) {
12532
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeOrderId, typedOther.rechargeOrderId);
12533
        if (lastComparison != 0) {
12534
          return lastComparison;
12535
        }
12536
      }
6228 anupam.sin 12537
      lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
12538
      if (lastComparison != 0) {
12539
        return lastComparison;
12540
      }
12541
      if (isSetPhone()) {
12542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
12543
        if (lastComparison != 0) {
12544
          return lastComparison;
12545
        }
12546
      }
6050 anupam.sin 12547
      return 0;
12548
    }
12549
 
12550
    public _Fields fieldForId(int fieldId) {
12551
      return _Fields.findByThriftId(fieldId);
12552
    }
12553
 
12554
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12555
      org.apache.thrift.protocol.TField field;
12556
      iprot.readStructBegin();
12557
      while (true)
12558
      {
12559
        field = iprot.readFieldBegin();
12560
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12561
          break;
12562
        }
12563
        switch (field.id) {
12564
          case 1: // MERCHANT_PAYMENT_ID
12565
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12566
              this.merchantPaymentId = iprot.readI64();
12567
              setMerchantPaymentIdIsSet(true);
12568
            } else { 
12569
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12570
            }
12571
            break;
12572
          case 2: // RECHARGE_ORDER_ID
12573
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12574
              this.rechargeOrderId = iprot.readI64();
12575
              setRechargeOrderIdIsSet(true);
12576
            } else { 
12577
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12578
            }
12579
            break;
6228 anupam.sin 12580
          case -1: // PHONE
12581
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12582
              this.phone = iprot.readString();
12583
            } else { 
12584
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12585
            }
12586
            break;
6050 anupam.sin 12587
          default:
12588
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12589
        }
12590
        iprot.readFieldEnd();
12591
      }
12592
      iprot.readStructEnd();
12593
      validate();
12594
    }
12595
 
12596
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12597
      validate();
12598
 
12599
      oprot.writeStructBegin(STRUCT_DESC);
6228 anupam.sin 12600
      if (this.phone != null) {
12601
        oprot.writeFieldBegin(PHONE_FIELD_DESC);
12602
        oprot.writeString(this.phone);
12603
        oprot.writeFieldEnd();
12604
      }
6050 anupam.sin 12605
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
12606
      oprot.writeI64(this.merchantPaymentId);
12607
      oprot.writeFieldEnd();
12608
      oprot.writeFieldBegin(RECHARGE_ORDER_ID_FIELD_DESC);
12609
      oprot.writeI64(this.rechargeOrderId);
12610
      oprot.writeFieldEnd();
12611
      oprot.writeFieldStop();
12612
      oprot.writeStructEnd();
12613
    }
12614
 
12615
    @Override
12616
    public String toString() {
12617
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_args(");
12618
      boolean first = true;
12619
 
12620
      sb.append("merchantPaymentId:");
12621
      sb.append(this.merchantPaymentId);
12622
      first = false;
12623
      if (!first) sb.append(", ");
12624
      sb.append("rechargeOrderId:");
12625
      sb.append(this.rechargeOrderId);
12626
      first = false;
6228 anupam.sin 12627
      if (!first) sb.append(", ");
12628
      sb.append("phone:");
12629
      if (this.phone == null) {
12630
        sb.append("null");
12631
      } else {
12632
        sb.append(this.phone);
12633
      }
12634
      first = false;
6050 anupam.sin 12635
      sb.append(")");
12636
      return sb.toString();
12637
    }
12638
 
12639
    public void validate() throws org.apache.thrift.TException {
12640
      // check for required fields
12641
    }
12642
 
12643
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12644
      try {
12645
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12646
      } catch (org.apache.thrift.TException te) {
12647
        throw new java.io.IOException(te);
12648
      }
12649
    }
12650
 
12651
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12652
      try {
12653
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12654
      } catch (org.apache.thrift.TException te) {
12655
        throw new java.io.IOException(te);
12656
      }
12657
    }
12658
 
12659
  }
12660
 
12661
  public static class doHdfcPaymentForDigitalOrder_result implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_result, doHdfcPaymentForDigitalOrder_result._Fields>, java.io.Serializable, Cloneable   {
12662
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_result");
12663
 
12664
    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);
12665
    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);
12666
 
12667
    private String success; // required
12668
    private PaymentException pe; // required
12669
 
12670
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12671
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12672
      SUCCESS((short)0, "success"),
12673
      PE((short)1, "pe");
12674
 
12675
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12676
 
12677
      static {
12678
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12679
          byName.put(field.getFieldName(), field);
12680
        }
12681
      }
12682
 
12683
      /**
12684
       * Find the _Fields constant that matches fieldId, or null if its not found.
12685
       */
12686
      public static _Fields findByThriftId(int fieldId) {
12687
        switch(fieldId) {
12688
          case 0: // SUCCESS
12689
            return SUCCESS;
12690
          case 1: // PE
12691
            return PE;
12692
          default:
12693
            return null;
12694
        }
12695
      }
12696
 
12697
      /**
12698
       * Find the _Fields constant that matches fieldId, throwing an exception
12699
       * if it is not found.
12700
       */
12701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12702
        _Fields fields = findByThriftId(fieldId);
12703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12704
        return fields;
12705
      }
12706
 
12707
      /**
12708
       * Find the _Fields constant that matches name, or null if its not found.
12709
       */
12710
      public static _Fields findByName(String name) {
12711
        return byName.get(name);
12712
      }
12713
 
12714
      private final short _thriftId;
12715
      private final String _fieldName;
12716
 
12717
      _Fields(short thriftId, String fieldName) {
12718
        _thriftId = thriftId;
12719
        _fieldName = fieldName;
12720
      }
12721
 
12722
      public short getThriftFieldId() {
12723
        return _thriftId;
12724
      }
12725
 
12726
      public String getFieldName() {
12727
        return _fieldName;
12728
      }
12729
    }
12730
 
12731
    // isset id assignments
12732
 
12733
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12734
    static {
12735
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12736
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12737
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12738
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12739
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_result.class, metaDataMap);
12742
    }
12743
 
12744
    public doHdfcPaymentForDigitalOrder_result() {
12745
    }
12746
 
12747
    public doHdfcPaymentForDigitalOrder_result(
12748
      String success,
12749
      PaymentException pe)
12750
    {
12751
      this();
12752
      this.success = success;
12753
      this.pe = pe;
12754
    }
12755
 
12756
    /**
12757
     * Performs a deep copy on <i>other</i>.
12758
     */
12759
    public doHdfcPaymentForDigitalOrder_result(doHdfcPaymentForDigitalOrder_result other) {
12760
      if (other.isSetSuccess()) {
12761
        this.success = other.success;
12762
      }
12763
      if (other.isSetPe()) {
12764
        this.pe = new PaymentException(other.pe);
12765
      }
12766
    }
12767
 
12768
    public doHdfcPaymentForDigitalOrder_result deepCopy() {
12769
      return new doHdfcPaymentForDigitalOrder_result(this);
12770
    }
12771
 
12772
    @Override
12773
    public void clear() {
12774
      this.success = null;
12775
      this.pe = null;
12776
    }
12777
 
12778
    public String getSuccess() {
12779
      return this.success;
12780
    }
12781
 
12782
    public void setSuccess(String success) {
12783
      this.success = success;
12784
    }
12785
 
12786
    public void unsetSuccess() {
12787
      this.success = null;
12788
    }
12789
 
12790
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12791
    public boolean isSetSuccess() {
12792
      return this.success != null;
12793
    }
12794
 
12795
    public void setSuccessIsSet(boolean value) {
12796
      if (!value) {
12797
        this.success = null;
12798
      }
12799
    }
12800
 
12801
    public PaymentException getPe() {
12802
      return this.pe;
12803
    }
12804
 
12805
    public void setPe(PaymentException pe) {
12806
      this.pe = pe;
12807
    }
12808
 
12809
    public void unsetPe() {
12810
      this.pe = null;
12811
    }
12812
 
12813
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
12814
    public boolean isSetPe() {
12815
      return this.pe != null;
12816
    }
12817
 
12818
    public void setPeIsSet(boolean value) {
12819
      if (!value) {
12820
        this.pe = null;
12821
      }
12822
    }
12823
 
12824
    public void setFieldValue(_Fields field, Object value) {
12825
      switch (field) {
12826
      case SUCCESS:
12827
        if (value == null) {
12828
          unsetSuccess();
12829
        } else {
12830
          setSuccess((String)value);
12831
        }
12832
        break;
12833
 
12834
      case PE:
12835
        if (value == null) {
12836
          unsetPe();
12837
        } else {
12838
          setPe((PaymentException)value);
12839
        }
12840
        break;
12841
 
12842
      }
12843
    }
12844
 
12845
    public Object getFieldValue(_Fields field) {
12846
      switch (field) {
12847
      case SUCCESS:
12848
        return getSuccess();
12849
 
12850
      case PE:
12851
        return getPe();
12852
 
12853
      }
12854
      throw new IllegalStateException();
12855
    }
12856
 
12857
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12858
    public boolean isSet(_Fields field) {
12859
      if (field == null) {
12860
        throw new IllegalArgumentException();
12861
      }
12862
 
12863
      switch (field) {
12864
      case SUCCESS:
12865
        return isSetSuccess();
12866
      case PE:
12867
        return isSetPe();
12868
      }
12869
      throw new IllegalStateException();
12870
    }
12871
 
12872
    @Override
12873
    public boolean equals(Object that) {
12874
      if (that == null)
12875
        return false;
12876
      if (that instanceof doHdfcPaymentForDigitalOrder_result)
12877
        return this.equals((doHdfcPaymentForDigitalOrder_result)that);
12878
      return false;
12879
    }
12880
 
12881
    public boolean equals(doHdfcPaymentForDigitalOrder_result that) {
12882
      if (that == null)
12883
        return false;
12884
 
12885
      boolean this_present_success = true && this.isSetSuccess();
12886
      boolean that_present_success = true && that.isSetSuccess();
12887
      if (this_present_success || that_present_success) {
12888
        if (!(this_present_success && that_present_success))
12889
          return false;
12890
        if (!this.success.equals(that.success))
12891
          return false;
12892
      }
12893
 
12894
      boolean this_present_pe = true && this.isSetPe();
12895
      boolean that_present_pe = true && that.isSetPe();
12896
      if (this_present_pe || that_present_pe) {
12897
        if (!(this_present_pe && that_present_pe))
12898
          return false;
12899
        if (!this.pe.equals(that.pe))
12900
          return false;
12901
      }
12902
 
12903
      return true;
12904
    }
12905
 
12906
    @Override
12907
    public int hashCode() {
12908
      return 0;
12909
    }
12910
 
12911
    public int compareTo(doHdfcPaymentForDigitalOrder_result other) {
12912
      if (!getClass().equals(other.getClass())) {
12913
        return getClass().getName().compareTo(other.getClass().getName());
12914
      }
12915
 
12916
      int lastComparison = 0;
12917
      doHdfcPaymentForDigitalOrder_result typedOther = (doHdfcPaymentForDigitalOrder_result)other;
12918
 
12919
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12920
      if (lastComparison != 0) {
12921
        return lastComparison;
12922
      }
12923
      if (isSetSuccess()) {
12924
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12925
        if (lastComparison != 0) {
12926
          return lastComparison;
12927
        }
12928
      }
12929
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
12930
      if (lastComparison != 0) {
12931
        return lastComparison;
12932
      }
12933
      if (isSetPe()) {
12934
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
12935
        if (lastComparison != 0) {
12936
          return lastComparison;
12937
        }
12938
      }
12939
      return 0;
12940
    }
12941
 
12942
    public _Fields fieldForId(int fieldId) {
12943
      return _Fields.findByThriftId(fieldId);
12944
    }
12945
 
12946
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12947
      org.apache.thrift.protocol.TField field;
12948
      iprot.readStructBegin();
12949
      while (true)
12950
      {
12951
        field = iprot.readFieldBegin();
12952
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12953
          break;
12954
        }
12955
        switch (field.id) {
12956
          case 0: // SUCCESS
12957
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12958
              this.success = iprot.readString();
12959
            } else { 
12960
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12961
            }
12962
            break;
12963
          case 1: // PE
12964
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12965
              this.pe = new PaymentException();
12966
              this.pe.read(iprot);
12967
            } else { 
12968
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12969
            }
12970
            break;
12971
          default:
12972
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12973
        }
12974
        iprot.readFieldEnd();
12975
      }
12976
      iprot.readStructEnd();
12977
      validate();
12978
    }
12979
 
12980
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12981
      oprot.writeStructBegin(STRUCT_DESC);
12982
 
12983
      if (this.isSetSuccess()) {
12984
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12985
        oprot.writeString(this.success);
12986
        oprot.writeFieldEnd();
12987
      } else if (this.isSetPe()) {
12988
        oprot.writeFieldBegin(PE_FIELD_DESC);
12989
        this.pe.write(oprot);
12990
        oprot.writeFieldEnd();
12991
      }
12992
      oprot.writeFieldStop();
12993
      oprot.writeStructEnd();
12994
    }
12995
 
12996
    @Override
12997
    public String toString() {
12998
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_result(");
12999
      boolean first = true;
13000
 
13001
      sb.append("success:");
13002
      if (this.success == null) {
13003
        sb.append("null");
13004
      } else {
13005
        sb.append(this.success);
13006
      }
13007
      first = false;
13008
      if (!first) sb.append(", ");
13009
      sb.append("pe:");
13010
      if (this.pe == null) {
13011
        sb.append("null");
13012
      } else {
13013
        sb.append(this.pe);
13014
      }
13015
      first = false;
13016
      sb.append(")");
13017
      return sb.toString();
13018
    }
13019
 
13020
    public void validate() throws org.apache.thrift.TException {
13021
      // check for required fields
13022
    }
13023
 
13024
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13025
      try {
13026
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13027
      } catch (org.apache.thrift.TException te) {
13028
        throw new java.io.IOException(te);
13029
      }
13030
    }
13031
 
13032
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13033
      try {
13034
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13035
      } catch (org.apache.thrift.TException te) {
13036
        throw new java.io.IOException(te);
13037
      }
13038
    }
13039
 
13040
  }
13041
 
3616 chandransh 13042
  public static class initializeHdfcEmiPayment_args implements org.apache.thrift.TBase<initializeHdfcEmiPayment_args, initializeHdfcEmiPayment_args._Fields>, java.io.Serializable, Cloneable   {
13043
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_args");
13044
 
13045
    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);
13046
 
13047
    private long merchantPaymentId; // required
13048
 
13049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13050
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13051
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
13052
 
13053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13054
 
13055
      static {
13056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13057
          byName.put(field.getFieldName(), field);
13058
        }
13059
      }
13060
 
13061
      /**
13062
       * Find the _Fields constant that matches fieldId, or null if its not found.
13063
       */
13064
      public static _Fields findByThriftId(int fieldId) {
13065
        switch(fieldId) {
13066
          case 1: // MERCHANT_PAYMENT_ID
13067
            return MERCHANT_PAYMENT_ID;
13068
          default:
13069
            return null;
13070
        }
13071
      }
13072
 
13073
      /**
13074
       * Find the _Fields constant that matches fieldId, throwing an exception
13075
       * if it is not found.
13076
       */
13077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13078
        _Fields fields = findByThriftId(fieldId);
13079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13080
        return fields;
13081
      }
13082
 
13083
      /**
13084
       * Find the _Fields constant that matches name, or null if its not found.
13085
       */
13086
      public static _Fields findByName(String name) {
13087
        return byName.get(name);
13088
      }
13089
 
13090
      private final short _thriftId;
13091
      private final String _fieldName;
13092
 
13093
      _Fields(short thriftId, String fieldName) {
13094
        _thriftId = thriftId;
13095
        _fieldName = fieldName;
13096
      }
13097
 
13098
      public short getThriftFieldId() {
13099
        return _thriftId;
13100
      }
13101
 
13102
      public String getFieldName() {
13103
        return _fieldName;
13104
      }
13105
    }
13106
 
13107
    // isset id assignments
13108
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
13109
    private BitSet __isset_bit_vector = new BitSet(1);
13110
 
13111
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13112
    static {
13113
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13114
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13115
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13116
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13117
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_args.class, metaDataMap);
13118
    }
13119
 
13120
    public initializeHdfcEmiPayment_args() {
13121
    }
13122
 
13123
    public initializeHdfcEmiPayment_args(
13124
      long merchantPaymentId)
13125
    {
13126
      this();
13127
      this.merchantPaymentId = merchantPaymentId;
13128
      setMerchantPaymentIdIsSet(true);
13129
    }
13130
 
13131
    /**
13132
     * Performs a deep copy on <i>other</i>.
13133
     */
13134
    public initializeHdfcEmiPayment_args(initializeHdfcEmiPayment_args other) {
13135
      __isset_bit_vector.clear();
13136
      __isset_bit_vector.or(other.__isset_bit_vector);
13137
      this.merchantPaymentId = other.merchantPaymentId;
13138
    }
13139
 
13140
    public initializeHdfcEmiPayment_args deepCopy() {
13141
      return new initializeHdfcEmiPayment_args(this);
13142
    }
13143
 
13144
    @Override
13145
    public void clear() {
13146
      setMerchantPaymentIdIsSet(false);
13147
      this.merchantPaymentId = 0;
13148
    }
13149
 
13150
    public long getMerchantPaymentId() {
13151
      return this.merchantPaymentId;
13152
    }
13153
 
13154
    public void setMerchantPaymentId(long merchantPaymentId) {
13155
      this.merchantPaymentId = merchantPaymentId;
13156
      setMerchantPaymentIdIsSet(true);
13157
    }
13158
 
13159
    public void unsetMerchantPaymentId() {
13160
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
13161
    }
13162
 
13163
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
13164
    public boolean isSetMerchantPaymentId() {
13165
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
13166
    }
13167
 
13168
    public void setMerchantPaymentIdIsSet(boolean value) {
13169
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
13170
    }
13171
 
13172
    public void setFieldValue(_Fields field, Object value) {
13173
      switch (field) {
13174
      case MERCHANT_PAYMENT_ID:
13175
        if (value == null) {
13176
          unsetMerchantPaymentId();
13177
        } else {
13178
          setMerchantPaymentId((Long)value);
13179
        }
13180
        break;
13181
 
13182
      }
13183
    }
13184
 
13185
    public Object getFieldValue(_Fields field) {
13186
      switch (field) {
13187
      case MERCHANT_PAYMENT_ID:
13188
        return Long.valueOf(getMerchantPaymentId());
13189
 
13190
      }
13191
      throw new IllegalStateException();
13192
    }
13193
 
13194
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13195
    public boolean isSet(_Fields field) {
13196
      if (field == null) {
13197
        throw new IllegalArgumentException();
13198
      }
13199
 
13200
      switch (field) {
13201
      case MERCHANT_PAYMENT_ID:
13202
        return isSetMerchantPaymentId();
13203
      }
13204
      throw new IllegalStateException();
13205
    }
13206
 
13207
    @Override
13208
    public boolean equals(Object that) {
13209
      if (that == null)
13210
        return false;
13211
      if (that instanceof initializeHdfcEmiPayment_args)
13212
        return this.equals((initializeHdfcEmiPayment_args)that);
13213
      return false;
13214
    }
13215
 
13216
    public boolean equals(initializeHdfcEmiPayment_args that) {
13217
      if (that == null)
13218
        return false;
13219
 
13220
      boolean this_present_merchantPaymentId = true;
13221
      boolean that_present_merchantPaymentId = true;
13222
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
13223
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
13224
          return false;
13225
        if (this.merchantPaymentId != that.merchantPaymentId)
13226
          return false;
13227
      }
13228
 
13229
      return true;
13230
    }
13231
 
13232
    @Override
13233
    public int hashCode() {
13234
      return 0;
13235
    }
13236
 
13237
    public int compareTo(initializeHdfcEmiPayment_args other) {
13238
      if (!getClass().equals(other.getClass())) {
13239
        return getClass().getName().compareTo(other.getClass().getName());
13240
      }
13241
 
13242
      int lastComparison = 0;
13243
      initializeHdfcEmiPayment_args typedOther = (initializeHdfcEmiPayment_args)other;
13244
 
13245
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
13246
      if (lastComparison != 0) {
13247
        return lastComparison;
13248
      }
13249
      if (isSetMerchantPaymentId()) {
13250
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
13251
        if (lastComparison != 0) {
13252
          return lastComparison;
13253
        }
13254
      }
13255
      return 0;
13256
    }
13257
 
13258
    public _Fields fieldForId(int fieldId) {
13259
      return _Fields.findByThriftId(fieldId);
13260
    }
13261
 
13262
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13263
      org.apache.thrift.protocol.TField field;
13264
      iprot.readStructBegin();
13265
      while (true)
13266
      {
13267
        field = iprot.readFieldBegin();
13268
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13269
          break;
13270
        }
13271
        switch (field.id) {
13272
          case 1: // MERCHANT_PAYMENT_ID
13273
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13274
              this.merchantPaymentId = iprot.readI64();
13275
              setMerchantPaymentIdIsSet(true);
13276
            } else { 
13277
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13278
            }
13279
            break;
13280
          default:
13281
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13282
        }
13283
        iprot.readFieldEnd();
13284
      }
13285
      iprot.readStructEnd();
13286
      validate();
13287
    }
13288
 
13289
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13290
      validate();
13291
 
13292
      oprot.writeStructBegin(STRUCT_DESC);
13293
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
13294
      oprot.writeI64(this.merchantPaymentId);
13295
      oprot.writeFieldEnd();
13296
      oprot.writeFieldStop();
13297
      oprot.writeStructEnd();
13298
    }
13299
 
13300
    @Override
13301
    public String toString() {
13302
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_args(");
13303
      boolean first = true;
13304
 
13305
      sb.append("merchantPaymentId:");
13306
      sb.append(this.merchantPaymentId);
13307
      first = false;
13308
      sb.append(")");
13309
      return sb.toString();
13310
    }
13311
 
13312
    public void validate() throws org.apache.thrift.TException {
13313
      // check for required fields
13314
    }
13315
 
13316
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13317
      try {
13318
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13319
      } catch (org.apache.thrift.TException te) {
13320
        throw new java.io.IOException(te);
13321
      }
13322
    }
13323
 
13324
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13325
      try {
13326
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13327
      } catch (org.apache.thrift.TException te) {
13328
        throw new java.io.IOException(te);
13329
      }
13330
    }
13331
 
13332
  }
13333
 
13334
  public static class initializeHdfcEmiPayment_result implements org.apache.thrift.TBase<initializeHdfcEmiPayment_result, initializeHdfcEmiPayment_result._Fields>, java.io.Serializable, Cloneable   {
13335
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_result");
13336
 
13337
    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);
13338
    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);
13339
 
13340
    private String success; // required
13341
    private PaymentException pe; // required
13342
 
13343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13344
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13345
      SUCCESS((short)0, "success"),
13346
      PE((short)1, "pe");
13347
 
13348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13349
 
13350
      static {
13351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13352
          byName.put(field.getFieldName(), field);
13353
        }
13354
      }
13355
 
13356
      /**
13357
       * Find the _Fields constant that matches fieldId, or null if its not found.
13358
       */
13359
      public static _Fields findByThriftId(int fieldId) {
13360
        switch(fieldId) {
13361
          case 0: // SUCCESS
13362
            return SUCCESS;
13363
          case 1: // PE
13364
            return PE;
13365
          default:
13366
            return null;
13367
        }
13368
      }
13369
 
13370
      /**
13371
       * Find the _Fields constant that matches fieldId, throwing an exception
13372
       * if it is not found.
13373
       */
13374
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13375
        _Fields fields = findByThriftId(fieldId);
13376
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13377
        return fields;
13378
      }
13379
 
13380
      /**
13381
       * Find the _Fields constant that matches name, or null if its not found.
13382
       */
13383
      public static _Fields findByName(String name) {
13384
        return byName.get(name);
13385
      }
13386
 
13387
      private final short _thriftId;
13388
      private final String _fieldName;
13389
 
13390
      _Fields(short thriftId, String fieldName) {
13391
        _thriftId = thriftId;
13392
        _fieldName = fieldName;
13393
      }
13394
 
13395
      public short getThriftFieldId() {
13396
        return _thriftId;
13397
      }
13398
 
13399
      public String getFieldName() {
13400
        return _fieldName;
13401
      }
13402
    }
13403
 
13404
    // isset id assignments
13405
 
13406
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13407
    static {
13408
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13409
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13410
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
13411
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13412
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13413
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13414
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_result.class, metaDataMap);
13415
    }
13416
 
13417
    public initializeHdfcEmiPayment_result() {
13418
    }
13419
 
13420
    public initializeHdfcEmiPayment_result(
13421
      String success,
13422
      PaymentException pe)
13423
    {
13424
      this();
13425
      this.success = success;
13426
      this.pe = pe;
13427
    }
13428
 
13429
    /**
13430
     * Performs a deep copy on <i>other</i>.
13431
     */
13432
    public initializeHdfcEmiPayment_result(initializeHdfcEmiPayment_result other) {
13433
      if (other.isSetSuccess()) {
13434
        this.success = other.success;
13435
      }
13436
      if (other.isSetPe()) {
13437
        this.pe = new PaymentException(other.pe);
13438
      }
13439
    }
13440
 
13441
    public initializeHdfcEmiPayment_result deepCopy() {
13442
      return new initializeHdfcEmiPayment_result(this);
13443
    }
13444
 
13445
    @Override
13446
    public void clear() {
13447
      this.success = null;
13448
      this.pe = null;
13449
    }
13450
 
13451
    public String getSuccess() {
13452
      return this.success;
13453
    }
13454
 
13455
    public void setSuccess(String success) {
13456
      this.success = success;
13457
    }
13458
 
13459
    public void unsetSuccess() {
13460
      this.success = null;
13461
    }
13462
 
13463
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13464
    public boolean isSetSuccess() {
13465
      return this.success != null;
13466
    }
13467
 
13468
    public void setSuccessIsSet(boolean value) {
13469
      if (!value) {
13470
        this.success = null;
13471
      }
13472
    }
13473
 
13474
    public PaymentException getPe() {
13475
      return this.pe;
13476
    }
13477
 
13478
    public void setPe(PaymentException pe) {
13479
      this.pe = pe;
13480
    }
13481
 
13482
    public void unsetPe() {
13483
      this.pe = null;
13484
    }
13485
 
13486
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
13487
    public boolean isSetPe() {
13488
      return this.pe != null;
13489
    }
13490
 
13491
    public void setPeIsSet(boolean value) {
13492
      if (!value) {
13493
        this.pe = null;
13494
      }
13495
    }
13496
 
13497
    public void setFieldValue(_Fields field, Object value) {
13498
      switch (field) {
13499
      case SUCCESS:
13500
        if (value == null) {
13501
          unsetSuccess();
13502
        } else {
13503
          setSuccess((String)value);
13504
        }
13505
        break;
13506
 
13507
      case PE:
13508
        if (value == null) {
13509
          unsetPe();
13510
        } else {
13511
          setPe((PaymentException)value);
13512
        }
13513
        break;
13514
 
13515
      }
13516
    }
13517
 
13518
    public Object getFieldValue(_Fields field) {
13519
      switch (field) {
13520
      case SUCCESS:
13521
        return getSuccess();
13522
 
13523
      case PE:
13524
        return getPe();
13525
 
13526
      }
13527
      throw new IllegalStateException();
13528
    }
13529
 
13530
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13531
    public boolean isSet(_Fields field) {
13532
      if (field == null) {
13533
        throw new IllegalArgumentException();
13534
      }
13535
 
13536
      switch (field) {
13537
      case SUCCESS:
13538
        return isSetSuccess();
13539
      case PE:
13540
        return isSetPe();
13541
      }
13542
      throw new IllegalStateException();
13543
    }
13544
 
13545
    @Override
13546
    public boolean equals(Object that) {
13547
      if (that == null)
13548
        return false;
13549
      if (that instanceof initializeHdfcEmiPayment_result)
13550
        return this.equals((initializeHdfcEmiPayment_result)that);
13551
      return false;
13552
    }
13553
 
13554
    public boolean equals(initializeHdfcEmiPayment_result that) {
13555
      if (that == null)
13556
        return false;
13557
 
13558
      boolean this_present_success = true && this.isSetSuccess();
13559
      boolean that_present_success = true && that.isSetSuccess();
13560
      if (this_present_success || that_present_success) {
13561
        if (!(this_present_success && that_present_success))
13562
          return false;
13563
        if (!this.success.equals(that.success))
13564
          return false;
13565
      }
13566
 
13567
      boolean this_present_pe = true && this.isSetPe();
13568
      boolean that_present_pe = true && that.isSetPe();
13569
      if (this_present_pe || that_present_pe) {
13570
        if (!(this_present_pe && that_present_pe))
13571
          return false;
13572
        if (!this.pe.equals(that.pe))
13573
          return false;
13574
      }
13575
 
13576
      return true;
13577
    }
13578
 
13579
    @Override
13580
    public int hashCode() {
13581
      return 0;
13582
    }
13583
 
13584
    public int compareTo(initializeHdfcEmiPayment_result other) {
13585
      if (!getClass().equals(other.getClass())) {
13586
        return getClass().getName().compareTo(other.getClass().getName());
13587
      }
13588
 
13589
      int lastComparison = 0;
13590
      initializeHdfcEmiPayment_result typedOther = (initializeHdfcEmiPayment_result)other;
13591
 
13592
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13593
      if (lastComparison != 0) {
13594
        return lastComparison;
13595
      }
13596
      if (isSetSuccess()) {
13597
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13598
        if (lastComparison != 0) {
13599
          return lastComparison;
13600
        }
13601
      }
13602
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
13603
      if (lastComparison != 0) {
13604
        return lastComparison;
13605
      }
13606
      if (isSetPe()) {
13607
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
13608
        if (lastComparison != 0) {
13609
          return lastComparison;
13610
        }
13611
      }
13612
      return 0;
13613
    }
13614
 
13615
    public _Fields fieldForId(int fieldId) {
13616
      return _Fields.findByThriftId(fieldId);
13617
    }
13618
 
13619
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13620
      org.apache.thrift.protocol.TField field;
13621
      iprot.readStructBegin();
13622
      while (true)
13623
      {
13624
        field = iprot.readFieldBegin();
13625
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13626
          break;
13627
        }
13628
        switch (field.id) {
13629
          case 0: // SUCCESS
13630
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13631
              this.success = iprot.readString();
13632
            } else { 
13633
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13634
            }
13635
            break;
13636
          case 1: // PE
13637
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13638
              this.pe = new PaymentException();
13639
              this.pe.read(iprot);
13640
            } else { 
13641
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13642
            }
13643
            break;
13644
          default:
13645
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13646
        }
13647
        iprot.readFieldEnd();
13648
      }
13649
      iprot.readStructEnd();
13650
      validate();
13651
    }
13652
 
13653
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13654
      oprot.writeStructBegin(STRUCT_DESC);
13655
 
13656
      if (this.isSetSuccess()) {
13657
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13658
        oprot.writeString(this.success);
13659
        oprot.writeFieldEnd();
13660
      } else if (this.isSetPe()) {
13661
        oprot.writeFieldBegin(PE_FIELD_DESC);
13662
        this.pe.write(oprot);
13663
        oprot.writeFieldEnd();
13664
      }
13665
      oprot.writeFieldStop();
13666
      oprot.writeStructEnd();
13667
    }
13668
 
13669
    @Override
13670
    public String toString() {
13671
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_result(");
13672
      boolean first = true;
13673
 
13674
      sb.append("success:");
13675
      if (this.success == null) {
13676
        sb.append("null");
13677
      } else {
13678
        sb.append(this.success);
13679
      }
13680
      first = false;
13681
      if (!first) sb.append(", ");
13682
      sb.append("pe:");
13683
      if (this.pe == null) {
13684
        sb.append("null");
13685
      } else {
13686
        sb.append(this.pe);
13687
      }
13688
      first = false;
13689
      sb.append(")");
13690
      return sb.toString();
13691
    }
13692
 
13693
    public void validate() throws org.apache.thrift.TException {
13694
      // check for required fields
13695
    }
13696
 
13697
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13698
      try {
13699
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13700
      } catch (org.apache.thrift.TException te) {
13701
        throw new java.io.IOException(te);
13702
      }
13703
    }
13704
 
13705
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13706
      try {
13707
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13708
      } catch (org.apache.thrift.TException te) {
13709
        throw new java.io.IOException(te);
13710
      }
13711
    }
13712
 
13713
  }
13714
 
3430 rajveer 13715
  public static class createRefund_args implements org.apache.thrift.TBase<createRefund_args, createRefund_args._Fields>, java.io.Serializable, Cloneable   {
13716
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_args");
2462 chandransh 13717
 
3430 rajveer 13718
    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);
13719
    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);
13720
    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 13721
 
3430 rajveer 13722
    private long orderId; // required
13723
    private long merchantTxnId; // required
13724
    private double amount; // required
2462 chandransh 13725
 
13726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 13727
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 13728
      ORDER_ID((short)1, "orderId"),
13729
      MERCHANT_TXN_ID((short)2, "merchantTxnId"),
13730
      AMOUNT((short)3, "amount");
2462 chandransh 13731
 
13732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13733
 
13734
      static {
13735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13736
          byName.put(field.getFieldName(), field);
13737
        }
13738
      }
13739
 
13740
      /**
13741
       * Find the _Fields constant that matches fieldId, or null if its not found.
13742
       */
13743
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 13744
        switch(fieldId) {
13745
          case 1: // ORDER_ID
13746
            return ORDER_ID;
13747
          case 2: // MERCHANT_TXN_ID
13748
            return MERCHANT_TXN_ID;
13749
          case 3: // AMOUNT
13750
            return AMOUNT;
13751
          default:
13752
            return null;
13753
        }
2462 chandransh 13754
      }
13755
 
13756
      /**
13757
       * Find the _Fields constant that matches fieldId, throwing an exception
13758
       * if it is not found.
13759
       */
13760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13761
        _Fields fields = findByThriftId(fieldId);
13762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13763
        return fields;
13764
      }
13765
 
13766
      /**
13767
       * Find the _Fields constant that matches name, or null if its not found.
13768
       */
13769
      public static _Fields findByName(String name) {
13770
        return byName.get(name);
13771
      }
13772
 
13773
      private final short _thriftId;
13774
      private final String _fieldName;
13775
 
13776
      _Fields(short thriftId, String fieldName) {
13777
        _thriftId = thriftId;
13778
        _fieldName = fieldName;
13779
      }
13780
 
13781
      public short getThriftFieldId() {
13782
        return _thriftId;
13783
      }
13784
 
13785
      public String getFieldName() {
13786
        return _fieldName;
13787
      }
13788
    }
13789
 
13790
    // isset id assignments
3010 chandransh 13791
    private static final int __ORDERID_ISSET_ID = 0;
13792
    private static final int __MERCHANTTXNID_ISSET_ID = 1;
13793
    private static final int __AMOUNT_ISSET_ID = 2;
13794
    private BitSet __isset_bit_vector = new BitSet(3);
2462 chandransh 13795
 
3430 rajveer 13796
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 13797
    static {
3430 rajveer 13798
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13799
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13800
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13801
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13802
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13803
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13804
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
13805
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13806
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_args.class, metaDataMap);
2462 chandransh 13807
    }
13808
 
3010 chandransh 13809
    public createRefund_args() {
2462 chandransh 13810
    }
13811
 
3010 chandransh 13812
    public createRefund_args(
13813
      long orderId,
13814
      long merchantTxnId,
13815
      double amount)
2462 chandransh 13816
    {
13817
      this();
3010 chandransh 13818
      this.orderId = orderId;
13819
      setOrderIdIsSet(true);
13820
      this.merchantTxnId = merchantTxnId;
13821
      setMerchantTxnIdIsSet(true);
13822
      this.amount = amount;
13823
      setAmountIsSet(true);
2462 chandransh 13824
    }
13825
 
13826
    /**
13827
     * Performs a deep copy on <i>other</i>.
13828
     */
3010 chandransh 13829
    public createRefund_args(createRefund_args other) {
2462 chandransh 13830
      __isset_bit_vector.clear();
13831
      __isset_bit_vector.or(other.__isset_bit_vector);
3010 chandransh 13832
      this.orderId = other.orderId;
13833
      this.merchantTxnId = other.merchantTxnId;
13834
      this.amount = other.amount;
2462 chandransh 13835
    }
13836
 
3010 chandransh 13837
    public createRefund_args deepCopy() {
13838
      return new createRefund_args(this);
2462 chandransh 13839
    }
13840
 
3430 rajveer 13841
    @Override
13842
    public void clear() {
13843
      setOrderIdIsSet(false);
13844
      this.orderId = 0;
13845
      setMerchantTxnIdIsSet(false);
13846
      this.merchantTxnId = 0;
13847
      setAmountIsSet(false);
13848
      this.amount = 0.0;
2462 chandransh 13849
    }
13850
 
3010 chandransh 13851
    public long getOrderId() {
13852
      return this.orderId;
2462 chandransh 13853
    }
13854
 
3430 rajveer 13855
    public void setOrderId(long orderId) {
3010 chandransh 13856
      this.orderId = orderId;
13857
      setOrderIdIsSet(true);
2462 chandransh 13858
    }
13859
 
3010 chandransh 13860
    public void unsetOrderId() {
13861
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2462 chandransh 13862
    }
13863
 
3430 rajveer 13864
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
3010 chandransh 13865
    public boolean isSetOrderId() {
13866
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2462 chandransh 13867
    }
13868
 
3010 chandransh 13869
    public void setOrderIdIsSet(boolean value) {
13870
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2462 chandransh 13871
    }
13872
 
3010 chandransh 13873
    public long getMerchantTxnId() {
13874
      return this.merchantTxnId;
13875
    }
13876
 
3430 rajveer 13877
    public void setMerchantTxnId(long merchantTxnId) {
3010 chandransh 13878
      this.merchantTxnId = merchantTxnId;
13879
      setMerchantTxnIdIsSet(true);
13880
    }
13881
 
13882
    public void unsetMerchantTxnId() {
13883
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
13884
    }
13885
 
3430 rajveer 13886
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
3010 chandransh 13887
    public boolean isSetMerchantTxnId() {
13888
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
13889
    }
13890
 
13891
    public void setMerchantTxnIdIsSet(boolean value) {
13892
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
13893
    }
13894
 
13895
    public double getAmount() {
13896
      return this.amount;
13897
    }
13898
 
3430 rajveer 13899
    public void setAmount(double amount) {
3010 chandransh 13900
      this.amount = amount;
13901
      setAmountIsSet(true);
13902
    }
13903
 
13904
    public void unsetAmount() {
13905
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
13906
    }
13907
 
3430 rajveer 13908
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
3010 chandransh 13909
    public boolean isSetAmount() {
13910
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
13911
    }
13912
 
13913
    public void setAmountIsSet(boolean value) {
13914
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
13915
    }
13916
 
2462 chandransh 13917
    public void setFieldValue(_Fields field, Object value) {
13918
      switch (field) {
3010 chandransh 13919
      case ORDER_ID:
2462 chandransh 13920
        if (value == null) {
3010 chandransh 13921
          unsetOrderId();
2462 chandransh 13922
        } else {
3010 chandransh 13923
          setOrderId((Long)value);
2462 chandransh 13924
        }
13925
        break;
13926
 
3010 chandransh 13927
      case MERCHANT_TXN_ID:
13928
        if (value == null) {
13929
          unsetMerchantTxnId();
13930
        } else {
13931
          setMerchantTxnId((Long)value);
13932
        }
13933
        break;
13934
 
13935
      case AMOUNT:
13936
        if (value == null) {
13937
          unsetAmount();
13938
        } else {
13939
          setAmount((Double)value);
13940
        }
13941
        break;
13942
 
2462 chandransh 13943
      }
13944
    }
13945
 
13946
    public Object getFieldValue(_Fields field) {
13947
      switch (field) {
3010 chandransh 13948
      case ORDER_ID:
3430 rajveer 13949
        return Long.valueOf(getOrderId());
2462 chandransh 13950
 
3010 chandransh 13951
      case MERCHANT_TXN_ID:
3430 rajveer 13952
        return Long.valueOf(getMerchantTxnId());
3010 chandransh 13953
 
13954
      case AMOUNT:
3430 rajveer 13955
        return Double.valueOf(getAmount());
3010 chandransh 13956
 
2462 chandransh 13957
      }
13958
      throw new IllegalStateException();
13959
    }
13960
 
3430 rajveer 13961
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13962
    public boolean isSet(_Fields field) {
13963
      if (field == null) {
13964
        throw new IllegalArgumentException();
13965
      }
2462 chandransh 13966
 
13967
      switch (field) {
3010 chandransh 13968
      case ORDER_ID:
13969
        return isSetOrderId();
13970
      case MERCHANT_TXN_ID:
13971
        return isSetMerchantTxnId();
13972
      case AMOUNT:
13973
        return isSetAmount();
2462 chandransh 13974
      }
13975
      throw new IllegalStateException();
13976
    }
13977
 
13978
    @Override
13979
    public boolean equals(Object that) {
13980
      if (that == null)
13981
        return false;
3010 chandransh 13982
      if (that instanceof createRefund_args)
13983
        return this.equals((createRefund_args)that);
2462 chandransh 13984
      return false;
13985
    }
13986
 
3010 chandransh 13987
    public boolean equals(createRefund_args that) {
2462 chandransh 13988
      if (that == null)
13989
        return false;
13990
 
3010 chandransh 13991
      boolean this_present_orderId = true;
13992
      boolean that_present_orderId = true;
13993
      if (this_present_orderId || that_present_orderId) {
13994
        if (!(this_present_orderId && that_present_orderId))
2462 chandransh 13995
          return false;
3010 chandransh 13996
        if (this.orderId != that.orderId)
2462 chandransh 13997
          return false;
13998
      }
13999
 
3010 chandransh 14000
      boolean this_present_merchantTxnId = true;
14001
      boolean that_present_merchantTxnId = true;
14002
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
14003
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
14004
          return false;
14005
        if (this.merchantTxnId != that.merchantTxnId)
14006
          return false;
14007
      }
14008
 
14009
      boolean this_present_amount = true;
14010
      boolean that_present_amount = true;
14011
      if (this_present_amount || that_present_amount) {
14012
        if (!(this_present_amount && that_present_amount))
14013
          return false;
14014
        if (this.amount != that.amount)
14015
          return false;
14016
      }
14017
 
2462 chandransh 14018
      return true;
14019
    }
14020
 
14021
    @Override
14022
    public int hashCode() {
14023
      return 0;
14024
    }
14025
 
3010 chandransh 14026
    public int compareTo(createRefund_args other) {
2462 chandransh 14027
      if (!getClass().equals(other.getClass())) {
14028
        return getClass().getName().compareTo(other.getClass().getName());
14029
      }
14030
 
14031
      int lastComparison = 0;
3010 chandransh 14032
      createRefund_args typedOther = (createRefund_args)other;
2462 chandransh 14033
 
3430 rajveer 14034
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2462 chandransh 14035
      if (lastComparison != 0) {
14036
        return lastComparison;
14037
      }
3430 rajveer 14038
      if (isSetOrderId()) {
14039
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
14040
        if (lastComparison != 0) {
14041
          return lastComparison;
14042
        }
2462 chandransh 14043
      }
3430 rajveer 14044
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
3010 chandransh 14045
      if (lastComparison != 0) {
14046
        return lastComparison;
14047
      }
3430 rajveer 14048
      if (isSetMerchantTxnId()) {
14049
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
14050
        if (lastComparison != 0) {
14051
          return lastComparison;
14052
        }
3010 chandransh 14053
      }
3430 rajveer 14054
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
3010 chandransh 14055
      if (lastComparison != 0) {
14056
        return lastComparison;
14057
      }
3430 rajveer 14058
      if (isSetAmount()) {
14059
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
14060
        if (lastComparison != 0) {
14061
          return lastComparison;
14062
        }
3010 chandransh 14063
      }
2462 chandransh 14064
      return 0;
14065
    }
14066
 
3430 rajveer 14067
    public _Fields fieldForId(int fieldId) {
14068
      return _Fields.findByThriftId(fieldId);
14069
    }
14070
 
14071
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14072
      org.apache.thrift.protocol.TField field;
2462 chandransh 14073
      iprot.readStructBegin();
14074
      while (true)
14075
      {
14076
        field = iprot.readFieldBegin();
3430 rajveer 14077
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 14078
          break;
14079
        }
3430 rajveer 14080
        switch (field.id) {
14081
          case 1: // ORDER_ID
14082
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14083
              this.orderId = iprot.readI64();
14084
              setOrderIdIsSet(true);
14085
            } else { 
14086
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14087
            }
14088
            break;
14089
          case 2: // MERCHANT_TXN_ID
14090
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14091
              this.merchantTxnId = iprot.readI64();
14092
              setMerchantTxnIdIsSet(true);
14093
            } else { 
14094
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14095
            }
14096
            break;
14097
          case 3: // AMOUNT
14098
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
14099
              this.amount = iprot.readDouble();
14100
              setAmountIsSet(true);
14101
            } else { 
14102
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14103
            }
14104
            break;
14105
          default:
14106
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 14107
        }
3430 rajveer 14108
        iprot.readFieldEnd();
2462 chandransh 14109
      }
14110
      iprot.readStructEnd();
14111
      validate();
14112
    }
14113
 
3430 rajveer 14114
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 14115
      validate();
14116
 
14117
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 14118
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14119
      oprot.writeI64(this.orderId);
2462 chandransh 14120
      oprot.writeFieldEnd();
3010 chandransh 14121
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
14122
      oprot.writeI64(this.merchantTxnId);
14123
      oprot.writeFieldEnd();
14124
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
14125
      oprot.writeDouble(this.amount);
14126
      oprot.writeFieldEnd();
2462 chandransh 14127
      oprot.writeFieldStop();
14128
      oprot.writeStructEnd();
14129
    }
14130
 
14131
    @Override
14132
    public String toString() {
3010 chandransh 14133
      StringBuilder sb = new StringBuilder("createRefund_args(");
2462 chandransh 14134
      boolean first = true;
14135
 
3010 chandransh 14136
      sb.append("orderId:");
14137
      sb.append(this.orderId);
2462 chandransh 14138
      first = false;
3010 chandransh 14139
      if (!first) sb.append(", ");
14140
      sb.append("merchantTxnId:");
14141
      sb.append(this.merchantTxnId);
14142
      first = false;
14143
      if (!first) sb.append(", ");
14144
      sb.append("amount:");
14145
      sb.append(this.amount);
14146
      first = false;
2462 chandransh 14147
      sb.append(")");
14148
      return sb.toString();
14149
    }
14150
 
3430 rajveer 14151
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 14152
      // check for required fields
14153
    }
14154
 
3430 rajveer 14155
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14156
      try {
14157
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14158
      } catch (org.apache.thrift.TException te) {
14159
        throw new java.io.IOException(te);
14160
      }
14161
    }
14162
 
14163
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14164
      try {
14165
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14166
      } catch (org.apache.thrift.TException te) {
14167
        throw new java.io.IOException(te);
14168
      }
14169
    }
14170
 
2462 chandransh 14171
  }
14172
 
3430 rajveer 14173
  public static class createRefund_result implements org.apache.thrift.TBase<createRefund_result, createRefund_result._Fields>, java.io.Serializable, Cloneable   {
14174
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_result");
2462 chandransh 14175
 
3430 rajveer 14176
    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);
14177
    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 14178
 
3430 rajveer 14179
    private long success; // required
14180
    private PaymentException pe; // required
2462 chandransh 14181
 
14182
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 14183
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 14184
      SUCCESS((short)0, "success"),
14185
      PE((short)1, "pe");
14186
 
14187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14188
 
14189
      static {
14190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14191
          byName.put(field.getFieldName(), field);
14192
        }
14193
      }
14194
 
14195
      /**
14196
       * Find the _Fields constant that matches fieldId, or null if its not found.
14197
       */
14198
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 14199
        switch(fieldId) {
14200
          case 0: // SUCCESS
14201
            return SUCCESS;
14202
          case 1: // PE
14203
            return PE;
14204
          default:
14205
            return null;
14206
        }
2462 chandransh 14207
      }
14208
 
14209
      /**
14210
       * Find the _Fields constant that matches fieldId, throwing an exception
14211
       * if it is not found.
14212
       */
14213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14214
        _Fields fields = findByThriftId(fieldId);
14215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14216
        return fields;
14217
      }
14218
 
14219
      /**
14220
       * Find the _Fields constant that matches name, or null if its not found.
14221
       */
14222
      public static _Fields findByName(String name) {
14223
        return byName.get(name);
14224
      }
14225
 
14226
      private final short _thriftId;
14227
      private final String _fieldName;
14228
 
14229
      _Fields(short thriftId, String fieldName) {
14230
        _thriftId = thriftId;
14231
        _fieldName = fieldName;
14232
      }
14233
 
14234
      public short getThriftFieldId() {
14235
        return _thriftId;
14236
      }
14237
 
14238
      public String getFieldName() {
14239
        return _fieldName;
14240
      }
14241
    }
14242
 
14243
    // isset id assignments
3010 chandransh 14244
    private static final int __SUCCESS_ISSET_ID = 0;
14245
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 14246
 
3430 rajveer 14247
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 14248
    static {
3430 rajveer 14249
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14250
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14251
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14252
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14253
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14254
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14255
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_result.class, metaDataMap);
2462 chandransh 14256
    }
14257
 
3010 chandransh 14258
    public createRefund_result() {
2462 chandransh 14259
    }
14260
 
3010 chandransh 14261
    public createRefund_result(
14262
      long success,
2462 chandransh 14263
      PaymentException pe)
14264
    {
14265
      this();
14266
      this.success = success;
3010 chandransh 14267
      setSuccessIsSet(true);
2462 chandransh 14268
      this.pe = pe;
14269
    }
14270
 
14271
    /**
14272
     * Performs a deep copy on <i>other</i>.
14273
     */
3010 chandransh 14274
    public createRefund_result(createRefund_result other) {
14275
      __isset_bit_vector.clear();
14276
      __isset_bit_vector.or(other.__isset_bit_vector);
14277
      this.success = other.success;
2462 chandransh 14278
      if (other.isSetPe()) {
14279
        this.pe = new PaymentException(other.pe);
14280
      }
14281
    }
14282
 
3010 chandransh 14283
    public createRefund_result deepCopy() {
14284
      return new createRefund_result(this);
2462 chandransh 14285
    }
14286
 
3430 rajveer 14287
    @Override
14288
    public void clear() {
14289
      setSuccessIsSet(false);
14290
      this.success = 0;
14291
      this.pe = null;
2462 chandransh 14292
    }
14293
 
3010 chandransh 14294
    public long getSuccess() {
2462 chandransh 14295
      return this.success;
14296
    }
14297
 
3430 rajveer 14298
    public void setSuccess(long success) {
2462 chandransh 14299
      this.success = success;
3010 chandransh 14300
      setSuccessIsSet(true);
2462 chandransh 14301
    }
14302
 
14303
    public void unsetSuccess() {
3010 chandransh 14304
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2462 chandransh 14305
    }
14306
 
3430 rajveer 14307
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 14308
    public boolean isSetSuccess() {
3010 chandransh 14309
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2462 chandransh 14310
    }
14311
 
14312
    public void setSuccessIsSet(boolean value) {
3010 chandransh 14313
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2462 chandransh 14314
    }
14315
 
14316
    public PaymentException getPe() {
14317
      return this.pe;
14318
    }
14319
 
3430 rajveer 14320
    public void setPe(PaymentException pe) {
2462 chandransh 14321
      this.pe = pe;
14322
    }
14323
 
14324
    public void unsetPe() {
14325
      this.pe = null;
14326
    }
14327
 
3430 rajveer 14328
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 14329
    public boolean isSetPe() {
14330
      return this.pe != null;
14331
    }
14332
 
14333
    public void setPeIsSet(boolean value) {
14334
      if (!value) {
14335
        this.pe = null;
14336
      }
14337
    }
14338
 
14339
    public void setFieldValue(_Fields field, Object value) {
14340
      switch (field) {
14341
      case SUCCESS:
14342
        if (value == null) {
14343
          unsetSuccess();
14344
        } else {
3010 chandransh 14345
          setSuccess((Long)value);
2462 chandransh 14346
        }
14347
        break;
14348
 
14349
      case PE:
14350
        if (value == null) {
14351
          unsetPe();
14352
        } else {
14353
          setPe((PaymentException)value);
14354
        }
14355
        break;
14356
 
14357
      }
14358
    }
14359
 
14360
    public Object getFieldValue(_Fields field) {
14361
      switch (field) {
14362
      case SUCCESS:
3430 rajveer 14363
        return Long.valueOf(getSuccess());
2462 chandransh 14364
 
14365
      case PE:
14366
        return getPe();
14367
 
14368
      }
14369
      throw new IllegalStateException();
14370
    }
14371
 
3430 rajveer 14372
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14373
    public boolean isSet(_Fields field) {
14374
      if (field == null) {
14375
        throw new IllegalArgumentException();
14376
      }
2462 chandransh 14377
 
14378
      switch (field) {
14379
      case SUCCESS:
14380
        return isSetSuccess();
14381
      case PE:
14382
        return isSetPe();
14383
      }
14384
      throw new IllegalStateException();
14385
    }
14386
 
14387
    @Override
14388
    public boolean equals(Object that) {
14389
      if (that == null)
14390
        return false;
3010 chandransh 14391
      if (that instanceof createRefund_result)
14392
        return this.equals((createRefund_result)that);
2462 chandransh 14393
      return false;
14394
    }
14395
 
3010 chandransh 14396
    public boolean equals(createRefund_result that) {
2462 chandransh 14397
      if (that == null)
14398
        return false;
14399
 
3010 chandransh 14400
      boolean this_present_success = true;
14401
      boolean that_present_success = true;
2462 chandransh 14402
      if (this_present_success || that_present_success) {
14403
        if (!(this_present_success && that_present_success))
14404
          return false;
3010 chandransh 14405
        if (this.success != that.success)
2462 chandransh 14406
          return false;
14407
      }
14408
 
14409
      boolean this_present_pe = true && this.isSetPe();
14410
      boolean that_present_pe = true && that.isSetPe();
14411
      if (this_present_pe || that_present_pe) {
14412
        if (!(this_present_pe && that_present_pe))
14413
          return false;
14414
        if (!this.pe.equals(that.pe))
14415
          return false;
14416
      }
14417
 
14418
      return true;
14419
    }
14420
 
14421
    @Override
14422
    public int hashCode() {
14423
      return 0;
14424
    }
14425
 
3010 chandransh 14426
    public int compareTo(createRefund_result other) {
2462 chandransh 14427
      if (!getClass().equals(other.getClass())) {
14428
        return getClass().getName().compareTo(other.getClass().getName());
14429
      }
14430
 
14431
      int lastComparison = 0;
3010 chandransh 14432
      createRefund_result typedOther = (createRefund_result)other;
2462 chandransh 14433
 
3430 rajveer 14434
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2462 chandransh 14435
      if (lastComparison != 0) {
14436
        return lastComparison;
14437
      }
3430 rajveer 14438
      if (isSetSuccess()) {
14439
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14440
        if (lastComparison != 0) {
14441
          return lastComparison;
14442
        }
2462 chandransh 14443
      }
3430 rajveer 14444
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2462 chandransh 14445
      if (lastComparison != 0) {
14446
        return lastComparison;
14447
      }
3430 rajveer 14448
      if (isSetPe()) {
14449
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
14450
        if (lastComparison != 0) {
14451
          return lastComparison;
14452
        }
2462 chandransh 14453
      }
14454
      return 0;
14455
    }
14456
 
3430 rajveer 14457
    public _Fields fieldForId(int fieldId) {
14458
      return _Fields.findByThriftId(fieldId);
14459
    }
14460
 
14461
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14462
      org.apache.thrift.protocol.TField field;
2462 chandransh 14463
      iprot.readStructBegin();
14464
      while (true)
14465
      {
14466
        field = iprot.readFieldBegin();
3430 rajveer 14467
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 14468
          break;
14469
        }
3430 rajveer 14470
        switch (field.id) {
14471
          case 0: // SUCCESS
14472
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14473
              this.success = iprot.readI64();
14474
              setSuccessIsSet(true);
14475
            } else { 
14476
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14477
            }
14478
            break;
14479
          case 1: // PE
14480
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14481
              this.pe = new PaymentException();
14482
              this.pe.read(iprot);
14483
            } else { 
14484
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14485
            }
14486
            break;
14487
          default:
14488
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 14489
        }
3430 rajveer 14490
        iprot.readFieldEnd();
2462 chandransh 14491
      }
14492
      iprot.readStructEnd();
14493
      validate();
14494
    }
14495
 
3430 rajveer 14496
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 14497
      oprot.writeStructBegin(STRUCT_DESC);
14498
 
14499
      if (this.isSetSuccess()) {
14500
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 14501
        oprot.writeI64(this.success);
2462 chandransh 14502
        oprot.writeFieldEnd();
14503
      } else if (this.isSetPe()) {
14504
        oprot.writeFieldBegin(PE_FIELD_DESC);
14505
        this.pe.write(oprot);
14506
        oprot.writeFieldEnd();
14507
      }
14508
      oprot.writeFieldStop();
14509
      oprot.writeStructEnd();
14510
    }
14511
 
14512
    @Override
14513
    public String toString() {
3010 chandransh 14514
      StringBuilder sb = new StringBuilder("createRefund_result(");
2462 chandransh 14515
      boolean first = true;
14516
 
14517
      sb.append("success:");
3010 chandransh 14518
      sb.append(this.success);
2462 chandransh 14519
      first = false;
14520
      if (!first) sb.append(", ");
14521
      sb.append("pe:");
14522
      if (this.pe == null) {
14523
        sb.append("null");
14524
      } else {
14525
        sb.append(this.pe);
14526
      }
14527
      first = false;
14528
      sb.append(")");
14529
      return sb.toString();
14530
    }
14531
 
3430 rajveer 14532
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 14533
      // check for required fields
14534
    }
14535
 
3430 rajveer 14536
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14537
      try {
14538
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14539
      } catch (org.apache.thrift.TException te) {
14540
        throw new java.io.IOException(te);
14541
      }
14542
    }
14543
 
14544
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14545
      try {
14546
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14547
      } catch (org.apache.thrift.TException te) {
14548
        throw new java.io.IOException(te);
14549
      }
14550
    }
14551
 
2462 chandransh 14552
  }
14553
 
3430 rajveer 14554
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
14555
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
2690 chandransh 14556
 
3430 rajveer 14557
    private static final org.apache.thrift.protocol.TField MERCHANT_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantTxnId", org.apache.thrift.protocol.TType.I64, (short)1);
2690 chandransh 14558
 
3430 rajveer 14559
    private long merchantTxnId; // required
2690 chandransh 14560
 
14561
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 14562
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 14563
      MERCHANT_TXN_ID((short)1, "merchantTxnId");
2690 chandransh 14564
 
14565
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14566
 
14567
      static {
14568
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14569
          byName.put(field.getFieldName(), field);
14570
        }
14571
      }
14572
 
14573
      /**
14574
       * Find the _Fields constant that matches fieldId, or null if its not found.
14575
       */
14576
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 14577
        switch(fieldId) {
14578
          case 1: // MERCHANT_TXN_ID
14579
            return MERCHANT_TXN_ID;
14580
          default:
14581
            return null;
14582
        }
2690 chandransh 14583
      }
14584
 
14585
      /**
14586
       * Find the _Fields constant that matches fieldId, throwing an exception
14587
       * if it is not found.
14588
       */
14589
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14590
        _Fields fields = findByThriftId(fieldId);
14591
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14592
        return fields;
14593
      }
14594
 
14595
      /**
14596
       * Find the _Fields constant that matches name, or null if its not found.
14597
       */
14598
      public static _Fields findByName(String name) {
14599
        return byName.get(name);
14600
      }
14601
 
14602
      private final short _thriftId;
14603
      private final String _fieldName;
14604
 
14605
      _Fields(short thriftId, String fieldName) {
14606
        _thriftId = thriftId;
14607
        _fieldName = fieldName;
14608
      }
14609
 
14610
      public short getThriftFieldId() {
14611
        return _thriftId;
14612
      }
14613
 
14614
      public String getFieldName() {
14615
        return _fieldName;
14616
      }
14617
    }
14618
 
14619
    // isset id assignments
3010 chandransh 14620
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
14621
    private BitSet __isset_bit_vector = new BitSet(1);
2690 chandransh 14622
 
3430 rajveer 14623
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 14624
    static {
3430 rajveer 14625
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14626
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14627
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14628
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14629
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
2690 chandransh 14630
    }
14631
 
3010 chandransh 14632
    public capturePayment_args() {
2690 chandransh 14633
    }
14634
 
3010 chandransh 14635
    public capturePayment_args(
14636
      long merchantTxnId)
2690 chandransh 14637
    {
14638
      this();
14639
      this.merchantTxnId = merchantTxnId;
14640
      setMerchantTxnIdIsSet(true);
14641
    }
14642
 
14643
    /**
14644
     * Performs a deep copy on <i>other</i>.
14645
     */
3010 chandransh 14646
    public capturePayment_args(capturePayment_args other) {
2690 chandransh 14647
      __isset_bit_vector.clear();
14648
      __isset_bit_vector.or(other.__isset_bit_vector);
14649
      this.merchantTxnId = other.merchantTxnId;
14650
    }
14651
 
3010 chandransh 14652
    public capturePayment_args deepCopy() {
14653
      return new capturePayment_args(this);
2690 chandransh 14654
    }
14655
 
3430 rajveer 14656
    @Override
14657
    public void clear() {
14658
      setMerchantTxnIdIsSet(false);
14659
      this.merchantTxnId = 0;
2690 chandransh 14660
    }
14661
 
14662
    public long getMerchantTxnId() {
14663
      return this.merchantTxnId;
14664
    }
14665
 
3430 rajveer 14666
    public void setMerchantTxnId(long merchantTxnId) {
2690 chandransh 14667
      this.merchantTxnId = merchantTxnId;
14668
      setMerchantTxnIdIsSet(true);
14669
    }
14670
 
14671
    public void unsetMerchantTxnId() {
14672
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
14673
    }
14674
 
3430 rajveer 14675
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
2690 chandransh 14676
    public boolean isSetMerchantTxnId() {
14677
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
14678
    }
14679
 
14680
    public void setMerchantTxnIdIsSet(boolean value) {
14681
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
14682
    }
14683
 
14684
    public void setFieldValue(_Fields field, Object value) {
14685
      switch (field) {
14686
      case MERCHANT_TXN_ID:
14687
        if (value == null) {
14688
          unsetMerchantTxnId();
14689
        } else {
14690
          setMerchantTxnId((Long)value);
14691
        }
14692
        break;
14693
 
14694
      }
14695
    }
14696
 
14697
    public Object getFieldValue(_Fields field) {
14698
      switch (field) {
14699
      case MERCHANT_TXN_ID:
3430 rajveer 14700
        return Long.valueOf(getMerchantTxnId());
2690 chandransh 14701
 
14702
      }
14703
      throw new IllegalStateException();
14704
    }
14705
 
3430 rajveer 14706
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14707
    public boolean isSet(_Fields field) {
14708
      if (field == null) {
14709
        throw new IllegalArgumentException();
14710
      }
2690 chandransh 14711
 
14712
      switch (field) {
14713
      case MERCHANT_TXN_ID:
14714
        return isSetMerchantTxnId();
14715
      }
14716
      throw new IllegalStateException();
14717
    }
14718
 
14719
    @Override
14720
    public boolean equals(Object that) {
14721
      if (that == null)
14722
        return false;
3010 chandransh 14723
      if (that instanceof capturePayment_args)
14724
        return this.equals((capturePayment_args)that);
2690 chandransh 14725
      return false;
14726
    }
14727
 
3010 chandransh 14728
    public boolean equals(capturePayment_args that) {
2690 chandransh 14729
      if (that == null)
14730
        return false;
14731
 
14732
      boolean this_present_merchantTxnId = true;
14733
      boolean that_present_merchantTxnId = true;
14734
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
14735
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
14736
          return false;
14737
        if (this.merchantTxnId != that.merchantTxnId)
14738
          return false;
14739
      }
14740
 
14741
      return true;
14742
    }
14743
 
14744
    @Override
14745
    public int hashCode() {
14746
      return 0;
14747
    }
14748
 
3010 chandransh 14749
    public int compareTo(capturePayment_args other) {
2690 chandransh 14750
      if (!getClass().equals(other.getClass())) {
14751
        return getClass().getName().compareTo(other.getClass().getName());
14752
      }
14753
 
14754
      int lastComparison = 0;
3010 chandransh 14755
      capturePayment_args typedOther = (capturePayment_args)other;
2690 chandransh 14756
 
3430 rajveer 14757
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
2690 chandransh 14758
      if (lastComparison != 0) {
14759
        return lastComparison;
14760
      }
3430 rajveer 14761
      if (isSetMerchantTxnId()) {
14762
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
14763
        if (lastComparison != 0) {
14764
          return lastComparison;
14765
        }
2690 chandransh 14766
      }
14767
      return 0;
14768
    }
14769
 
3430 rajveer 14770
    public _Fields fieldForId(int fieldId) {
14771
      return _Fields.findByThriftId(fieldId);
14772
    }
14773
 
14774
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14775
      org.apache.thrift.protocol.TField field;
2690 chandransh 14776
      iprot.readStructBegin();
14777
      while (true)
14778
      {
14779
        field = iprot.readFieldBegin();
3430 rajveer 14780
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 14781
          break;
14782
        }
3430 rajveer 14783
        switch (field.id) {
14784
          case 1: // MERCHANT_TXN_ID
14785
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14786
              this.merchantTxnId = iprot.readI64();
14787
              setMerchantTxnIdIsSet(true);
14788
            } else { 
14789
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14790
            }
14791
            break;
14792
          default:
14793
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 14794
        }
3430 rajveer 14795
        iprot.readFieldEnd();
2690 chandransh 14796
      }
14797
      iprot.readStructEnd();
14798
      validate();
14799
    }
14800
 
3430 rajveer 14801
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 14802
      validate();
14803
 
14804
      oprot.writeStructBegin(STRUCT_DESC);
14805
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
14806
      oprot.writeI64(this.merchantTxnId);
14807
      oprot.writeFieldEnd();
14808
      oprot.writeFieldStop();
14809
      oprot.writeStructEnd();
14810
    }
14811
 
14812
    @Override
14813
    public String toString() {
3010 chandransh 14814
      StringBuilder sb = new StringBuilder("capturePayment_args(");
2690 chandransh 14815
      boolean first = true;
14816
 
14817
      sb.append("merchantTxnId:");
14818
      sb.append(this.merchantTxnId);
14819
      first = false;
14820
      sb.append(")");
14821
      return sb.toString();
14822
    }
14823
 
3430 rajveer 14824
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 14825
      // check for required fields
14826
    }
14827
 
3430 rajveer 14828
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14829
      try {
14830
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14831
      } catch (org.apache.thrift.TException te) {
14832
        throw new java.io.IOException(te);
14833
      }
14834
    }
14835
 
14836
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14837
      try {
14838
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14839
      } catch (org.apache.thrift.TException te) {
14840
        throw new java.io.IOException(te);
14841
      }
14842
    }
14843
 
2690 chandransh 14844
  }
14845
 
3430 rajveer 14846
  public static class capturePayment_result implements org.apache.thrift.TBase<capturePayment_result, capturePayment_result._Fields>, java.io.Serializable, Cloneable   {
14847
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_result");
2690 chandransh 14848
 
3430 rajveer 14849
    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);
14850
    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 14851
 
3430 rajveer 14852
    private boolean success; // required
14853
    private PaymentException pe; // required
2690 chandransh 14854
 
14855
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 14856
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2690 chandransh 14857
      SUCCESS((short)0, "success"),
14858
      PE((short)1, "pe");
14859
 
14860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14861
 
14862
      static {
14863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14864
          byName.put(field.getFieldName(), field);
14865
        }
14866
      }
14867
 
14868
      /**
14869
       * Find the _Fields constant that matches fieldId, or null if its not found.
14870
       */
14871
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 14872
        switch(fieldId) {
14873
          case 0: // SUCCESS
14874
            return SUCCESS;
14875
          case 1: // PE
14876
            return PE;
14877
          default:
14878
            return null;
14879
        }
2690 chandransh 14880
      }
14881
 
14882
      /**
14883
       * Find the _Fields constant that matches fieldId, throwing an exception
14884
       * if it is not found.
14885
       */
14886
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14887
        _Fields fields = findByThriftId(fieldId);
14888
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14889
        return fields;
14890
      }
14891
 
14892
      /**
14893
       * Find the _Fields constant that matches name, or null if its not found.
14894
       */
14895
      public static _Fields findByName(String name) {
14896
        return byName.get(name);
14897
      }
14898
 
14899
      private final short _thriftId;
14900
      private final String _fieldName;
14901
 
14902
      _Fields(short thriftId, String fieldName) {
14903
        _thriftId = thriftId;
14904
        _fieldName = fieldName;
14905
      }
14906
 
14907
      public short getThriftFieldId() {
14908
        return _thriftId;
14909
      }
14910
 
14911
      public String getFieldName() {
14912
        return _fieldName;
14913
      }
14914
    }
14915
 
14916
    // isset id assignments
14917
    private static final int __SUCCESS_ISSET_ID = 0;
14918
    private BitSet __isset_bit_vector = new BitSet(1);
14919
 
3430 rajveer 14920
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 14921
    static {
3430 rajveer 14922
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14923
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14924
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
14925
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14926
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14927
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14928
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_result.class, metaDataMap);
2690 chandransh 14929
    }
14930
 
3010 chandransh 14931
    public capturePayment_result() {
2690 chandransh 14932
    }
14933
 
3010 chandransh 14934
    public capturePayment_result(
14935
      boolean success,
2690 chandransh 14936
      PaymentException pe)
14937
    {
14938
      this();
14939
      this.success = success;
14940
      setSuccessIsSet(true);
14941
      this.pe = pe;
14942
    }
14943
 
14944
    /**
14945
     * Performs a deep copy on <i>other</i>.
14946
     */
3010 chandransh 14947
    public capturePayment_result(capturePayment_result other) {
2690 chandransh 14948
      __isset_bit_vector.clear();
14949
      __isset_bit_vector.or(other.__isset_bit_vector);
14950
      this.success = other.success;
14951
      if (other.isSetPe()) {
14952
        this.pe = new PaymentException(other.pe);
14953
      }
14954
    }
14955
 
3010 chandransh 14956
    public capturePayment_result deepCopy() {
14957
      return new capturePayment_result(this);
2690 chandransh 14958
    }
14959
 
3430 rajveer 14960
    @Override
14961
    public void clear() {
14962
      setSuccessIsSet(false);
14963
      this.success = false;
14964
      this.pe = null;
2690 chandransh 14965
    }
14966
 
3010 chandransh 14967
    public boolean isSuccess() {
2690 chandransh 14968
      return this.success;
14969
    }
14970
 
3430 rajveer 14971
    public void setSuccess(boolean success) {
2690 chandransh 14972
      this.success = success;
14973
      setSuccessIsSet(true);
14974
    }
14975
 
14976
    public void unsetSuccess() {
14977
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14978
    }
14979
 
3430 rajveer 14980
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2690 chandransh 14981
    public boolean isSetSuccess() {
14982
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14983
    }
14984
 
14985
    public void setSuccessIsSet(boolean value) {
14986
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14987
    }
14988
 
14989
    public PaymentException getPe() {
14990
      return this.pe;
14991
    }
14992
 
3430 rajveer 14993
    public void setPe(PaymentException pe) {
2690 chandransh 14994
      this.pe = pe;
14995
    }
14996
 
14997
    public void unsetPe() {
14998
      this.pe = null;
14999
    }
15000
 
3430 rajveer 15001
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2690 chandransh 15002
    public boolean isSetPe() {
15003
      return this.pe != null;
15004
    }
15005
 
15006
    public void setPeIsSet(boolean value) {
15007
      if (!value) {
15008
        this.pe = null;
15009
      }
15010
    }
15011
 
15012
    public void setFieldValue(_Fields field, Object value) {
15013
      switch (field) {
15014
      case SUCCESS:
15015
        if (value == null) {
15016
          unsetSuccess();
15017
        } else {
3010 chandransh 15018
          setSuccess((Boolean)value);
2690 chandransh 15019
        }
15020
        break;
15021
 
15022
      case PE:
15023
        if (value == null) {
15024
          unsetPe();
15025
        } else {
15026
          setPe((PaymentException)value);
15027
        }
15028
        break;
15029
 
15030
      }
15031
    }
15032
 
15033
    public Object getFieldValue(_Fields field) {
15034
      switch (field) {
15035
      case SUCCESS:
3430 rajveer 15036
        return Boolean.valueOf(isSuccess());
2690 chandransh 15037
 
15038
      case PE:
15039
        return getPe();
15040
 
15041
      }
15042
      throw new IllegalStateException();
15043
    }
15044
 
3430 rajveer 15045
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15046
    public boolean isSet(_Fields field) {
15047
      if (field == null) {
15048
        throw new IllegalArgumentException();
15049
      }
2690 chandransh 15050
 
15051
      switch (field) {
15052
      case SUCCESS:
15053
        return isSetSuccess();
15054
      case PE:
15055
        return isSetPe();
15056
      }
15057
      throw new IllegalStateException();
15058
    }
15059
 
15060
    @Override
15061
    public boolean equals(Object that) {
15062
      if (that == null)
15063
        return false;
3010 chandransh 15064
      if (that instanceof capturePayment_result)
15065
        return this.equals((capturePayment_result)that);
2690 chandransh 15066
      return false;
15067
    }
15068
 
3010 chandransh 15069
    public boolean equals(capturePayment_result that) {
2690 chandransh 15070
      if (that == null)
15071
        return false;
15072
 
15073
      boolean this_present_success = true;
15074
      boolean that_present_success = true;
15075
      if (this_present_success || that_present_success) {
15076
        if (!(this_present_success && that_present_success))
15077
          return false;
15078
        if (this.success != that.success)
15079
          return false;
15080
      }
15081
 
15082
      boolean this_present_pe = true && this.isSetPe();
15083
      boolean that_present_pe = true && that.isSetPe();
15084
      if (this_present_pe || that_present_pe) {
15085
        if (!(this_present_pe && that_present_pe))
15086
          return false;
15087
        if (!this.pe.equals(that.pe))
15088
          return false;
15089
      }
15090
 
15091
      return true;
15092
    }
15093
 
15094
    @Override
15095
    public int hashCode() {
15096
      return 0;
15097
    }
15098
 
3010 chandransh 15099
    public int compareTo(capturePayment_result other) {
2690 chandransh 15100
      if (!getClass().equals(other.getClass())) {
15101
        return getClass().getName().compareTo(other.getClass().getName());
15102
      }
15103
 
15104
      int lastComparison = 0;
3010 chandransh 15105
      capturePayment_result typedOther = (capturePayment_result)other;
2690 chandransh 15106
 
3430 rajveer 15107
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2690 chandransh 15108
      if (lastComparison != 0) {
15109
        return lastComparison;
15110
      }
3430 rajveer 15111
      if (isSetSuccess()) {
15112
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15113
        if (lastComparison != 0) {
15114
          return lastComparison;
15115
        }
2690 chandransh 15116
      }
3430 rajveer 15117
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2690 chandransh 15118
      if (lastComparison != 0) {
15119
        return lastComparison;
15120
      }
3430 rajveer 15121
      if (isSetPe()) {
15122
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
15123
        if (lastComparison != 0) {
15124
          return lastComparison;
15125
        }
2690 chandransh 15126
      }
15127
      return 0;
15128
    }
15129
 
3430 rajveer 15130
    public _Fields fieldForId(int fieldId) {
15131
      return _Fields.findByThriftId(fieldId);
15132
    }
15133
 
15134
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15135
      org.apache.thrift.protocol.TField field;
2690 chandransh 15136
      iprot.readStructBegin();
15137
      while (true)
15138
      {
15139
        field = iprot.readFieldBegin();
3430 rajveer 15140
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 15141
          break;
15142
        }
3430 rajveer 15143
        switch (field.id) {
15144
          case 0: // SUCCESS
15145
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
15146
              this.success = iprot.readBool();
15147
              setSuccessIsSet(true);
15148
            } else { 
15149
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15150
            }
15151
            break;
15152
          case 1: // PE
15153
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15154
              this.pe = new PaymentException();
15155
              this.pe.read(iprot);
15156
            } else { 
15157
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15158
            }
15159
            break;
15160
          default:
15161
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 15162
        }
3430 rajveer 15163
        iprot.readFieldEnd();
2690 chandransh 15164
      }
15165
      iprot.readStructEnd();
15166
      validate();
15167
    }
15168
 
3430 rajveer 15169
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 15170
      oprot.writeStructBegin(STRUCT_DESC);
15171
 
15172
      if (this.isSetSuccess()) {
15173
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 15174
        oprot.writeBool(this.success);
2690 chandransh 15175
        oprot.writeFieldEnd();
15176
      } else if (this.isSetPe()) {
15177
        oprot.writeFieldBegin(PE_FIELD_DESC);
15178
        this.pe.write(oprot);
15179
        oprot.writeFieldEnd();
15180
      }
15181
      oprot.writeFieldStop();
15182
      oprot.writeStructEnd();
15183
    }
15184
 
15185
    @Override
15186
    public String toString() {
3010 chandransh 15187
      StringBuilder sb = new StringBuilder("capturePayment_result(");
2690 chandransh 15188
      boolean first = true;
15189
 
15190
      sb.append("success:");
15191
      sb.append(this.success);
15192
      first = false;
15193
      if (!first) sb.append(", ");
15194
      sb.append("pe:");
15195
      if (this.pe == null) {
15196
        sb.append("null");
15197
      } else {
15198
        sb.append(this.pe);
15199
      }
15200
      first = false;
15201
      sb.append(")");
15202
      return sb.toString();
15203
    }
15204
 
3430 rajveer 15205
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 15206
      // check for required fields
15207
    }
15208
 
3430 rajveer 15209
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15210
      try {
15211
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15212
      } catch (org.apache.thrift.TException te) {
15213
        throw new java.io.IOException(te);
15214
      }
15215
    }
15216
 
15217
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15218
      try {
15219
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15220
      } catch (org.apache.thrift.TException te) {
15221
        throw new java.io.IOException(te);
15222
      }
15223
    }
15224
 
2690 chandransh 15225
  }
15226
 
6486 rajveer 15227
  public static class refundPayment_args implements org.apache.thrift.TBase<refundPayment_args, refundPayment_args._Fields>, java.io.Serializable, Cloneable   {
15228
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_args");
15229
 
15230
    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);
15231
    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);
15232
    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);
15233
 
15234
    private long merchantTxnId; // required
15235
    private double amount; // required
15236
    private boolean isDigital; // required
15237
 
15238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15239
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15240
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
15241
      AMOUNT((short)2, "amount"),
15242
      IS_DIGITAL((short)3, "isDigital");
15243
 
15244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15245
 
15246
      static {
15247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15248
          byName.put(field.getFieldName(), field);
15249
        }
15250
      }
15251
 
15252
      /**
15253
       * Find the _Fields constant that matches fieldId, or null if its not found.
15254
       */
15255
      public static _Fields findByThriftId(int fieldId) {
15256
        switch(fieldId) {
15257
          case 1: // MERCHANT_TXN_ID
15258
            return MERCHANT_TXN_ID;
15259
          case 2: // AMOUNT
15260
            return AMOUNT;
15261
          case 3: // IS_DIGITAL
15262
            return IS_DIGITAL;
15263
          default:
15264
            return null;
15265
        }
15266
      }
15267
 
15268
      /**
15269
       * Find the _Fields constant that matches fieldId, throwing an exception
15270
       * if it is not found.
15271
       */
15272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15273
        _Fields fields = findByThriftId(fieldId);
15274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15275
        return fields;
15276
      }
15277
 
15278
      /**
15279
       * Find the _Fields constant that matches name, or null if its not found.
15280
       */
15281
      public static _Fields findByName(String name) {
15282
        return byName.get(name);
15283
      }
15284
 
15285
      private final short _thriftId;
15286
      private final String _fieldName;
15287
 
15288
      _Fields(short thriftId, String fieldName) {
15289
        _thriftId = thriftId;
15290
        _fieldName = fieldName;
15291
      }
15292
 
15293
      public short getThriftFieldId() {
15294
        return _thriftId;
15295
      }
15296
 
15297
      public String getFieldName() {
15298
        return _fieldName;
15299
      }
15300
    }
15301
 
15302
    // isset id assignments
15303
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
15304
    private static final int __AMOUNT_ISSET_ID = 1;
15305
    private static final int __ISDIGITAL_ISSET_ID = 2;
15306
    private BitSet __isset_bit_vector = new BitSet(3);
15307
 
15308
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15309
    static {
15310
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15311
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15312
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15313
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15314
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
15315
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15316
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
15317
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15318
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_args.class, metaDataMap);
15319
    }
15320
 
15321
    public refundPayment_args() {
15322
    }
15323
 
15324
    public refundPayment_args(
15325
      long merchantTxnId,
15326
      double amount,
15327
      boolean isDigital)
15328
    {
15329
      this();
15330
      this.merchantTxnId = merchantTxnId;
15331
      setMerchantTxnIdIsSet(true);
15332
      this.amount = amount;
15333
      setAmountIsSet(true);
15334
      this.isDigital = isDigital;
15335
      setIsDigitalIsSet(true);
15336
    }
15337
 
15338
    /**
15339
     * Performs a deep copy on <i>other</i>.
15340
     */
15341
    public refundPayment_args(refundPayment_args other) {
15342
      __isset_bit_vector.clear();
15343
      __isset_bit_vector.or(other.__isset_bit_vector);
15344
      this.merchantTxnId = other.merchantTxnId;
15345
      this.amount = other.amount;
15346
      this.isDigital = other.isDigital;
15347
    }
15348
 
15349
    public refundPayment_args deepCopy() {
15350
      return new refundPayment_args(this);
15351
    }
15352
 
15353
    @Override
15354
    public void clear() {
15355
      setMerchantTxnIdIsSet(false);
15356
      this.merchantTxnId = 0;
15357
      setAmountIsSet(false);
15358
      this.amount = 0.0;
15359
      setIsDigitalIsSet(false);
15360
      this.isDigital = false;
15361
    }
15362
 
15363
    public long getMerchantTxnId() {
15364
      return this.merchantTxnId;
15365
    }
15366
 
15367
    public void setMerchantTxnId(long merchantTxnId) {
15368
      this.merchantTxnId = merchantTxnId;
15369
      setMerchantTxnIdIsSet(true);
15370
    }
15371
 
15372
    public void unsetMerchantTxnId() {
15373
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
15374
    }
15375
 
15376
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
15377
    public boolean isSetMerchantTxnId() {
15378
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
15379
    }
15380
 
15381
    public void setMerchantTxnIdIsSet(boolean value) {
15382
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
15383
    }
15384
 
15385
    public double getAmount() {
15386
      return this.amount;
15387
    }
15388
 
15389
    public void setAmount(double amount) {
15390
      this.amount = amount;
15391
      setAmountIsSet(true);
15392
    }
15393
 
15394
    public void unsetAmount() {
15395
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
15396
    }
15397
 
15398
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
15399
    public boolean isSetAmount() {
15400
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
15401
    }
15402
 
15403
    public void setAmountIsSet(boolean value) {
15404
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
15405
    }
15406
 
15407
    public boolean isIsDigital() {
15408
      return this.isDigital;
15409
    }
15410
 
15411
    public void setIsDigital(boolean isDigital) {
15412
      this.isDigital = isDigital;
15413
      setIsDigitalIsSet(true);
15414
    }
15415
 
15416
    public void unsetIsDigital() {
15417
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
15418
    }
15419
 
15420
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
15421
    public boolean isSetIsDigital() {
15422
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
15423
    }
15424
 
15425
    public void setIsDigitalIsSet(boolean value) {
15426
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
15427
    }
15428
 
15429
    public void setFieldValue(_Fields field, Object value) {
15430
      switch (field) {
15431
      case MERCHANT_TXN_ID:
15432
        if (value == null) {
15433
          unsetMerchantTxnId();
15434
        } else {
15435
          setMerchantTxnId((Long)value);
15436
        }
15437
        break;
15438
 
15439
      case AMOUNT:
15440
        if (value == null) {
15441
          unsetAmount();
15442
        } else {
15443
          setAmount((Double)value);
15444
        }
15445
        break;
15446
 
15447
      case IS_DIGITAL:
15448
        if (value == null) {
15449
          unsetIsDigital();
15450
        } else {
15451
          setIsDigital((Boolean)value);
15452
        }
15453
        break;
15454
 
15455
      }
15456
    }
15457
 
15458
    public Object getFieldValue(_Fields field) {
15459
      switch (field) {
15460
      case MERCHANT_TXN_ID:
15461
        return Long.valueOf(getMerchantTxnId());
15462
 
15463
      case AMOUNT:
15464
        return Double.valueOf(getAmount());
15465
 
15466
      case IS_DIGITAL:
15467
        return Boolean.valueOf(isIsDigital());
15468
 
15469
      }
15470
      throw new IllegalStateException();
15471
    }
15472
 
15473
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15474
    public boolean isSet(_Fields field) {
15475
      if (field == null) {
15476
        throw new IllegalArgumentException();
15477
      }
15478
 
15479
      switch (field) {
15480
      case MERCHANT_TXN_ID:
15481
        return isSetMerchantTxnId();
15482
      case AMOUNT:
15483
        return isSetAmount();
15484
      case IS_DIGITAL:
15485
        return isSetIsDigital();
15486
      }
15487
      throw new IllegalStateException();
15488
    }
15489
 
15490
    @Override
15491
    public boolean equals(Object that) {
15492
      if (that == null)
15493
        return false;
15494
      if (that instanceof refundPayment_args)
15495
        return this.equals((refundPayment_args)that);
15496
      return false;
15497
    }
15498
 
15499
    public boolean equals(refundPayment_args that) {
15500
      if (that == null)
15501
        return false;
15502
 
15503
      boolean this_present_merchantTxnId = true;
15504
      boolean that_present_merchantTxnId = true;
15505
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
15506
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
15507
          return false;
15508
        if (this.merchantTxnId != that.merchantTxnId)
15509
          return false;
15510
      }
15511
 
15512
      boolean this_present_amount = true;
15513
      boolean that_present_amount = true;
15514
      if (this_present_amount || that_present_amount) {
15515
        if (!(this_present_amount && that_present_amount))
15516
          return false;
15517
        if (this.amount != that.amount)
15518
          return false;
15519
      }
15520
 
15521
      boolean this_present_isDigital = true;
15522
      boolean that_present_isDigital = true;
15523
      if (this_present_isDigital || that_present_isDigital) {
15524
        if (!(this_present_isDigital && that_present_isDigital))
15525
          return false;
15526
        if (this.isDigital != that.isDigital)
15527
          return false;
15528
      }
15529
 
15530
      return true;
15531
    }
15532
 
15533
    @Override
15534
    public int hashCode() {
15535
      return 0;
15536
    }
15537
 
15538
    public int compareTo(refundPayment_args other) {
15539
      if (!getClass().equals(other.getClass())) {
15540
        return getClass().getName().compareTo(other.getClass().getName());
15541
      }
15542
 
15543
      int lastComparison = 0;
15544
      refundPayment_args typedOther = (refundPayment_args)other;
15545
 
15546
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
15547
      if (lastComparison != 0) {
15548
        return lastComparison;
15549
      }
15550
      if (isSetMerchantTxnId()) {
15551
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
15552
        if (lastComparison != 0) {
15553
          return lastComparison;
15554
        }
15555
      }
15556
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
15557
      if (lastComparison != 0) {
15558
        return lastComparison;
15559
      }
15560
      if (isSetAmount()) {
15561
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
15562
        if (lastComparison != 0) {
15563
          return lastComparison;
15564
        }
15565
      }
15566
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
15567
      if (lastComparison != 0) {
15568
        return lastComparison;
15569
      }
15570
      if (isSetIsDigital()) {
15571
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
15572
        if (lastComparison != 0) {
15573
          return lastComparison;
15574
        }
15575
      }
15576
      return 0;
15577
    }
15578
 
15579
    public _Fields fieldForId(int fieldId) {
15580
      return _Fields.findByThriftId(fieldId);
15581
    }
15582
 
15583
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15584
      org.apache.thrift.protocol.TField field;
15585
      iprot.readStructBegin();
15586
      while (true)
15587
      {
15588
        field = iprot.readFieldBegin();
15589
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15590
          break;
15591
        }
15592
        switch (field.id) {
15593
          case 1: // MERCHANT_TXN_ID
15594
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15595
              this.merchantTxnId = iprot.readI64();
15596
              setMerchantTxnIdIsSet(true);
15597
            } else { 
15598
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15599
            }
15600
            break;
15601
          case 2: // AMOUNT
15602
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
15603
              this.amount = iprot.readDouble();
15604
              setAmountIsSet(true);
15605
            } else { 
15606
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15607
            }
15608
            break;
15609
          case 3: // IS_DIGITAL
15610
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
15611
              this.isDigital = iprot.readBool();
15612
              setIsDigitalIsSet(true);
15613
            } else { 
15614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15615
            }
15616
            break;
15617
          default:
15618
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15619
        }
15620
        iprot.readFieldEnd();
15621
      }
15622
      iprot.readStructEnd();
15623
      validate();
15624
    }
15625
 
15626
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15627
      validate();
15628
 
15629
      oprot.writeStructBegin(STRUCT_DESC);
15630
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15631
      oprot.writeI64(this.merchantTxnId);
15632
      oprot.writeFieldEnd();
15633
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
15634
      oprot.writeDouble(this.amount);
15635
      oprot.writeFieldEnd();
15636
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
15637
      oprot.writeBool(this.isDigital);
15638
      oprot.writeFieldEnd();
15639
      oprot.writeFieldStop();
15640
      oprot.writeStructEnd();
15641
    }
15642
 
15643
    @Override
15644
    public String toString() {
15645
      StringBuilder sb = new StringBuilder("refundPayment_args(");
15646
      boolean first = true;
15647
 
15648
      sb.append("merchantTxnId:");
15649
      sb.append(this.merchantTxnId);
15650
      first = false;
15651
      if (!first) sb.append(", ");
15652
      sb.append("amount:");
15653
      sb.append(this.amount);
15654
      first = false;
15655
      if (!first) sb.append(", ");
15656
      sb.append("isDigital:");
15657
      sb.append(this.isDigital);
15658
      first = false;
15659
      sb.append(")");
15660
      return sb.toString();
15661
    }
15662
 
15663
    public void validate() throws org.apache.thrift.TException {
15664
      // check for required fields
15665
    }
15666
 
15667
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15668
      try {
15669
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15670
      } catch (org.apache.thrift.TException te) {
15671
        throw new java.io.IOException(te);
15672
      }
15673
    }
15674
 
15675
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15676
      try {
15677
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15678
      } catch (org.apache.thrift.TException te) {
15679
        throw new java.io.IOException(te);
15680
      }
15681
    }
15682
 
15683
  }
15684
 
15685
  public static class refundPayment_result implements org.apache.thrift.TBase<refundPayment_result, refundPayment_result._Fields>, java.io.Serializable, Cloneable   {
15686
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_result");
15687
 
15688
    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);
15689
    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);
15690
 
15691
    private boolean success; // required
15692
    private PaymentException pe; // required
15693
 
15694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15695
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15696
      SUCCESS((short)0, "success"),
15697
      PE((short)1, "pe");
15698
 
15699
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15700
 
15701
      static {
15702
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15703
          byName.put(field.getFieldName(), field);
15704
        }
15705
      }
15706
 
15707
      /**
15708
       * Find the _Fields constant that matches fieldId, or null if its not found.
15709
       */
15710
      public static _Fields findByThriftId(int fieldId) {
15711
        switch(fieldId) {
15712
          case 0: // SUCCESS
15713
            return SUCCESS;
15714
          case 1: // PE
15715
            return PE;
15716
          default:
15717
            return null;
15718
        }
15719
      }
15720
 
15721
      /**
15722
       * Find the _Fields constant that matches fieldId, throwing an exception
15723
       * if it is not found.
15724
       */
15725
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15726
        _Fields fields = findByThriftId(fieldId);
15727
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15728
        return fields;
15729
      }
15730
 
15731
      /**
15732
       * Find the _Fields constant that matches name, or null if its not found.
15733
       */
15734
      public static _Fields findByName(String name) {
15735
        return byName.get(name);
15736
      }
15737
 
15738
      private final short _thriftId;
15739
      private final String _fieldName;
15740
 
15741
      _Fields(short thriftId, String fieldName) {
15742
        _thriftId = thriftId;
15743
        _fieldName = fieldName;
15744
      }
15745
 
15746
      public short getThriftFieldId() {
15747
        return _thriftId;
15748
      }
15749
 
15750
      public String getFieldName() {
15751
        return _fieldName;
15752
      }
15753
    }
15754
 
15755
    // isset id assignments
15756
    private static final int __SUCCESS_ISSET_ID = 0;
15757
    private BitSet __isset_bit_vector = new BitSet(1);
15758
 
15759
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15760
    static {
15761
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15762
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15763
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
15764
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15766
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15767
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_result.class, metaDataMap);
15768
    }
15769
 
15770
    public refundPayment_result() {
15771
    }
15772
 
15773
    public refundPayment_result(
15774
      boolean success,
15775
      PaymentException pe)
15776
    {
15777
      this();
15778
      this.success = success;
15779
      setSuccessIsSet(true);
15780
      this.pe = pe;
15781
    }
15782
 
15783
    /**
15784
     * Performs a deep copy on <i>other</i>.
15785
     */
15786
    public refundPayment_result(refundPayment_result other) {
15787
      __isset_bit_vector.clear();
15788
      __isset_bit_vector.or(other.__isset_bit_vector);
15789
      this.success = other.success;
15790
      if (other.isSetPe()) {
15791
        this.pe = new PaymentException(other.pe);
15792
      }
15793
    }
15794
 
15795
    public refundPayment_result deepCopy() {
15796
      return new refundPayment_result(this);
15797
    }
15798
 
15799
    @Override
15800
    public void clear() {
15801
      setSuccessIsSet(false);
15802
      this.success = false;
15803
      this.pe = null;
15804
    }
15805
 
15806
    public boolean isSuccess() {
15807
      return this.success;
15808
    }
15809
 
15810
    public void setSuccess(boolean success) {
15811
      this.success = success;
15812
      setSuccessIsSet(true);
15813
    }
15814
 
15815
    public void unsetSuccess() {
15816
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15817
    }
15818
 
15819
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
15820
    public boolean isSetSuccess() {
15821
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15822
    }
15823
 
15824
    public void setSuccessIsSet(boolean value) {
15825
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15826
    }
15827
 
15828
    public PaymentException getPe() {
15829
      return this.pe;
15830
    }
15831
 
15832
    public void setPe(PaymentException pe) {
15833
      this.pe = pe;
15834
    }
15835
 
15836
    public void unsetPe() {
15837
      this.pe = null;
15838
    }
15839
 
15840
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
15841
    public boolean isSetPe() {
15842
      return this.pe != null;
15843
    }
15844
 
15845
    public void setPeIsSet(boolean value) {
15846
      if (!value) {
15847
        this.pe = null;
15848
      }
15849
    }
15850
 
15851
    public void setFieldValue(_Fields field, Object value) {
15852
      switch (field) {
15853
      case SUCCESS:
15854
        if (value == null) {
15855
          unsetSuccess();
15856
        } else {
15857
          setSuccess((Boolean)value);
15858
        }
15859
        break;
15860
 
15861
      case PE:
15862
        if (value == null) {
15863
          unsetPe();
15864
        } else {
15865
          setPe((PaymentException)value);
15866
        }
15867
        break;
15868
 
15869
      }
15870
    }
15871
 
15872
    public Object getFieldValue(_Fields field) {
15873
      switch (field) {
15874
      case SUCCESS:
15875
        return Boolean.valueOf(isSuccess());
15876
 
15877
      case PE:
15878
        return getPe();
15879
 
15880
      }
15881
      throw new IllegalStateException();
15882
    }
15883
 
15884
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15885
    public boolean isSet(_Fields field) {
15886
      if (field == null) {
15887
        throw new IllegalArgumentException();
15888
      }
15889
 
15890
      switch (field) {
15891
      case SUCCESS:
15892
        return isSetSuccess();
15893
      case PE:
15894
        return isSetPe();
15895
      }
15896
      throw new IllegalStateException();
15897
    }
15898
 
15899
    @Override
15900
    public boolean equals(Object that) {
15901
      if (that == null)
15902
        return false;
15903
      if (that instanceof refundPayment_result)
15904
        return this.equals((refundPayment_result)that);
15905
      return false;
15906
    }
15907
 
15908
    public boolean equals(refundPayment_result that) {
15909
      if (that == null)
15910
        return false;
15911
 
15912
      boolean this_present_success = true;
15913
      boolean that_present_success = true;
15914
      if (this_present_success || that_present_success) {
15915
        if (!(this_present_success && that_present_success))
15916
          return false;
15917
        if (this.success != that.success)
15918
          return false;
15919
      }
15920
 
15921
      boolean this_present_pe = true && this.isSetPe();
15922
      boolean that_present_pe = true && that.isSetPe();
15923
      if (this_present_pe || that_present_pe) {
15924
        if (!(this_present_pe && that_present_pe))
15925
          return false;
15926
        if (!this.pe.equals(that.pe))
15927
          return false;
15928
      }
15929
 
15930
      return true;
15931
    }
15932
 
15933
    @Override
15934
    public int hashCode() {
15935
      return 0;
15936
    }
15937
 
15938
    public int compareTo(refundPayment_result other) {
15939
      if (!getClass().equals(other.getClass())) {
15940
        return getClass().getName().compareTo(other.getClass().getName());
15941
      }
15942
 
15943
      int lastComparison = 0;
15944
      refundPayment_result typedOther = (refundPayment_result)other;
15945
 
15946
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
15947
      if (lastComparison != 0) {
15948
        return lastComparison;
15949
      }
15950
      if (isSetSuccess()) {
15951
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15952
        if (lastComparison != 0) {
15953
          return lastComparison;
15954
        }
15955
      }
15956
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
15957
      if (lastComparison != 0) {
15958
        return lastComparison;
15959
      }
15960
      if (isSetPe()) {
15961
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
15962
        if (lastComparison != 0) {
15963
          return lastComparison;
15964
        }
15965
      }
15966
      return 0;
15967
    }
15968
 
15969
    public _Fields fieldForId(int fieldId) {
15970
      return _Fields.findByThriftId(fieldId);
15971
    }
15972
 
15973
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15974
      org.apache.thrift.protocol.TField field;
15975
      iprot.readStructBegin();
15976
      while (true)
15977
      {
15978
        field = iprot.readFieldBegin();
15979
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15980
          break;
15981
        }
15982
        switch (field.id) {
15983
          case 0: // SUCCESS
15984
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
15985
              this.success = iprot.readBool();
15986
              setSuccessIsSet(true);
15987
            } else { 
15988
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15989
            }
15990
            break;
15991
          case 1: // PE
15992
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15993
              this.pe = new PaymentException();
15994
              this.pe.read(iprot);
15995
            } else { 
15996
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15997
            }
15998
            break;
15999
          default:
16000
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16001
        }
16002
        iprot.readFieldEnd();
16003
      }
16004
      iprot.readStructEnd();
16005
      validate();
16006
    }
16007
 
16008
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16009
      oprot.writeStructBegin(STRUCT_DESC);
16010
 
16011
      if (this.isSetSuccess()) {
16012
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16013
        oprot.writeBool(this.success);
16014
        oprot.writeFieldEnd();
16015
      } else if (this.isSetPe()) {
16016
        oprot.writeFieldBegin(PE_FIELD_DESC);
16017
        this.pe.write(oprot);
16018
        oprot.writeFieldEnd();
16019
      }
16020
      oprot.writeFieldStop();
16021
      oprot.writeStructEnd();
16022
    }
16023
 
16024
    @Override
16025
    public String toString() {
16026
      StringBuilder sb = new StringBuilder("refundPayment_result(");
16027
      boolean first = true;
16028
 
16029
      sb.append("success:");
16030
      sb.append(this.success);
16031
      first = false;
16032
      if (!first) sb.append(", ");
16033
      sb.append("pe:");
16034
      if (this.pe == null) {
16035
        sb.append("null");
16036
      } else {
16037
        sb.append(this.pe);
16038
      }
16039
      first = false;
16040
      sb.append(")");
16041
      return sb.toString();
16042
    }
16043
 
16044
    public void validate() throws org.apache.thrift.TException {
16045
      // check for required fields
16046
    }
16047
 
16048
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16049
      try {
16050
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16051
      } catch (org.apache.thrift.TException te) {
16052
        throw new java.io.IOException(te);
16053
      }
16054
    }
16055
 
16056
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16057
      try {
16058
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16059
      } catch (org.apache.thrift.TException te) {
16060
        throw new java.io.IOException(te);
16061
      }
16062
    }
16063
 
16064
  }
16065
 
3956 chandransh 16066
  public static class partiallyCapturePayment_args implements org.apache.thrift.TBase<partiallyCapturePayment_args, partiallyCapturePayment_args._Fields>, java.io.Serializable, Cloneable   {
16067
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_args");
16068
 
16069
    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);
16070
    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);
16071
    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);
16072
    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);
16073
    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);
16074
 
16075
    private long merchantTxnId; // required
16076
    private double amount; // required
16077
    private String xferBy; // required
16078
    private String xferTxnId; // required
16079
    private long xferDate; // required
16080
 
16081
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16082
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16083
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
16084
      AMOUNT((short)2, "amount"),
16085
      XFER_BY((short)3, "xferBy"),
16086
      XFER_TXN_ID((short)4, "xferTxnId"),
16087
      XFER_DATE((short)5, "xferDate");
16088
 
16089
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16090
 
16091
      static {
16092
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16093
          byName.put(field.getFieldName(), field);
16094
        }
16095
      }
16096
 
16097
      /**
16098
       * Find the _Fields constant that matches fieldId, or null if its not found.
16099
       */
16100
      public static _Fields findByThriftId(int fieldId) {
16101
        switch(fieldId) {
16102
          case 1: // MERCHANT_TXN_ID
16103
            return MERCHANT_TXN_ID;
16104
          case 2: // AMOUNT
16105
            return AMOUNT;
16106
          case 3: // XFER_BY
16107
            return XFER_BY;
16108
          case 4: // XFER_TXN_ID
16109
            return XFER_TXN_ID;
16110
          case 5: // XFER_DATE
16111
            return XFER_DATE;
16112
          default:
16113
            return null;
16114
        }
16115
      }
16116
 
16117
      /**
16118
       * Find the _Fields constant that matches fieldId, throwing an exception
16119
       * if it is not found.
16120
       */
16121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16122
        _Fields fields = findByThriftId(fieldId);
16123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16124
        return fields;
16125
      }
16126
 
16127
      /**
16128
       * Find the _Fields constant that matches name, or null if its not found.
16129
       */
16130
      public static _Fields findByName(String name) {
16131
        return byName.get(name);
16132
      }
16133
 
16134
      private final short _thriftId;
16135
      private final String _fieldName;
16136
 
16137
      _Fields(short thriftId, String fieldName) {
16138
        _thriftId = thriftId;
16139
        _fieldName = fieldName;
16140
      }
16141
 
16142
      public short getThriftFieldId() {
16143
        return _thriftId;
16144
      }
16145
 
16146
      public String getFieldName() {
16147
        return _fieldName;
16148
      }
16149
    }
16150
 
16151
    // isset id assignments
16152
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
16153
    private static final int __AMOUNT_ISSET_ID = 1;
16154
    private static final int __XFERDATE_ISSET_ID = 2;
16155
    private BitSet __isset_bit_vector = new BitSet(3);
16156
 
16157
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16158
    static {
16159
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16160
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16161
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16162
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16163
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
16164
      tmpMap.put(_Fields.XFER_BY, new org.apache.thrift.meta_data.FieldMetaData("xferBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16165
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16166
      tmpMap.put(_Fields.XFER_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("xferTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16167
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16168
      tmpMap.put(_Fields.XFER_DATE, new org.apache.thrift.meta_data.FieldMetaData("xferDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16169
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16170
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16171
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_args.class, metaDataMap);
16172
    }
16173
 
16174
    public partiallyCapturePayment_args() {
16175
    }
16176
 
16177
    public partiallyCapturePayment_args(
16178
      long merchantTxnId,
16179
      double amount,
16180
      String xferBy,
16181
      String xferTxnId,
16182
      long xferDate)
16183
    {
16184
      this();
16185
      this.merchantTxnId = merchantTxnId;
16186
      setMerchantTxnIdIsSet(true);
16187
      this.amount = amount;
16188
      setAmountIsSet(true);
16189
      this.xferBy = xferBy;
16190
      this.xferTxnId = xferTxnId;
16191
      this.xferDate = xferDate;
16192
      setXferDateIsSet(true);
16193
    }
16194
 
16195
    /**
16196
     * Performs a deep copy on <i>other</i>.
16197
     */
16198
    public partiallyCapturePayment_args(partiallyCapturePayment_args other) {
16199
      __isset_bit_vector.clear();
16200
      __isset_bit_vector.or(other.__isset_bit_vector);
16201
      this.merchantTxnId = other.merchantTxnId;
16202
      this.amount = other.amount;
16203
      if (other.isSetXferBy()) {
16204
        this.xferBy = other.xferBy;
16205
      }
16206
      if (other.isSetXferTxnId()) {
16207
        this.xferTxnId = other.xferTxnId;
16208
      }
16209
      this.xferDate = other.xferDate;
16210
    }
16211
 
16212
    public partiallyCapturePayment_args deepCopy() {
16213
      return new partiallyCapturePayment_args(this);
16214
    }
16215
 
16216
    @Override
16217
    public void clear() {
16218
      setMerchantTxnIdIsSet(false);
16219
      this.merchantTxnId = 0;
16220
      setAmountIsSet(false);
16221
      this.amount = 0.0;
16222
      this.xferBy = null;
16223
      this.xferTxnId = null;
16224
      setXferDateIsSet(false);
16225
      this.xferDate = 0;
16226
    }
16227
 
16228
    public long getMerchantTxnId() {
16229
      return this.merchantTxnId;
16230
    }
16231
 
16232
    public void setMerchantTxnId(long merchantTxnId) {
16233
      this.merchantTxnId = merchantTxnId;
16234
      setMerchantTxnIdIsSet(true);
16235
    }
16236
 
16237
    public void unsetMerchantTxnId() {
16238
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
16239
    }
16240
 
16241
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
16242
    public boolean isSetMerchantTxnId() {
16243
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
16244
    }
16245
 
16246
    public void setMerchantTxnIdIsSet(boolean value) {
16247
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
16248
    }
16249
 
16250
    public double getAmount() {
16251
      return this.amount;
16252
    }
16253
 
16254
    public void setAmount(double amount) {
16255
      this.amount = amount;
16256
      setAmountIsSet(true);
16257
    }
16258
 
16259
    public void unsetAmount() {
16260
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
16261
    }
16262
 
16263
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
16264
    public boolean isSetAmount() {
16265
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
16266
    }
16267
 
16268
    public void setAmountIsSet(boolean value) {
16269
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
16270
    }
16271
 
16272
    public String getXferBy() {
16273
      return this.xferBy;
16274
    }
16275
 
16276
    public void setXferBy(String xferBy) {
16277
      this.xferBy = xferBy;
16278
    }
16279
 
16280
    public void unsetXferBy() {
16281
      this.xferBy = null;
16282
    }
16283
 
16284
    /** Returns true if field xferBy is set (has been assigned a value) and false otherwise */
16285
    public boolean isSetXferBy() {
16286
      return this.xferBy != null;
16287
    }
16288
 
16289
    public void setXferByIsSet(boolean value) {
16290
      if (!value) {
16291
        this.xferBy = null;
16292
      }
16293
    }
16294
 
16295
    public String getXferTxnId() {
16296
      return this.xferTxnId;
16297
    }
16298
 
16299
    public void setXferTxnId(String xferTxnId) {
16300
      this.xferTxnId = xferTxnId;
16301
    }
16302
 
16303
    public void unsetXferTxnId() {
16304
      this.xferTxnId = null;
16305
    }
16306
 
16307
    /** Returns true if field xferTxnId is set (has been assigned a value) and false otherwise */
16308
    public boolean isSetXferTxnId() {
16309
      return this.xferTxnId != null;
16310
    }
16311
 
16312
    public void setXferTxnIdIsSet(boolean value) {
16313
      if (!value) {
16314
        this.xferTxnId = null;
16315
      }
16316
    }
16317
 
16318
    public long getXferDate() {
16319
      return this.xferDate;
16320
    }
16321
 
16322
    public void setXferDate(long xferDate) {
16323
      this.xferDate = xferDate;
16324
      setXferDateIsSet(true);
16325
    }
16326
 
16327
    public void unsetXferDate() {
16328
      __isset_bit_vector.clear(__XFERDATE_ISSET_ID);
16329
    }
16330
 
16331
    /** Returns true if field xferDate is set (has been assigned a value) and false otherwise */
16332
    public boolean isSetXferDate() {
16333
      return __isset_bit_vector.get(__XFERDATE_ISSET_ID);
16334
    }
16335
 
16336
    public void setXferDateIsSet(boolean value) {
16337
      __isset_bit_vector.set(__XFERDATE_ISSET_ID, value);
16338
    }
16339
 
16340
    public void setFieldValue(_Fields field, Object value) {
16341
      switch (field) {
16342
      case MERCHANT_TXN_ID:
16343
        if (value == null) {
16344
          unsetMerchantTxnId();
16345
        } else {
16346
          setMerchantTxnId((Long)value);
16347
        }
16348
        break;
16349
 
16350
      case AMOUNT:
16351
        if (value == null) {
16352
          unsetAmount();
16353
        } else {
16354
          setAmount((Double)value);
16355
        }
16356
        break;
16357
 
16358
      case XFER_BY:
16359
        if (value == null) {
16360
          unsetXferBy();
16361
        } else {
16362
          setXferBy((String)value);
16363
        }
16364
        break;
16365
 
16366
      case XFER_TXN_ID:
16367
        if (value == null) {
16368
          unsetXferTxnId();
16369
        } else {
16370
          setXferTxnId((String)value);
16371
        }
16372
        break;
16373
 
16374
      case XFER_DATE:
16375
        if (value == null) {
16376
          unsetXferDate();
16377
        } else {
16378
          setXferDate((Long)value);
16379
        }
16380
        break;
16381
 
16382
      }
16383
    }
16384
 
16385
    public Object getFieldValue(_Fields field) {
16386
      switch (field) {
16387
      case MERCHANT_TXN_ID:
16388
        return Long.valueOf(getMerchantTxnId());
16389
 
16390
      case AMOUNT:
16391
        return Double.valueOf(getAmount());
16392
 
16393
      case XFER_BY:
16394
        return getXferBy();
16395
 
16396
      case XFER_TXN_ID:
16397
        return getXferTxnId();
16398
 
16399
      case XFER_DATE:
16400
        return Long.valueOf(getXferDate());
16401
 
16402
      }
16403
      throw new IllegalStateException();
16404
    }
16405
 
16406
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16407
    public boolean isSet(_Fields field) {
16408
      if (field == null) {
16409
        throw new IllegalArgumentException();
16410
      }
16411
 
16412
      switch (field) {
16413
      case MERCHANT_TXN_ID:
16414
        return isSetMerchantTxnId();
16415
      case AMOUNT:
16416
        return isSetAmount();
16417
      case XFER_BY:
16418
        return isSetXferBy();
16419
      case XFER_TXN_ID:
16420
        return isSetXferTxnId();
16421
      case XFER_DATE:
16422
        return isSetXferDate();
16423
      }
16424
      throw new IllegalStateException();
16425
    }
16426
 
16427
    @Override
16428
    public boolean equals(Object that) {
16429
      if (that == null)
16430
        return false;
16431
      if (that instanceof partiallyCapturePayment_args)
16432
        return this.equals((partiallyCapturePayment_args)that);
16433
      return false;
16434
    }
16435
 
16436
    public boolean equals(partiallyCapturePayment_args that) {
16437
      if (that == null)
16438
        return false;
16439
 
16440
      boolean this_present_merchantTxnId = true;
16441
      boolean that_present_merchantTxnId = true;
16442
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
16443
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
16444
          return false;
16445
        if (this.merchantTxnId != that.merchantTxnId)
16446
          return false;
16447
      }
16448
 
16449
      boolean this_present_amount = true;
16450
      boolean that_present_amount = true;
16451
      if (this_present_amount || that_present_amount) {
16452
        if (!(this_present_amount && that_present_amount))
16453
          return false;
16454
        if (this.amount != that.amount)
16455
          return false;
16456
      }
16457
 
16458
      boolean this_present_xferBy = true && this.isSetXferBy();
16459
      boolean that_present_xferBy = true && that.isSetXferBy();
16460
      if (this_present_xferBy || that_present_xferBy) {
16461
        if (!(this_present_xferBy && that_present_xferBy))
16462
          return false;
16463
        if (!this.xferBy.equals(that.xferBy))
16464
          return false;
16465
      }
16466
 
16467
      boolean this_present_xferTxnId = true && this.isSetXferTxnId();
16468
      boolean that_present_xferTxnId = true && that.isSetXferTxnId();
16469
      if (this_present_xferTxnId || that_present_xferTxnId) {
16470
        if (!(this_present_xferTxnId && that_present_xferTxnId))
16471
          return false;
16472
        if (!this.xferTxnId.equals(that.xferTxnId))
16473
          return false;
16474
      }
16475
 
16476
      boolean this_present_xferDate = true;
16477
      boolean that_present_xferDate = true;
16478
      if (this_present_xferDate || that_present_xferDate) {
16479
        if (!(this_present_xferDate && that_present_xferDate))
16480
          return false;
16481
        if (this.xferDate != that.xferDate)
16482
          return false;
16483
      }
16484
 
16485
      return true;
16486
    }
16487
 
16488
    @Override
16489
    public int hashCode() {
16490
      return 0;
16491
    }
16492
 
16493
    public int compareTo(partiallyCapturePayment_args other) {
16494
      if (!getClass().equals(other.getClass())) {
16495
        return getClass().getName().compareTo(other.getClass().getName());
16496
      }
16497
 
16498
      int lastComparison = 0;
16499
      partiallyCapturePayment_args typedOther = (partiallyCapturePayment_args)other;
16500
 
16501
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
16502
      if (lastComparison != 0) {
16503
        return lastComparison;
16504
      }
16505
      if (isSetMerchantTxnId()) {
16506
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
16507
        if (lastComparison != 0) {
16508
          return lastComparison;
16509
        }
16510
      }
16511
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
16512
      if (lastComparison != 0) {
16513
        return lastComparison;
16514
      }
16515
      if (isSetAmount()) {
16516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
16517
        if (lastComparison != 0) {
16518
          return lastComparison;
16519
        }
16520
      }
16521
      lastComparison = Boolean.valueOf(isSetXferBy()).compareTo(typedOther.isSetXferBy());
16522
      if (lastComparison != 0) {
16523
        return lastComparison;
16524
      }
16525
      if (isSetXferBy()) {
16526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferBy, typedOther.xferBy);
16527
        if (lastComparison != 0) {
16528
          return lastComparison;
16529
        }
16530
      }
16531
      lastComparison = Boolean.valueOf(isSetXferTxnId()).compareTo(typedOther.isSetXferTxnId());
16532
      if (lastComparison != 0) {
16533
        return lastComparison;
16534
      }
16535
      if (isSetXferTxnId()) {
16536
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferTxnId, typedOther.xferTxnId);
16537
        if (lastComparison != 0) {
16538
          return lastComparison;
16539
        }
16540
      }
16541
      lastComparison = Boolean.valueOf(isSetXferDate()).compareTo(typedOther.isSetXferDate());
16542
      if (lastComparison != 0) {
16543
        return lastComparison;
16544
      }
16545
      if (isSetXferDate()) {
16546
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferDate, typedOther.xferDate);
16547
        if (lastComparison != 0) {
16548
          return lastComparison;
16549
        }
16550
      }
16551
      return 0;
16552
    }
16553
 
16554
    public _Fields fieldForId(int fieldId) {
16555
      return _Fields.findByThriftId(fieldId);
16556
    }
16557
 
16558
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16559
      org.apache.thrift.protocol.TField field;
16560
      iprot.readStructBegin();
16561
      while (true)
16562
      {
16563
        field = iprot.readFieldBegin();
16564
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16565
          break;
16566
        }
16567
        switch (field.id) {
16568
          case 1: // MERCHANT_TXN_ID
16569
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16570
              this.merchantTxnId = iprot.readI64();
16571
              setMerchantTxnIdIsSet(true);
16572
            } else { 
16573
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16574
            }
16575
            break;
16576
          case 2: // AMOUNT
16577
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
16578
              this.amount = iprot.readDouble();
16579
              setAmountIsSet(true);
16580
            } else { 
16581
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16582
            }
16583
            break;
16584
          case 3: // XFER_BY
16585
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
16586
              this.xferBy = iprot.readString();
16587
            } else { 
16588
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16589
            }
16590
            break;
16591
          case 4: // XFER_TXN_ID
16592
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
16593
              this.xferTxnId = iprot.readString();
16594
            } else { 
16595
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16596
            }
16597
            break;
16598
          case 5: // XFER_DATE
16599
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16600
              this.xferDate = iprot.readI64();
16601
              setXferDateIsSet(true);
16602
            } else { 
16603
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16604
            }
16605
            break;
16606
          default:
16607
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16608
        }
16609
        iprot.readFieldEnd();
16610
      }
16611
      iprot.readStructEnd();
16612
      validate();
16613
    }
16614
 
16615
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16616
      validate();
16617
 
16618
      oprot.writeStructBegin(STRUCT_DESC);
16619
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
16620
      oprot.writeI64(this.merchantTxnId);
16621
      oprot.writeFieldEnd();
16622
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
16623
      oprot.writeDouble(this.amount);
16624
      oprot.writeFieldEnd();
16625
      if (this.xferBy != null) {
16626
        oprot.writeFieldBegin(XFER_BY_FIELD_DESC);
16627
        oprot.writeString(this.xferBy);
16628
        oprot.writeFieldEnd();
16629
      }
16630
      if (this.xferTxnId != null) {
16631
        oprot.writeFieldBegin(XFER_TXN_ID_FIELD_DESC);
16632
        oprot.writeString(this.xferTxnId);
16633
        oprot.writeFieldEnd();
16634
      }
16635
      oprot.writeFieldBegin(XFER_DATE_FIELD_DESC);
16636
      oprot.writeI64(this.xferDate);
16637
      oprot.writeFieldEnd();
16638
      oprot.writeFieldStop();
16639
      oprot.writeStructEnd();
16640
    }
16641
 
16642
    @Override
16643
    public String toString() {
16644
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_args(");
16645
      boolean first = true;
16646
 
16647
      sb.append("merchantTxnId:");
16648
      sb.append(this.merchantTxnId);
16649
      first = false;
16650
      if (!first) sb.append(", ");
16651
      sb.append("amount:");
16652
      sb.append(this.amount);
16653
      first = false;
16654
      if (!first) sb.append(", ");
16655
      sb.append("xferBy:");
16656
      if (this.xferBy == null) {
16657
        sb.append("null");
16658
      } else {
16659
        sb.append(this.xferBy);
16660
      }
16661
      first = false;
16662
      if (!first) sb.append(", ");
16663
      sb.append("xferTxnId:");
16664
      if (this.xferTxnId == null) {
16665
        sb.append("null");
16666
      } else {
16667
        sb.append(this.xferTxnId);
16668
      }
16669
      first = false;
16670
      if (!first) sb.append(", ");
16671
      sb.append("xferDate:");
16672
      sb.append(this.xferDate);
16673
      first = false;
16674
      sb.append(")");
16675
      return sb.toString();
16676
    }
16677
 
16678
    public void validate() throws org.apache.thrift.TException {
16679
      // check for required fields
16680
    }
16681
 
16682
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16683
      try {
16684
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16685
      } catch (org.apache.thrift.TException te) {
16686
        throw new java.io.IOException(te);
16687
      }
16688
    }
16689
 
16690
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16691
      try {
16692
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16693
      } catch (org.apache.thrift.TException te) {
16694
        throw new java.io.IOException(te);
16695
      }
16696
    }
16697
 
16698
  }
16699
 
16700
  public static class partiallyCapturePayment_result implements org.apache.thrift.TBase<partiallyCapturePayment_result, partiallyCapturePayment_result._Fields>, java.io.Serializable, Cloneable   {
16701
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_result");
16702
 
16703
    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);
16704
    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);
16705
 
16706
    private boolean success; // required
16707
    private PaymentException pe; // required
16708
 
16709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16710
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16711
      SUCCESS((short)0, "success"),
16712
      PE((short)1, "pe");
16713
 
16714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16715
 
16716
      static {
16717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16718
          byName.put(field.getFieldName(), field);
16719
        }
16720
      }
16721
 
16722
      /**
16723
       * Find the _Fields constant that matches fieldId, or null if its not found.
16724
       */
16725
      public static _Fields findByThriftId(int fieldId) {
16726
        switch(fieldId) {
16727
          case 0: // SUCCESS
16728
            return SUCCESS;
16729
          case 1: // PE
16730
            return PE;
16731
          default:
16732
            return null;
16733
        }
16734
      }
16735
 
16736
      /**
16737
       * Find the _Fields constant that matches fieldId, throwing an exception
16738
       * if it is not found.
16739
       */
16740
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16741
        _Fields fields = findByThriftId(fieldId);
16742
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16743
        return fields;
16744
      }
16745
 
16746
      /**
16747
       * Find the _Fields constant that matches name, or null if its not found.
16748
       */
16749
      public static _Fields findByName(String name) {
16750
        return byName.get(name);
16751
      }
16752
 
16753
      private final short _thriftId;
16754
      private final String _fieldName;
16755
 
16756
      _Fields(short thriftId, String fieldName) {
16757
        _thriftId = thriftId;
16758
        _fieldName = fieldName;
16759
      }
16760
 
16761
      public short getThriftFieldId() {
16762
        return _thriftId;
16763
      }
16764
 
16765
      public String getFieldName() {
16766
        return _fieldName;
16767
      }
16768
    }
16769
 
16770
    // isset id assignments
16771
    private static final int __SUCCESS_ISSET_ID = 0;
16772
    private BitSet __isset_bit_vector = new BitSet(1);
16773
 
16774
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16775
    static {
16776
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16777
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16778
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16779
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16780
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
16781
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16782
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_result.class, metaDataMap);
16783
    }
16784
 
16785
    public partiallyCapturePayment_result() {
16786
    }
16787
 
16788
    public partiallyCapturePayment_result(
16789
      boolean success,
16790
      PaymentException pe)
16791
    {
16792
      this();
16793
      this.success = success;
16794
      setSuccessIsSet(true);
16795
      this.pe = pe;
16796
    }
16797
 
16798
    /**
16799
     * Performs a deep copy on <i>other</i>.
16800
     */
16801
    public partiallyCapturePayment_result(partiallyCapturePayment_result other) {
16802
      __isset_bit_vector.clear();
16803
      __isset_bit_vector.or(other.__isset_bit_vector);
16804
      this.success = other.success;
16805
      if (other.isSetPe()) {
16806
        this.pe = new PaymentException(other.pe);
16807
      }
16808
    }
16809
 
16810
    public partiallyCapturePayment_result deepCopy() {
16811
      return new partiallyCapturePayment_result(this);
16812
    }
16813
 
16814
    @Override
16815
    public void clear() {
16816
      setSuccessIsSet(false);
16817
      this.success = false;
16818
      this.pe = null;
16819
    }
16820
 
16821
    public boolean isSuccess() {
16822
      return this.success;
16823
    }
16824
 
16825
    public void setSuccess(boolean success) {
16826
      this.success = success;
16827
      setSuccessIsSet(true);
16828
    }
16829
 
16830
    public void unsetSuccess() {
16831
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16832
    }
16833
 
16834
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16835
    public boolean isSetSuccess() {
16836
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16837
    }
16838
 
16839
    public void setSuccessIsSet(boolean value) {
16840
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16841
    }
16842
 
16843
    public PaymentException getPe() {
16844
      return this.pe;
16845
    }
16846
 
16847
    public void setPe(PaymentException pe) {
16848
      this.pe = pe;
16849
    }
16850
 
16851
    public void unsetPe() {
16852
      this.pe = null;
16853
    }
16854
 
16855
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
16856
    public boolean isSetPe() {
16857
      return this.pe != null;
16858
    }
16859
 
16860
    public void setPeIsSet(boolean value) {
16861
      if (!value) {
16862
        this.pe = null;
16863
      }
16864
    }
16865
 
16866
    public void setFieldValue(_Fields field, Object value) {
16867
      switch (field) {
16868
      case SUCCESS:
16869
        if (value == null) {
16870
          unsetSuccess();
16871
        } else {
16872
          setSuccess((Boolean)value);
16873
        }
16874
        break;
16875
 
16876
      case PE:
16877
        if (value == null) {
16878
          unsetPe();
16879
        } else {
16880
          setPe((PaymentException)value);
16881
        }
16882
        break;
16883
 
16884
      }
16885
    }
16886
 
16887
    public Object getFieldValue(_Fields field) {
16888
      switch (field) {
16889
      case SUCCESS:
16890
        return Boolean.valueOf(isSuccess());
16891
 
16892
      case PE:
16893
        return getPe();
16894
 
16895
      }
16896
      throw new IllegalStateException();
16897
    }
16898
 
16899
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16900
    public boolean isSet(_Fields field) {
16901
      if (field == null) {
16902
        throw new IllegalArgumentException();
16903
      }
16904
 
16905
      switch (field) {
16906
      case SUCCESS:
16907
        return isSetSuccess();
16908
      case PE:
16909
        return isSetPe();
16910
      }
16911
      throw new IllegalStateException();
16912
    }
16913
 
16914
    @Override
16915
    public boolean equals(Object that) {
16916
      if (that == null)
16917
        return false;
16918
      if (that instanceof partiallyCapturePayment_result)
16919
        return this.equals((partiallyCapturePayment_result)that);
16920
      return false;
16921
    }
16922
 
16923
    public boolean equals(partiallyCapturePayment_result that) {
16924
      if (that == null)
16925
        return false;
16926
 
16927
      boolean this_present_success = true;
16928
      boolean that_present_success = true;
16929
      if (this_present_success || that_present_success) {
16930
        if (!(this_present_success && that_present_success))
16931
          return false;
16932
        if (this.success != that.success)
16933
          return false;
16934
      }
16935
 
16936
      boolean this_present_pe = true && this.isSetPe();
16937
      boolean that_present_pe = true && that.isSetPe();
16938
      if (this_present_pe || that_present_pe) {
16939
        if (!(this_present_pe && that_present_pe))
16940
          return false;
16941
        if (!this.pe.equals(that.pe))
16942
          return false;
16943
      }
16944
 
16945
      return true;
16946
    }
16947
 
16948
    @Override
16949
    public int hashCode() {
16950
      return 0;
16951
    }
16952
 
16953
    public int compareTo(partiallyCapturePayment_result other) {
16954
      if (!getClass().equals(other.getClass())) {
16955
        return getClass().getName().compareTo(other.getClass().getName());
16956
      }
16957
 
16958
      int lastComparison = 0;
16959
      partiallyCapturePayment_result typedOther = (partiallyCapturePayment_result)other;
16960
 
16961
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16962
      if (lastComparison != 0) {
16963
        return lastComparison;
16964
      }
16965
      if (isSetSuccess()) {
16966
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16967
        if (lastComparison != 0) {
16968
          return lastComparison;
16969
        }
16970
      }
16971
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
16972
      if (lastComparison != 0) {
16973
        return lastComparison;
16974
      }
16975
      if (isSetPe()) {
16976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
16977
        if (lastComparison != 0) {
16978
          return lastComparison;
16979
        }
16980
      }
16981
      return 0;
16982
    }
16983
 
16984
    public _Fields fieldForId(int fieldId) {
16985
      return _Fields.findByThriftId(fieldId);
16986
    }
16987
 
16988
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16989
      org.apache.thrift.protocol.TField field;
16990
      iprot.readStructBegin();
16991
      while (true)
16992
      {
16993
        field = iprot.readFieldBegin();
16994
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16995
          break;
16996
        }
16997
        switch (field.id) {
16998
          case 0: // SUCCESS
16999
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
17000
              this.success = iprot.readBool();
17001
              setSuccessIsSet(true);
17002
            } else { 
17003
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17004
            }
17005
            break;
17006
          case 1: // PE
17007
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
17008
              this.pe = new PaymentException();
17009
              this.pe.read(iprot);
17010
            } else { 
17011
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17012
            }
17013
            break;
17014
          default:
17015
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17016
        }
17017
        iprot.readFieldEnd();
17018
      }
17019
      iprot.readStructEnd();
17020
      validate();
17021
    }
17022
 
17023
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17024
      oprot.writeStructBegin(STRUCT_DESC);
17025
 
17026
      if (this.isSetSuccess()) {
17027
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17028
        oprot.writeBool(this.success);
17029
        oprot.writeFieldEnd();
17030
      } else if (this.isSetPe()) {
17031
        oprot.writeFieldBegin(PE_FIELD_DESC);
17032
        this.pe.write(oprot);
17033
        oprot.writeFieldEnd();
17034
      }
17035
      oprot.writeFieldStop();
17036
      oprot.writeStructEnd();
17037
    }
17038
 
17039
    @Override
17040
    public String toString() {
17041
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_result(");
17042
      boolean first = true;
17043
 
17044
      sb.append("success:");
17045
      sb.append(this.success);
17046
      first = false;
17047
      if (!first) sb.append(", ");
17048
      sb.append("pe:");
17049
      if (this.pe == null) {
17050
        sb.append("null");
17051
      } else {
17052
        sb.append(this.pe);
17053
      }
17054
      first = false;
17055
      sb.append(")");
17056
      return sb.toString();
17057
    }
17058
 
17059
    public void validate() throws org.apache.thrift.TException {
17060
      // check for required fields
17061
    }
17062
 
17063
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17064
      try {
17065
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17066
      } catch (org.apache.thrift.TException te) {
17067
        throw new java.io.IOException(te);
17068
      }
17069
    }
17070
 
17071
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17072
      try {
17073
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17074
      } catch (org.apache.thrift.TException te) {
17075
        throw new java.io.IOException(te);
17076
      }
17077
    }
17078
 
17079
  }
17080
 
4008 mandeep.dh 17081
  public static class getPaymentsRequiringExtraProcessing_args implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_args, getPaymentsRequiringExtraProcessing_args._Fields>, java.io.Serializable, Cloneable   {
17082
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_args");
17083
 
17084
    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);
17085
 
17086
    private ExtraPaymentProcessingType category; // required
17087
 
17088
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17089
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17090
      /**
17091
       * 
17092
       * @see ExtraPaymentProcessingType
17093
       */
17094
      CATEGORY((short)1, "category");
17095
 
17096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17097
 
17098
      static {
17099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17100
          byName.put(field.getFieldName(), field);
17101
        }
17102
      }
17103
 
17104
      /**
17105
       * Find the _Fields constant that matches fieldId, or null if its not found.
17106
       */
17107
      public static _Fields findByThriftId(int fieldId) {
17108
        switch(fieldId) {
17109
          case 1: // CATEGORY
17110
            return CATEGORY;
17111
          default:
17112
            return null;
17113
        }
17114
      }
17115
 
17116
      /**
17117
       * Find the _Fields constant that matches fieldId, throwing an exception
17118
       * if it is not found.
17119
       */
17120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17121
        _Fields fields = findByThriftId(fieldId);
17122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17123
        return fields;
17124
      }
17125
 
17126
      /**
17127
       * Find the _Fields constant that matches name, or null if its not found.
17128
       */
17129
      public static _Fields findByName(String name) {
17130
        return byName.get(name);
17131
      }
17132
 
17133
      private final short _thriftId;
17134
      private final String _fieldName;
17135
 
17136
      _Fields(short thriftId, String fieldName) {
17137
        _thriftId = thriftId;
17138
        _fieldName = fieldName;
17139
      }
17140
 
17141
      public short getThriftFieldId() {
17142
        return _thriftId;
17143
      }
17144
 
17145
      public String getFieldName() {
17146
        return _fieldName;
17147
      }
17148
    }
17149
 
17150
    // isset id assignments
17151
 
17152
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17153
    static {
17154
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17155
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17156
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
17157
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17158
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_args.class, metaDataMap);
17159
    }
17160
 
17161
    public getPaymentsRequiringExtraProcessing_args() {
17162
    }
17163
 
17164
    public getPaymentsRequiringExtraProcessing_args(
17165
      ExtraPaymentProcessingType category)
17166
    {
17167
      this();
17168
      this.category = category;
17169
    }
17170
 
17171
    /**
17172
     * Performs a deep copy on <i>other</i>.
17173
     */
17174
    public getPaymentsRequiringExtraProcessing_args(getPaymentsRequiringExtraProcessing_args other) {
17175
      if (other.isSetCategory()) {
17176
        this.category = other.category;
17177
      }
17178
    }
17179
 
17180
    public getPaymentsRequiringExtraProcessing_args deepCopy() {
17181
      return new getPaymentsRequiringExtraProcessing_args(this);
17182
    }
17183
 
17184
    @Override
17185
    public void clear() {
17186
      this.category = null;
17187
    }
17188
 
17189
    /**
17190
     * 
17191
     * @see ExtraPaymentProcessingType
17192
     */
17193
    public ExtraPaymentProcessingType getCategory() {
17194
      return this.category;
17195
    }
17196
 
17197
    /**
17198
     * 
17199
     * @see ExtraPaymentProcessingType
17200
     */
17201
    public void setCategory(ExtraPaymentProcessingType category) {
17202
      this.category = category;
17203
    }
17204
 
17205
    public void unsetCategory() {
17206
      this.category = null;
17207
    }
17208
 
17209
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
17210
    public boolean isSetCategory() {
17211
      return this.category != null;
17212
    }
17213
 
17214
    public void setCategoryIsSet(boolean value) {
17215
      if (!value) {
17216
        this.category = null;
17217
      }
17218
    }
17219
 
17220
    public void setFieldValue(_Fields field, Object value) {
17221
      switch (field) {
17222
      case CATEGORY:
17223
        if (value == null) {
17224
          unsetCategory();
17225
        } else {
17226
          setCategory((ExtraPaymentProcessingType)value);
17227
        }
17228
        break;
17229
 
17230
      }
17231
    }
17232
 
17233
    public Object getFieldValue(_Fields field) {
17234
      switch (field) {
17235
      case CATEGORY:
17236
        return getCategory();
17237
 
17238
      }
17239
      throw new IllegalStateException();
17240
    }
17241
 
17242
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17243
    public boolean isSet(_Fields field) {
17244
      if (field == null) {
17245
        throw new IllegalArgumentException();
17246
      }
17247
 
17248
      switch (field) {
17249
      case CATEGORY:
17250
        return isSetCategory();
17251
      }
17252
      throw new IllegalStateException();
17253
    }
17254
 
17255
    @Override
17256
    public boolean equals(Object that) {
17257
      if (that == null)
17258
        return false;
17259
      if (that instanceof getPaymentsRequiringExtraProcessing_args)
17260
        return this.equals((getPaymentsRequiringExtraProcessing_args)that);
17261
      return false;
17262
    }
17263
 
17264
    public boolean equals(getPaymentsRequiringExtraProcessing_args that) {
17265
      if (that == null)
17266
        return false;
17267
 
17268
      boolean this_present_category = true && this.isSetCategory();
17269
      boolean that_present_category = true && that.isSetCategory();
17270
      if (this_present_category || that_present_category) {
17271
        if (!(this_present_category && that_present_category))
17272
          return false;
17273
        if (!this.category.equals(that.category))
17274
          return false;
17275
      }
17276
 
17277
      return true;
17278
    }
17279
 
17280
    @Override
17281
    public int hashCode() {
17282
      return 0;
17283
    }
17284
 
17285
    public int compareTo(getPaymentsRequiringExtraProcessing_args other) {
17286
      if (!getClass().equals(other.getClass())) {
17287
        return getClass().getName().compareTo(other.getClass().getName());
17288
      }
17289
 
17290
      int lastComparison = 0;
17291
      getPaymentsRequiringExtraProcessing_args typedOther = (getPaymentsRequiringExtraProcessing_args)other;
17292
 
17293
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
17294
      if (lastComparison != 0) {
17295
        return lastComparison;
17296
      }
17297
      if (isSetCategory()) {
17298
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
17299
        if (lastComparison != 0) {
17300
          return lastComparison;
17301
        }
17302
      }
17303
      return 0;
17304
    }
17305
 
17306
    public _Fields fieldForId(int fieldId) {
17307
      return _Fields.findByThriftId(fieldId);
17308
    }
17309
 
17310
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17311
      org.apache.thrift.protocol.TField field;
17312
      iprot.readStructBegin();
17313
      while (true)
17314
      {
17315
        field = iprot.readFieldBegin();
17316
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17317
          break;
17318
        }
17319
        switch (field.id) {
17320
          case 1: // CATEGORY
17321
            if (field.type == org.apache.thrift.protocol.TType.I32) {
17322
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
17323
            } else { 
17324
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17325
            }
17326
            break;
17327
          default:
17328
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17329
        }
17330
        iprot.readFieldEnd();
17331
      }
17332
      iprot.readStructEnd();
17333
      validate();
17334
    }
17335
 
17336
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17337
      validate();
17338
 
17339
      oprot.writeStructBegin(STRUCT_DESC);
17340
      if (this.category != null) {
17341
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
17342
        oprot.writeI32(this.category.getValue());
17343
        oprot.writeFieldEnd();
17344
      }
17345
      oprot.writeFieldStop();
17346
      oprot.writeStructEnd();
17347
    }
17348
 
17349
    @Override
17350
    public String toString() {
17351
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_args(");
17352
      boolean first = true;
17353
 
17354
      sb.append("category:");
17355
      if (this.category == null) {
17356
        sb.append("null");
17357
      } else {
17358
        sb.append(this.category);
17359
      }
17360
      first = false;
17361
      sb.append(")");
17362
      return sb.toString();
17363
    }
17364
 
17365
    public void validate() throws org.apache.thrift.TException {
17366
      // check for required fields
17367
    }
17368
 
17369
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17370
      try {
17371
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17372
      } catch (org.apache.thrift.TException te) {
17373
        throw new java.io.IOException(te);
17374
      }
17375
    }
17376
 
17377
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17378
      try {
17379
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17380
      } catch (org.apache.thrift.TException te) {
17381
        throw new java.io.IOException(te);
17382
      }
17383
    }
17384
 
17385
  }
17386
 
17387
  public static class getPaymentsRequiringExtraProcessing_result implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_result, getPaymentsRequiringExtraProcessing_result._Fields>, java.io.Serializable, Cloneable   {
17388
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_result");
17389
 
17390
    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);
17391
 
17392
    private List<Long> success; // required
17393
 
17394
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17395
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17396
      SUCCESS((short)0, "success");
17397
 
17398
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17399
 
17400
      static {
17401
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17402
          byName.put(field.getFieldName(), field);
17403
        }
17404
      }
17405
 
17406
      /**
17407
       * Find the _Fields constant that matches fieldId, or null if its not found.
17408
       */
17409
      public static _Fields findByThriftId(int fieldId) {
17410
        switch(fieldId) {
17411
          case 0: // SUCCESS
17412
            return SUCCESS;
17413
          default:
17414
            return null;
17415
        }
17416
      }
17417
 
17418
      /**
17419
       * Find the _Fields constant that matches fieldId, throwing an exception
17420
       * if it is not found.
17421
       */
17422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17423
        _Fields fields = findByThriftId(fieldId);
17424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17425
        return fields;
17426
      }
17427
 
17428
      /**
17429
       * Find the _Fields constant that matches name, or null if its not found.
17430
       */
17431
      public static _Fields findByName(String name) {
17432
        return byName.get(name);
17433
      }
17434
 
17435
      private final short _thriftId;
17436
      private final String _fieldName;
17437
 
17438
      _Fields(short thriftId, String fieldName) {
17439
        _thriftId = thriftId;
17440
        _fieldName = fieldName;
17441
      }
17442
 
17443
      public short getThriftFieldId() {
17444
        return _thriftId;
17445
      }
17446
 
17447
      public String getFieldName() {
17448
        return _fieldName;
17449
      }
17450
    }
17451
 
17452
    // isset id assignments
17453
 
17454
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17455
    static {
17456
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17457
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17458
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17459
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
17460
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17461
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_result.class, metaDataMap);
17462
    }
17463
 
17464
    public getPaymentsRequiringExtraProcessing_result() {
17465
    }
17466
 
17467
    public getPaymentsRequiringExtraProcessing_result(
17468
      List<Long> success)
17469
    {
17470
      this();
17471
      this.success = success;
17472
    }
17473
 
17474
    /**
17475
     * Performs a deep copy on <i>other</i>.
17476
     */
17477
    public getPaymentsRequiringExtraProcessing_result(getPaymentsRequiringExtraProcessing_result other) {
17478
      if (other.isSetSuccess()) {
17479
        List<Long> __this__success = new ArrayList<Long>();
17480
        for (Long other_element : other.success) {
17481
          __this__success.add(other_element);
17482
        }
17483
        this.success = __this__success;
17484
      }
17485
    }
17486
 
17487
    public getPaymentsRequiringExtraProcessing_result deepCopy() {
17488
      return new getPaymentsRequiringExtraProcessing_result(this);
17489
    }
17490
 
17491
    @Override
17492
    public void clear() {
17493
      this.success = null;
17494
    }
17495
 
17496
    public int getSuccessSize() {
17497
      return (this.success == null) ? 0 : this.success.size();
17498
    }
17499
 
17500
    public java.util.Iterator<Long> getSuccessIterator() {
17501
      return (this.success == null) ? null : this.success.iterator();
17502
    }
17503
 
17504
    public void addToSuccess(long elem) {
17505
      if (this.success == null) {
17506
        this.success = new ArrayList<Long>();
17507
      }
17508
      this.success.add(elem);
17509
    }
17510
 
17511
    public List<Long> getSuccess() {
17512
      return this.success;
17513
    }
17514
 
17515
    public void setSuccess(List<Long> success) {
17516
      this.success = success;
17517
    }
17518
 
17519
    public void unsetSuccess() {
17520
      this.success = null;
17521
    }
17522
 
17523
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17524
    public boolean isSetSuccess() {
17525
      return this.success != null;
17526
    }
17527
 
17528
    public void setSuccessIsSet(boolean value) {
17529
      if (!value) {
17530
        this.success = null;
17531
      }
17532
    }
17533
 
17534
    public void setFieldValue(_Fields field, Object value) {
17535
      switch (field) {
17536
      case SUCCESS:
17537
        if (value == null) {
17538
          unsetSuccess();
17539
        } else {
17540
          setSuccess((List<Long>)value);
17541
        }
17542
        break;
17543
 
17544
      }
17545
    }
17546
 
17547
    public Object getFieldValue(_Fields field) {
17548
      switch (field) {
17549
      case SUCCESS:
17550
        return getSuccess();
17551
 
17552
      }
17553
      throw new IllegalStateException();
17554
    }
17555
 
17556
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17557
    public boolean isSet(_Fields field) {
17558
      if (field == null) {
17559
        throw new IllegalArgumentException();
17560
      }
17561
 
17562
      switch (field) {
17563
      case SUCCESS:
17564
        return isSetSuccess();
17565
      }
17566
      throw new IllegalStateException();
17567
    }
17568
 
17569
    @Override
17570
    public boolean equals(Object that) {
17571
      if (that == null)
17572
        return false;
17573
      if (that instanceof getPaymentsRequiringExtraProcessing_result)
17574
        return this.equals((getPaymentsRequiringExtraProcessing_result)that);
17575
      return false;
17576
    }
17577
 
17578
    public boolean equals(getPaymentsRequiringExtraProcessing_result that) {
17579
      if (that == null)
17580
        return false;
17581
 
17582
      boolean this_present_success = true && this.isSetSuccess();
17583
      boolean that_present_success = true && that.isSetSuccess();
17584
      if (this_present_success || that_present_success) {
17585
        if (!(this_present_success && that_present_success))
17586
          return false;
17587
        if (!this.success.equals(that.success))
17588
          return false;
17589
      }
17590
 
17591
      return true;
17592
    }
17593
 
17594
    @Override
17595
    public int hashCode() {
17596
      return 0;
17597
    }
17598
 
17599
    public int compareTo(getPaymentsRequiringExtraProcessing_result other) {
17600
      if (!getClass().equals(other.getClass())) {
17601
        return getClass().getName().compareTo(other.getClass().getName());
17602
      }
17603
 
17604
      int lastComparison = 0;
17605
      getPaymentsRequiringExtraProcessing_result typedOther = (getPaymentsRequiringExtraProcessing_result)other;
17606
 
17607
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17608
      if (lastComparison != 0) {
17609
        return lastComparison;
17610
      }
17611
      if (isSetSuccess()) {
17612
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17613
        if (lastComparison != 0) {
17614
          return lastComparison;
17615
        }
17616
      }
17617
      return 0;
17618
    }
17619
 
17620
    public _Fields fieldForId(int fieldId) {
17621
      return _Fields.findByThriftId(fieldId);
17622
    }
17623
 
17624
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17625
      org.apache.thrift.protocol.TField field;
17626
      iprot.readStructBegin();
17627
      while (true)
17628
      {
17629
        field = iprot.readFieldBegin();
17630
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17631
          break;
17632
        }
17633
        switch (field.id) {
17634
          case 0: // SUCCESS
17635
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17636
              {
4600 varun.gupt 17637
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
17638
                this.success = new ArrayList<Long>(_list40.size);
17639
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
4008 mandeep.dh 17640
                {
4600 varun.gupt 17641
                  long _elem42; // required
17642
                  _elem42 = iprot.readI64();
17643
                  this.success.add(_elem42);
4008 mandeep.dh 17644
                }
17645
                iprot.readListEnd();
17646
              }
17647
            } else { 
17648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17649
            }
17650
            break;
17651
          default:
17652
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17653
        }
17654
        iprot.readFieldEnd();
17655
      }
17656
      iprot.readStructEnd();
17657
      validate();
17658
    }
17659
 
17660
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17661
      oprot.writeStructBegin(STRUCT_DESC);
17662
 
17663
      if (this.isSetSuccess()) {
17664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17665
        {
17666
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
4600 varun.gupt 17667
          for (long _iter43 : this.success)
4008 mandeep.dh 17668
          {
4600 varun.gupt 17669
            oprot.writeI64(_iter43);
4008 mandeep.dh 17670
          }
17671
          oprot.writeListEnd();
17672
        }
17673
        oprot.writeFieldEnd();
17674
      }
17675
      oprot.writeFieldStop();
17676
      oprot.writeStructEnd();
17677
    }
17678
 
17679
    @Override
17680
    public String toString() {
17681
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_result(");
17682
      boolean first = true;
17683
 
17684
      sb.append("success:");
17685
      if (this.success == null) {
17686
        sb.append("null");
17687
      } else {
17688
        sb.append(this.success);
17689
      }
17690
      first = false;
17691
      sb.append(")");
17692
      return sb.toString();
17693
    }
17694
 
17695
    public void validate() throws org.apache.thrift.TException {
17696
      // check for required fields
17697
    }
17698
 
17699
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17700
      try {
17701
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17702
      } catch (org.apache.thrift.TException te) {
17703
        throw new java.io.IOException(te);
17704
      }
17705
    }
17706
 
17707
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17708
      try {
17709
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17710
      } catch (org.apache.thrift.TException te) {
17711
        throw new java.io.IOException(te);
17712
      }
17713
    }
17714
 
17715
  }
17716
 
17717
  public static class markPaymentAsProcessed_args implements org.apache.thrift.TBase<markPaymentAsProcessed_args, markPaymentAsProcessed_args._Fields>, java.io.Serializable, Cloneable   {
17718
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_args");
17719
 
17720
    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);
17721
    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);
17722
 
17723
    private long paymentId; // required
17724
    private ExtraPaymentProcessingType category; // required
17725
 
17726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17727
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17728
      PAYMENT_ID((short)1, "paymentId"),
17729
      /**
17730
       * 
17731
       * @see ExtraPaymentProcessingType
17732
       */
17733
      CATEGORY((short)2, "category");
17734
 
17735
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17736
 
17737
      static {
17738
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17739
          byName.put(field.getFieldName(), field);
17740
        }
17741
      }
17742
 
17743
      /**
17744
       * Find the _Fields constant that matches fieldId, or null if its not found.
17745
       */
17746
      public static _Fields findByThriftId(int fieldId) {
17747
        switch(fieldId) {
17748
          case 1: // PAYMENT_ID
17749
            return PAYMENT_ID;
17750
          case 2: // CATEGORY
17751
            return CATEGORY;
17752
          default:
17753
            return null;
17754
        }
17755
      }
17756
 
17757
      /**
17758
       * Find the _Fields constant that matches fieldId, throwing an exception
17759
       * if it is not found.
17760
       */
17761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17762
        _Fields fields = findByThriftId(fieldId);
17763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17764
        return fields;
17765
      }
17766
 
17767
      /**
17768
       * Find the _Fields constant that matches name, or null if its not found.
17769
       */
17770
      public static _Fields findByName(String name) {
17771
        return byName.get(name);
17772
      }
17773
 
17774
      private final short _thriftId;
17775
      private final String _fieldName;
17776
 
17777
      _Fields(short thriftId, String fieldName) {
17778
        _thriftId = thriftId;
17779
        _fieldName = fieldName;
17780
      }
17781
 
17782
      public short getThriftFieldId() {
17783
        return _thriftId;
17784
      }
17785
 
17786
      public String getFieldName() {
17787
        return _fieldName;
17788
      }
17789
    }
17790
 
17791
    // isset id assignments
17792
    private static final int __PAYMENTID_ISSET_ID = 0;
17793
    private BitSet __isset_bit_vector = new BitSet(1);
17794
 
17795
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17796
    static {
17797
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17798
      tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17799
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17800
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17801
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
17802
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17803
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_args.class, metaDataMap);
17804
    }
17805
 
17806
    public markPaymentAsProcessed_args() {
17807
    }
17808
 
17809
    public markPaymentAsProcessed_args(
17810
      long paymentId,
17811
      ExtraPaymentProcessingType category)
17812
    {
17813
      this();
17814
      this.paymentId = paymentId;
17815
      setPaymentIdIsSet(true);
17816
      this.category = category;
17817
    }
17818
 
17819
    /**
17820
     * Performs a deep copy on <i>other</i>.
17821
     */
17822
    public markPaymentAsProcessed_args(markPaymentAsProcessed_args other) {
17823
      __isset_bit_vector.clear();
17824
      __isset_bit_vector.or(other.__isset_bit_vector);
17825
      this.paymentId = other.paymentId;
17826
      if (other.isSetCategory()) {
17827
        this.category = other.category;
17828
      }
17829
    }
17830
 
17831
    public markPaymentAsProcessed_args deepCopy() {
17832
      return new markPaymentAsProcessed_args(this);
17833
    }
17834
 
17835
    @Override
17836
    public void clear() {
17837
      setPaymentIdIsSet(false);
17838
      this.paymentId = 0;
17839
      this.category = null;
17840
    }
17841
 
17842
    public long getPaymentId() {
17843
      return this.paymentId;
17844
    }
17845
 
17846
    public void setPaymentId(long paymentId) {
17847
      this.paymentId = paymentId;
17848
      setPaymentIdIsSet(true);
17849
    }
17850
 
17851
    public void unsetPaymentId() {
17852
      __isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
17853
    }
17854
 
17855
    /** Returns true if field paymentId is set (has been assigned a value) and false otherwise */
17856
    public boolean isSetPaymentId() {
17857
      return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
17858
    }
17859
 
17860
    public void setPaymentIdIsSet(boolean value) {
17861
      __isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
17862
    }
17863
 
17864
    /**
17865
     * 
17866
     * @see ExtraPaymentProcessingType
17867
     */
17868
    public ExtraPaymentProcessingType getCategory() {
17869
      return this.category;
17870
    }
17871
 
17872
    /**
17873
     * 
17874
     * @see ExtraPaymentProcessingType
17875
     */
17876
    public void setCategory(ExtraPaymentProcessingType category) {
17877
      this.category = category;
17878
    }
17879
 
17880
    public void unsetCategory() {
17881
      this.category = null;
17882
    }
17883
 
17884
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
17885
    public boolean isSetCategory() {
17886
      return this.category != null;
17887
    }
17888
 
17889
    public void setCategoryIsSet(boolean value) {
17890
      if (!value) {
17891
        this.category = null;
17892
      }
17893
    }
17894
 
17895
    public void setFieldValue(_Fields field, Object value) {
17896
      switch (field) {
17897
      case PAYMENT_ID:
17898
        if (value == null) {
17899
          unsetPaymentId();
17900
        } else {
17901
          setPaymentId((Long)value);
17902
        }
17903
        break;
17904
 
17905
      case CATEGORY:
17906
        if (value == null) {
17907
          unsetCategory();
17908
        } else {
17909
          setCategory((ExtraPaymentProcessingType)value);
17910
        }
17911
        break;
17912
 
17913
      }
17914
    }
17915
 
17916
    public Object getFieldValue(_Fields field) {
17917
      switch (field) {
17918
      case PAYMENT_ID:
17919
        return Long.valueOf(getPaymentId());
17920
 
17921
      case CATEGORY:
17922
        return getCategory();
17923
 
17924
      }
17925
      throw new IllegalStateException();
17926
    }
17927
 
17928
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17929
    public boolean isSet(_Fields field) {
17930
      if (field == null) {
17931
        throw new IllegalArgumentException();
17932
      }
17933
 
17934
      switch (field) {
17935
      case PAYMENT_ID:
17936
        return isSetPaymentId();
17937
      case CATEGORY:
17938
        return isSetCategory();
17939
      }
17940
      throw new IllegalStateException();
17941
    }
17942
 
17943
    @Override
17944
    public boolean equals(Object that) {
17945
      if (that == null)
17946
        return false;
17947
      if (that instanceof markPaymentAsProcessed_args)
17948
        return this.equals((markPaymentAsProcessed_args)that);
17949
      return false;
17950
    }
17951
 
17952
    public boolean equals(markPaymentAsProcessed_args that) {
17953
      if (that == null)
17954
        return false;
17955
 
17956
      boolean this_present_paymentId = true;
17957
      boolean that_present_paymentId = true;
17958
      if (this_present_paymentId || that_present_paymentId) {
17959
        if (!(this_present_paymentId && that_present_paymentId))
17960
          return false;
17961
        if (this.paymentId != that.paymentId)
17962
          return false;
17963
      }
17964
 
17965
      boolean this_present_category = true && this.isSetCategory();
17966
      boolean that_present_category = true && that.isSetCategory();
17967
      if (this_present_category || that_present_category) {
17968
        if (!(this_present_category && that_present_category))
17969
          return false;
17970
        if (!this.category.equals(that.category))
17971
          return false;
17972
      }
17973
 
17974
      return true;
17975
    }
17976
 
17977
    @Override
17978
    public int hashCode() {
17979
      return 0;
17980
    }
17981
 
17982
    public int compareTo(markPaymentAsProcessed_args other) {
17983
      if (!getClass().equals(other.getClass())) {
17984
        return getClass().getName().compareTo(other.getClass().getName());
17985
      }
17986
 
17987
      int lastComparison = 0;
17988
      markPaymentAsProcessed_args typedOther = (markPaymentAsProcessed_args)other;
17989
 
17990
      lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(typedOther.isSetPaymentId());
17991
      if (lastComparison != 0) {
17992
        return lastComparison;
17993
      }
17994
      if (isSetPaymentId()) {
17995
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentId, typedOther.paymentId);
17996
        if (lastComparison != 0) {
17997
          return lastComparison;
17998
        }
17999
      }
18000
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
18001
      if (lastComparison != 0) {
18002
        return lastComparison;
18003
      }
18004
      if (isSetCategory()) {
18005
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
18006
        if (lastComparison != 0) {
18007
          return lastComparison;
18008
        }
18009
      }
18010
      return 0;
18011
    }
18012
 
18013
    public _Fields fieldForId(int fieldId) {
18014
      return _Fields.findByThriftId(fieldId);
18015
    }
18016
 
18017
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18018
      org.apache.thrift.protocol.TField field;
18019
      iprot.readStructBegin();
18020
      while (true)
18021
      {
18022
        field = iprot.readFieldBegin();
18023
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18024
          break;
18025
        }
18026
        switch (field.id) {
18027
          case 1: // PAYMENT_ID
18028
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18029
              this.paymentId = iprot.readI64();
18030
              setPaymentIdIsSet(true);
18031
            } else { 
18032
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18033
            }
18034
            break;
18035
          case 2: // CATEGORY
18036
            if (field.type == org.apache.thrift.protocol.TType.I32) {
18037
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
18038
            } else { 
18039
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18040
            }
18041
            break;
18042
          default:
18043
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18044
        }
18045
        iprot.readFieldEnd();
18046
      }
18047
      iprot.readStructEnd();
18048
      validate();
18049
    }
18050
 
18051
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18052
      validate();
18053
 
18054
      oprot.writeStructBegin(STRUCT_DESC);
18055
      oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
18056
      oprot.writeI64(this.paymentId);
18057
      oprot.writeFieldEnd();
18058
      if (this.category != null) {
18059
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
18060
        oprot.writeI32(this.category.getValue());
18061
        oprot.writeFieldEnd();
18062
      }
18063
      oprot.writeFieldStop();
18064
      oprot.writeStructEnd();
18065
    }
18066
 
18067
    @Override
18068
    public String toString() {
18069
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_args(");
18070
      boolean first = true;
18071
 
18072
      sb.append("paymentId:");
18073
      sb.append(this.paymentId);
18074
      first = false;
18075
      if (!first) sb.append(", ");
18076
      sb.append("category:");
18077
      if (this.category == null) {
18078
        sb.append("null");
18079
      } else {
18080
        sb.append(this.category);
18081
      }
18082
      first = false;
18083
      sb.append(")");
18084
      return sb.toString();
18085
    }
18086
 
18087
    public void validate() throws org.apache.thrift.TException {
18088
      // check for required fields
18089
    }
18090
 
18091
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18092
      try {
18093
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18094
      } catch (org.apache.thrift.TException te) {
18095
        throw new java.io.IOException(te);
18096
      }
18097
    }
18098
 
18099
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18100
      try {
18101
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18102
      } catch (org.apache.thrift.TException te) {
18103
        throw new java.io.IOException(te);
18104
      }
18105
    }
18106
 
18107
  }
18108
 
18109
  public static class markPaymentAsProcessed_result implements org.apache.thrift.TBase<markPaymentAsProcessed_result, markPaymentAsProcessed_result._Fields>, java.io.Serializable, Cloneable   {
18110
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_result");
18111
 
18112
 
18113
 
18114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18115
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18116
;
18117
 
18118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18119
 
18120
      static {
18121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18122
          byName.put(field.getFieldName(), field);
18123
        }
18124
      }
18125
 
18126
      /**
18127
       * Find the _Fields constant that matches fieldId, or null if its not found.
18128
       */
18129
      public static _Fields findByThriftId(int fieldId) {
18130
        switch(fieldId) {
18131
          default:
18132
            return null;
18133
        }
18134
      }
18135
 
18136
      /**
18137
       * Find the _Fields constant that matches fieldId, throwing an exception
18138
       * if it is not found.
18139
       */
18140
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18141
        _Fields fields = findByThriftId(fieldId);
18142
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18143
        return fields;
18144
      }
18145
 
18146
      /**
18147
       * Find the _Fields constant that matches name, or null if its not found.
18148
       */
18149
      public static _Fields findByName(String name) {
18150
        return byName.get(name);
18151
      }
18152
 
18153
      private final short _thriftId;
18154
      private final String _fieldName;
18155
 
18156
      _Fields(short thriftId, String fieldName) {
18157
        _thriftId = thriftId;
18158
        _fieldName = fieldName;
18159
      }
18160
 
18161
      public short getThriftFieldId() {
18162
        return _thriftId;
18163
      }
18164
 
18165
      public String getFieldName() {
18166
        return _fieldName;
18167
      }
18168
    }
18169
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18170
    static {
18171
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18172
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18173
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_result.class, metaDataMap);
18174
    }
18175
 
18176
    public markPaymentAsProcessed_result() {
18177
    }
18178
 
18179
    /**
18180
     * Performs a deep copy on <i>other</i>.
18181
     */
18182
    public markPaymentAsProcessed_result(markPaymentAsProcessed_result other) {
18183
    }
18184
 
18185
    public markPaymentAsProcessed_result deepCopy() {
18186
      return new markPaymentAsProcessed_result(this);
18187
    }
18188
 
18189
    @Override
18190
    public void clear() {
18191
    }
18192
 
18193
    public void setFieldValue(_Fields field, Object value) {
18194
      switch (field) {
18195
      }
18196
    }
18197
 
18198
    public Object getFieldValue(_Fields field) {
18199
      switch (field) {
18200
      }
18201
      throw new IllegalStateException();
18202
    }
18203
 
18204
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18205
    public boolean isSet(_Fields field) {
18206
      if (field == null) {
18207
        throw new IllegalArgumentException();
18208
      }
18209
 
18210
      switch (field) {
18211
      }
18212
      throw new IllegalStateException();
18213
    }
18214
 
18215
    @Override
18216
    public boolean equals(Object that) {
18217
      if (that == null)
18218
        return false;
18219
      if (that instanceof markPaymentAsProcessed_result)
18220
        return this.equals((markPaymentAsProcessed_result)that);
18221
      return false;
18222
    }
18223
 
18224
    public boolean equals(markPaymentAsProcessed_result that) {
18225
      if (that == null)
18226
        return false;
18227
 
18228
      return true;
18229
    }
18230
 
18231
    @Override
18232
    public int hashCode() {
18233
      return 0;
18234
    }
18235
 
18236
    public int compareTo(markPaymentAsProcessed_result other) {
18237
      if (!getClass().equals(other.getClass())) {
18238
        return getClass().getName().compareTo(other.getClass().getName());
18239
      }
18240
 
18241
      int lastComparison = 0;
18242
      markPaymentAsProcessed_result typedOther = (markPaymentAsProcessed_result)other;
18243
 
18244
      return 0;
18245
    }
18246
 
18247
    public _Fields fieldForId(int fieldId) {
18248
      return _Fields.findByThriftId(fieldId);
18249
    }
18250
 
18251
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18252
      org.apache.thrift.protocol.TField field;
18253
      iprot.readStructBegin();
18254
      while (true)
18255
      {
18256
        field = iprot.readFieldBegin();
18257
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18258
          break;
18259
        }
18260
        switch (field.id) {
18261
          default:
18262
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18263
        }
18264
        iprot.readFieldEnd();
18265
      }
18266
      iprot.readStructEnd();
18267
      validate();
18268
    }
18269
 
18270
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18271
      oprot.writeStructBegin(STRUCT_DESC);
18272
 
18273
      oprot.writeFieldStop();
18274
      oprot.writeStructEnd();
18275
    }
18276
 
18277
    @Override
18278
    public String toString() {
18279
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_result(");
18280
      boolean first = true;
18281
 
18282
      sb.append(")");
18283
      return sb.toString();
18284
    }
18285
 
18286
    public void validate() throws org.apache.thrift.TException {
18287
      // check for required fields
18288
    }
18289
 
18290
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18291
      try {
18292
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18293
      } catch (org.apache.thrift.TException te) {
18294
        throw new java.io.IOException(te);
18295
      }
18296
    }
18297
 
18298
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18299
      try {
18300
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18301
      } catch (org.apache.thrift.TException te) {
18302
        throw new java.io.IOException(te);
18303
      }
18304
    }
18305
 
18306
  }
18307
 
123 ashish 18308
}