Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
123 ashish 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
123 ashish 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.payments;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
123 ashish 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class PaymentService {
24
 
3374 rajveer 25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
123 ashish 26
 
695 rajveer 27
    /**
28
     * create a new payment and return payment id, throws an exception if gateway is not active
29
     * 
30
     * @param userId
31
     * @param amount
32
     * @param gatewayId
33
     * @param txnId
6050 anupam.sin 34
     * @param isDigital
695 rajveer 35
     */
6050 anupam.sin 36
    public long createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
123 ashish 37
 
695 rajveer 38
    /**
4141 chandransh 39
     * Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.
695 rajveer 40
     * 
41
     * @param userId
42
     * @param fromTime
43
     * @param toTime
44
     * @param status
45
     * @param gatewayId
46
     */
3430 rajveer 47
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 48
 
695 rajveer 49
    /**
4141 chandransh 50
     * Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.
695 rajveer 51
     * 
52
     * @param fromTime
53
     * @param toTime
54
     * @param status
55
     * @param gatewayId
56
     */
3430 rajveer 57
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 58
 
695 rajveer 59
    /**
4141 chandransh 60
     * Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.
695 rajveer 61
     * 
4141 chandransh 62
     * @param fromTime
63
     * @param toTime
64
     * @param gatewayId
65
     */
66
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException;
67
 
68
    /**
69
     * Get the gateway for the given id.
695 rajveer 70
     * 
71
     * @param id
72
     */
3430 rajveer 73
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 74
 
695 rajveer 75
    /**
4600 varun.gupt 76
     * Get all active Payment Gateways
77
     * 
78
     */
79
    public List<PaymentGateway> getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException;
80
 
81
    /**
695 rajveer 82
     * Get a particular payment info
83
     * 
84
     * 
85
     * @param id
86
     */
3430 rajveer 87
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 88
 
695 rajveer 89
    /**
4600 varun.gupt 90
     * Get payments for a transaction. Will raise exception.
695 rajveer 91
     * 
92
     * 
93
     * @param txnId
94
     */
3430 rajveer 95
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
420 ashish 96
 
695 rajveer 97
    /**
7049 anupam.sin 98
     * Get payments for a recharge transaction id. Will raise exception.
99
     * 
100
     * 
101
     * @param txnId
102
     */
103
    public List<Payment> getPaymentForRechargeTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
104
 
105
    /**
4600 varun.gupt 106
     * Get successful payment for a transaction. Will raise exception.
107
     * 
108
     * 
109
     * @param txnId
110
     */
111
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
112
 
113
    /**
695 rajveer 114
     * mark payment successful and store parameters
115
     * 
116
     * 
117
     * @param id
118
     * @param gatewayPaymentId
119
     * @param sessionId
120
     * @param gatewayTxnStatus
121
     * @param description
122
     * @param gatewayTxnId
123
     * @param authCode
124
     * @param referenceCode
125
     * @param errorCode
126
     * @param status
1119 rajveer 127
     * @param gatewayTxnDate
695 rajveer 128
     * @param attributes
129
     */
3430 rajveer 130
    public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws PaymentException, org.apache.thrift.TException;
695 rajveer 131
 
1629 ankur.sing 132
    /**
1731 ankur.sing 133
     * Returns the minimum and maximum amounts among successful payments.
134
     * List contains two double values, first minimum and second maximum amount.
1629 ankur.sing 135
     */
3430 rajveer 136
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException;
1629 ankur.sing 137
 
2462 chandransh 138
    /**
139
     * Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
140
     * In case of any processing error, an exception is raised.
141
     * 
142
     * @param merchantPaymentId
143
     */
3430 rajveer 144
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
2462 chandransh 145
 
2690 chandransh 146
    /**
6050 anupam.sin 147
     * Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
6228 anupam.sin 148
     * In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.
6050 anupam.sin 149
     * 
150
     * @param merchantPaymentId
151
     * @param rechargeOrderId
6228 anupam.sin 152
     * @param phone
6050 anupam.sin 153
     */
6228 anupam.sin 154
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException;
6050 anupam.sin 155
 
156
    /**
3616 chandransh 157
     * Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
158
     * In case of any processing error, an exception is raised.
159
     * 
160
     * @param merchantPaymentId
161
     */
162
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
163
 
164
    /**
2690 chandransh 165
     * Create a refund of the given amount corresponding to the given order to be processed through the same
166
     * payment gateway which processed the payment for the corresponding transaction.
167
     * Returns the id of the newly created Refund.
168
     * 
169
     * @param orderId
170
     * @param merchantTxnId
171
     * @param amount
172
     */
3430 rajveer 173
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
2690 chandransh 174
 
3010 chandransh 175
    /**
176
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
6503 rajveer 177
     * transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
178
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
179
     * thrown with error code 106 in case capture was not possible due to connection
180
     * issue.
3010 chandransh 181
     * 
182
     * @param merchantTxnId
8618 rajveer 183
     * @param isDigital
3010 chandransh 184
     */
8618 rajveer 185
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
3010 chandransh 186
 
3956 chandransh 187
    /**
6503 rajveer 188
     * Refund the payment for the given merchant transaction id. It processes the last payment for the given
189
     * transaction. If refund will be failed nothing will be updated in database.
6486 rajveer 190
     * 
191
     * @param merchantTxnId
192
     * @param amount
193
     * @param isDigital
194
     */
195
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
196
 
197
    /**
3956 chandransh 198
     * Adds the given amount to the captured amount of a COD payment.
199
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
200
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
201
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
202
     * and the corresponding transaction id.
203
     * 
204
     * Returns false if the payment couldn't be captured.
205
     * Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
206
     * 
207
     * @param merchantTxnId
208
     * @param amount
209
     * @param xferBy
210
     * @param xferTxnId
211
     * @param xferDate
212
     */
213
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException;
214
 
4008 mandeep.dh 215
    /**
216
     * Returns the list of payments that require some extra processing and
217
     * which belong to a particular category. This is currently used by CRM
218
     * application.
219
     * 
220
     * @param category
221
     */
222
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
223
 
224
    /**
225
     * Marks a particular payment as processed for a particular cateogory.
226
     * It essentially deletes the payment if it is processed for a particular
227
     * category. This is currently used by CRM application.
228
     * 
229
     * @param paymentId
230
     * @param category
231
     */
232
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
233
 
8914 rajveer 234
    public PaymentStatus getPaymentStatusAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
8907 rajveer 235
 
123 ashish 236
  }
237
 
3430 rajveer 238
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
239
 
6050 anupam.sin 240
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 241
 
242
    public void getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsForUser_call> resultHandler) throws org.apache.thrift.TException;
243
 
244
    public void getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPayments_call> resultHandler) throws org.apache.thrift.TException;
245
 
4141 chandransh 246
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException;
247
 
3430 rajveer 248
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException;
249
 
4600 varun.gupt 250
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException;
251
 
3430 rajveer 252
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPayment_call> resultHandler) throws org.apache.thrift.TException;
253
 
254
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
255
 
7049 anupam.sin 256
    public void getPaymentForRechargeTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForRechargeTxnId_call> resultHandler) throws org.apache.thrift.TException;
257
 
4600 varun.gupt 258
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
259
 
3430 rajveer 260
    public void updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePaymentDetails_call> resultHandler) throws org.apache.thrift.TException;
261
 
262
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
263
 
264
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
265
 
6228 anupam.sin 266
    public void doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.doHdfcPaymentForDigitalOrder_call> resultHandler) throws org.apache.thrift.TException;
6050 anupam.sin 267
 
3616 chandransh 268
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
269
 
3430 rajveer 270
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
271
 
8618 rajveer 272
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 273
 
6486 rajveer 274
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
275
 
3956 chandransh 276
    public void partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.partiallyCapturePayment_call> resultHandler) throws org.apache.thrift.TException;
277
 
4008 mandeep.dh 278
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
279
 
280
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
281
 
8914 rajveer 282
    public void getPaymentStatusAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentStatusAtGateway_call> resultHandler) throws org.apache.thrift.TException;
8907 rajveer 283
 
3430 rajveer 284
  }
285
 
3374 rajveer 286
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 287
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
288
      public Factory() {}
289
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
290
        return new Client(prot);
291
      }
292
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
293
        return new Client(iprot, oprot);
294
      }
295
    }
296
 
297
    public Client(org.apache.thrift.protocol.TProtocol prot)
123 ashish 298
    {
3430 rajveer 299
      super(prot, prot);
123 ashish 300
    }
301
 
3430 rajveer 302
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 303
      super(iprot, oprot);
123 ashish 304
    }
305
 
6050 anupam.sin 306
    public long createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
123 ashish 307
    {
6050 anupam.sin 308
      send_createPayment(userId, amount, gatewayId, txnId, isDigital);
123 ashish 309
      return recv_createPayment();
310
    }
311
 
6050 anupam.sin 312
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws org.apache.thrift.TException
123 ashish 313
    {
314
      createPayment_args args = new createPayment_args();
3430 rajveer 315
      args.setUserId(userId);
316
      args.setAmount(amount);
317
      args.setGatewayId(gatewayId);
318
      args.setTxnId(txnId);
6050 anupam.sin 319
      args.setIsDigital(isDigital);
3430 rajveer 320
      sendBase("createPayment", args);
123 ashish 321
    }
322
 
3430 rajveer 323
    public long recv_createPayment() throws PaymentException, org.apache.thrift.TException
123 ashish 324
    {
325
      createPayment_result result = new createPayment_result();
3430 rajveer 326
      receiveBase(result, "createPayment");
123 ashish 327
      if (result.isSetSuccess()) {
328
        return result.success;
329
      }
330
      if (result.pe != null) {
331
        throw result.pe;
332
      }
3430 rajveer 333
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
123 ashish 334
    }
335
 
3430 rajveer 336
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 337
    {
695 rajveer 338
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 339
      return recv_getPaymentsForUser();
340
    }
341
 
3430 rajveer 342
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 343
    {
344
      getPaymentsForUser_args args = new getPaymentsForUser_args();
3430 rajveer 345
      args.setUserId(userId);
346
      args.setFromTime(fromTime);
347
      args.setToTime(toTime);
348
      args.setStatus(status);
349
      args.setGatewayId(gatewayId);
350
      sendBase("getPaymentsForUser", args);
123 ashish 351
    }
352
 
3430 rajveer 353
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, org.apache.thrift.TException
123 ashish 354
    {
355
      getPaymentsForUser_result result = new getPaymentsForUser_result();
3430 rajveer 356
      receiveBase(result, "getPaymentsForUser");
123 ashish 357
      if (result.isSetSuccess()) {
358
        return result.success;
359
      }
360
      if (result.pe != null) {
361
        throw result.pe;
362
      }
3430 rajveer 363
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
123 ashish 364
    }
365
 
3430 rajveer 366
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 367
    {
695 rajveer 368
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 369
      return recv_getPayments();
370
    }
371
 
3430 rajveer 372
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 373
    {
374
      getPayments_args args = new getPayments_args();
3430 rajveer 375
      args.setFromTime(fromTime);
376
      args.setToTime(toTime);
377
      args.setStatus(status);
378
      args.setGatewayId(gatewayId);
379
      sendBase("getPayments", args);
123 ashish 380
    }
381
 
3430 rajveer 382
    public List<Payment> recv_getPayments() throws PaymentException, org.apache.thrift.TException
123 ashish 383
    {
384
      getPayments_result result = new getPayments_result();
3430 rajveer 385
      receiveBase(result, "getPayments");
123 ashish 386
      if (result.isSetSuccess()) {
387
        return result.success;
388
      }
389
      if (result.pe != null) {
390
        throw result.pe;
391
      }
3430 rajveer 392
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
123 ashish 393
    }
394
 
4141 chandransh 395
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException
396
    {
397
      send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId);
398
      return recv_getPaymentsByCapturedDate();
399
    }
400
 
401
    public void send_getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws org.apache.thrift.TException
402
    {
403
      getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
404
      args.setFromTime(fromTime);
405
      args.setToTime(toTime);
406
      args.setGatewayId(gatewayId);
407
      sendBase("getPaymentsByCapturedDate", args);
408
    }
409
 
410
    public List<Payment> recv_getPaymentsByCapturedDate() throws PaymentException, org.apache.thrift.TException
411
    {
412
      getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
413
      receiveBase(result, "getPaymentsByCapturedDate");
414
      if (result.isSetSuccess()) {
415
        return result.success;
416
      }
417
      if (result.pe != null) {
418
        throw result.pe;
419
      }
420
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");
421
    }
422
 
3430 rajveer 423
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 424
    {
425
      send_getPaymentGateway(id);
426
      return recv_getPaymentGateway();
427
    }
428
 
3430 rajveer 429
    public void send_getPaymentGateway(long id) throws org.apache.thrift.TException
420 ashish 430
    {
431
      getPaymentGateway_args args = new getPaymentGateway_args();
3430 rajveer 432
      args.setId(id);
433
      sendBase("getPaymentGateway", args);
420 ashish 434
    }
435
 
3430 rajveer 436
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, org.apache.thrift.TException
420 ashish 437
    {
438
      getPaymentGateway_result result = new getPaymentGateway_result();
3430 rajveer 439
      receiveBase(result, "getPaymentGateway");
420 ashish 440
      if (result.isSetSuccess()) {
441
        return result.success;
442
      }
443
      if (result.pe != null) {
444
        throw result.pe;
445
      }
3430 rajveer 446
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
420 ashish 447
    }
448
 
4600 varun.gupt 449
    public List<PaymentGateway> getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
450
    {
451
      send_getActivePaymentGateways();
452
      return recv_getActivePaymentGateways();
453
    }
454
 
455
    public void send_getActivePaymentGateways() throws org.apache.thrift.TException
456
    {
457
      getActivePaymentGateways_args args = new getActivePaymentGateways_args();
458
      sendBase("getActivePaymentGateways", args);
459
    }
460
 
461
    public List<PaymentGateway> recv_getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
462
    {
463
      getActivePaymentGateways_result result = new getActivePaymentGateways_result();
464
      receiveBase(result, "getActivePaymentGateways");
465
      if (result.isSetSuccess()) {
466
        return result.success;
467
      }
468
      if (result.pe != null) {
469
        throw result.pe;
470
      }
471
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActivePaymentGateways failed: unknown result");
472
    }
473
 
3430 rajveer 474
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 475
    {
695 rajveer 476
      send_getPayment(id);
477
      return recv_getPayment();
420 ashish 478
    }
479
 
3430 rajveer 480
    public void send_getPayment(long id) throws org.apache.thrift.TException
420 ashish 481
    {
695 rajveer 482
      getPayment_args args = new getPayment_args();
3430 rajveer 483
      args.setId(id);
484
      sendBase("getPayment", args);
420 ashish 485
    }
486
 
3430 rajveer 487
    public Payment recv_getPayment() throws PaymentException, org.apache.thrift.TException
420 ashish 488
    {
695 rajveer 489
      getPayment_result result = new getPayment_result();
3430 rajveer 490
      receiveBase(result, "getPayment");
695 rajveer 491
      if (result.isSetSuccess()) {
492
        return result.success;
493
      }
420 ashish 494
      if (result.pe != null) {
495
        throw result.pe;
496
      }
3430 rajveer 497
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 498
    }
499
 
3430 rajveer 500
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
420 ashish 501
    {
695 rajveer 502
      send_getPaymentForTxnId(txnId);
503
      return recv_getPaymentForTxnId();
420 ashish 504
    }
505
 
3430 rajveer 506
    public void send_getPaymentForTxnId(long txnId) throws org.apache.thrift.TException
420 ashish 507
    {
695 rajveer 508
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
3430 rajveer 509
      args.setTxnId(txnId);
510
      sendBase("getPaymentForTxnId", args);
420 ashish 511
    }
512
 
3430 rajveer 513
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
420 ashish 514
    {
695 rajveer 515
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
3430 rajveer 516
      receiveBase(result, "getPaymentForTxnId");
420 ashish 517
      if (result.isSetSuccess()) {
518
        return result.success;
519
      }
520
      if (result.pe != null) {
521
        throw result.pe;
522
      }
3430 rajveer 523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 524
    }
525
 
7049 anupam.sin 526
    public List<Payment> getPaymentForRechargeTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
527
    {
528
      send_getPaymentForRechargeTxnId(txnId);
529
      return recv_getPaymentForRechargeTxnId();
530
    }
531
 
532
    public void send_getPaymentForRechargeTxnId(long txnId) throws org.apache.thrift.TException
533
    {
534
      getPaymentForRechargeTxnId_args args = new getPaymentForRechargeTxnId_args();
535
      args.setTxnId(txnId);
536
      sendBase("getPaymentForRechargeTxnId", args);
537
    }
538
 
539
    public List<Payment> recv_getPaymentForRechargeTxnId() throws PaymentException, org.apache.thrift.TException
540
    {
541
      getPaymentForRechargeTxnId_result result = new getPaymentForRechargeTxnId_result();
542
      receiveBase(result, "getPaymentForRechargeTxnId");
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.pe != null) {
547
        throw result.pe;
548
      }
549
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForRechargeTxnId failed: unknown result");
550
    }
551
 
4600 varun.gupt 552
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
553
    {
554
      send_getSuccessfulPaymentForTxnId(txnId);
555
      return recv_getSuccessfulPaymentForTxnId();
556
    }
557
 
558
    public void send_getSuccessfulPaymentForTxnId(long txnId) throws org.apache.thrift.TException
559
    {
560
      getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
561
      args.setTxnId(txnId);
562
      sendBase("getSuccessfulPaymentForTxnId", args);
563
    }
564
 
565
    public Payment recv_getSuccessfulPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
566
    {
567
      getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
568
      receiveBase(result, "getSuccessfulPaymentForTxnId");
569
      if (result.isSetSuccess()) {
570
        return result.success;
571
      }
572
      if (result.pe != null) {
573
        throw result.pe;
574
      }
575
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentForTxnId failed: unknown result");
576
    }
577
 
3430 rajveer 578
    public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws PaymentException, org.apache.thrift.TException
420 ashish 579
    {
1119 rajveer 580
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 581
      return recv_updatePaymentDetails();
420 ashish 582
    }
583
 
3430 rajveer 584
    public void send_updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws org.apache.thrift.TException
420 ashish 585
    {
695 rajveer 586
      updatePaymentDetails_args args = new updatePaymentDetails_args();
3430 rajveer 587
      args.setId(id);
588
      args.setGatewayPaymentId(gatewayPaymentId);
589
      args.setSessionId(sessionId);
590
      args.setGatewayTxnStatus(gatewayTxnStatus);
591
      args.setDescription(description);
592
      args.setGatewayTxnId(gatewayTxnId);
593
      args.setAuthCode(authCode);
594
      args.setReferenceCode(referenceCode);
595
      args.setErrorCode(errorCode);
596
      args.setStatus(status);
597
      args.setGatewayTxnDate(gatewayTxnDate);
598
      args.setAttributes(attributes);
599
      sendBase("updatePaymentDetails", args);
420 ashish 600
    }
601
 
3430 rajveer 602
    public boolean recv_updatePaymentDetails() throws PaymentException, org.apache.thrift.TException
420 ashish 603
    {
695 rajveer 604
      updatePaymentDetails_result result = new updatePaymentDetails_result();
3430 rajveer 605
      receiveBase(result, "updatePaymentDetails");
695 rajveer 606
      if (result.isSetSuccess()) {
607
        return result.success;
608
      }
420 ashish 609
      if (result.pe != null) {
610
        throw result.pe;
611
      }
3430 rajveer 612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 613
    }
614
 
3430 rajveer 615
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 616
    {
1731 ankur.sing 617
      send_getSuccessfulPaymentsAmountRange();
618
      return recv_getSuccessfulPaymentsAmountRange();
1629 ankur.sing 619
    }
620
 
3430 rajveer 621
    public void send_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 622
    {
1731 ankur.sing 623
      getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
3430 rajveer 624
      sendBase("getSuccessfulPaymentsAmountRange", args);
1629 ankur.sing 625
    }
626
 
3430 rajveer 627
    public List<Double> recv_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 628
    {
1731 ankur.sing 629
      getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 630
      receiveBase(result, "getSuccessfulPaymentsAmountRange");
1629 ankur.sing 631
      if (result.isSetSuccess()) {
632
        return result.success;
633
      }
3430 rajveer 634
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1629 ankur.sing 635
    }
636
 
3430 rajveer 637
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
2462 chandransh 638
    {
639
      send_initializeHdfcPayment(merchantPaymentId);
640
      return recv_initializeHdfcPayment();
641
    }
642
 
3430 rajveer 643
    public void send_initializeHdfcPayment(long merchantPaymentId) throws org.apache.thrift.TException
2462 chandransh 644
    {
645
      initializeHdfcPayment_args args = new initializeHdfcPayment_args();
3430 rajveer 646
      args.setMerchantPaymentId(merchantPaymentId);
647
      sendBase("initializeHdfcPayment", args);
2462 chandransh 648
    }
649
 
3430 rajveer 650
    public String recv_initializeHdfcPayment() throws PaymentException, org.apache.thrift.TException
2462 chandransh 651
    {
652
      initializeHdfcPayment_result result = new initializeHdfcPayment_result();
3430 rajveer 653
      receiveBase(result, "initializeHdfcPayment");
2462 chandransh 654
      if (result.isSetSuccess()) {
655
        return result.success;
656
      }
657
      if (result.pe != null) {
658
        throw result.pe;
659
      }
3430 rajveer 660
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
2462 chandransh 661
    }
662
 
6228 anupam.sin 663
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException
6050 anupam.sin 664
    {
6228 anupam.sin 665
      send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId, phone);
6050 anupam.sin 666
      return recv_doHdfcPaymentForDigitalOrder();
667
    }
668
 
6228 anupam.sin 669
    public void send_doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws org.apache.thrift.TException
6050 anupam.sin 670
    {
671
      doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
672
      args.setMerchantPaymentId(merchantPaymentId);
673
      args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 674
      args.setPhone(phone);
6050 anupam.sin 675
      sendBase("doHdfcPaymentForDigitalOrder", args);
676
    }
677
 
678
    public String recv_doHdfcPaymentForDigitalOrder() throws PaymentException, org.apache.thrift.TException
679
    {
680
      doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
681
      receiveBase(result, "doHdfcPaymentForDigitalOrder");
682
      if (result.isSetSuccess()) {
683
        return result.success;
684
      }
685
      if (result.pe != null) {
686
        throw result.pe;
687
      }
688
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doHdfcPaymentForDigitalOrder failed: unknown result");
689
    }
690
 
3616 chandransh 691
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
692
    {
693
      send_initializeHdfcEmiPayment(merchantPaymentId);
694
      return recv_initializeHdfcEmiPayment();
695
    }
696
 
697
    public void send_initializeHdfcEmiPayment(long merchantPaymentId) throws org.apache.thrift.TException
698
    {
699
      initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
700
      args.setMerchantPaymentId(merchantPaymentId);
701
      sendBase("initializeHdfcEmiPayment", args);
702
    }
703
 
704
    public String recv_initializeHdfcEmiPayment() throws PaymentException, org.apache.thrift.TException
705
    {
706
      initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
707
      receiveBase(result, "initializeHdfcEmiPayment");
708
      if (result.isSetSuccess()) {
709
        return result.success;
710
      }
711
      if (result.pe != null) {
712
        throw result.pe;
713
      }
714
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
715
    }
716
 
3430 rajveer 717
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
2690 chandransh 718
    {
719
      send_createRefund(orderId, merchantTxnId, amount);
720
      return recv_createRefund();
721
    }
722
 
3430 rajveer 723
    public void send_createRefund(long orderId, long merchantTxnId, double amount) throws org.apache.thrift.TException
2690 chandransh 724
    {
725
      createRefund_args args = new createRefund_args();
3430 rajveer 726
      args.setOrderId(orderId);
727
      args.setMerchantTxnId(merchantTxnId);
728
      args.setAmount(amount);
729
      sendBase("createRefund", args);
2690 chandransh 730
    }
731
 
3430 rajveer 732
    public long recv_createRefund() throws PaymentException, org.apache.thrift.TException
2690 chandransh 733
    {
734
      createRefund_result result = new createRefund_result();
3430 rajveer 735
      receiveBase(result, "createRefund");
2690 chandransh 736
      if (result.isSetSuccess()) {
737
        return result.success;
738
      }
739
      if (result.pe != null) {
740
        throw result.pe;
741
      }
3430 rajveer 742
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
2690 chandransh 743
    }
744
 
8618 rajveer 745
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
3010 chandransh 746
    {
8618 rajveer 747
      send_capturePayment(merchantTxnId, isDigital);
3010 chandransh 748
      return recv_capturePayment();
749
    }
750
 
8618 rajveer 751
    public void send_capturePayment(long merchantTxnId, boolean isDigital) throws org.apache.thrift.TException
3010 chandransh 752
    {
753
      capturePayment_args args = new capturePayment_args();
3430 rajveer 754
      args.setMerchantTxnId(merchantTxnId);
8618 rajveer 755
      args.setIsDigital(isDigital);
3430 rajveer 756
      sendBase("capturePayment", args);
3010 chandransh 757
    }
758
 
3430 rajveer 759
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
3010 chandransh 760
    {
761
      capturePayment_result result = new capturePayment_result();
3430 rajveer 762
      receiveBase(result, "capturePayment");
3010 chandransh 763
      if (result.isSetSuccess()) {
764
        return result.success;
765
      }
766
      if (result.pe != null) {
767
        throw result.pe;
768
      }
3430 rajveer 769
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
3010 chandransh 770
    }
771
 
6486 rajveer 772
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
773
    {
774
      send_refundPayment(merchantTxnId, amount, isDigital);
775
      return recv_refundPayment();
776
    }
777
 
778
    public void send_refundPayment(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
779
    {
780
      refundPayment_args args = new refundPayment_args();
781
      args.setMerchantTxnId(merchantTxnId);
782
      args.setAmount(amount);
783
      args.setIsDigital(isDigital);
784
      sendBase("refundPayment", args);
785
    }
786
 
787
    public boolean recv_refundPayment() throws PaymentException, org.apache.thrift.TException
788
    {
789
      refundPayment_result result = new refundPayment_result();
790
      receiveBase(result, "refundPayment");
791
      if (result.isSetSuccess()) {
792
        return result.success;
793
      }
794
      if (result.pe != null) {
795
        throw result.pe;
796
      }
797
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "refundPayment failed: unknown result");
798
    }
799
 
3956 chandransh 800
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
801
    {
802
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
803
      return recv_partiallyCapturePayment();
804
    }
805
 
806
    public void send_partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws org.apache.thrift.TException
807
    {
808
      partiallyCapturePayment_args args = new partiallyCapturePayment_args();
809
      args.setMerchantTxnId(merchantTxnId);
810
      args.setAmount(amount);
811
      args.setXferBy(xferBy);
812
      args.setXferTxnId(xferTxnId);
813
      args.setXferDate(xferDate);
814
      sendBase("partiallyCapturePayment", args);
815
    }
816
 
817
    public boolean recv_partiallyCapturePayment() throws PaymentException, org.apache.thrift.TException
818
    {
819
      partiallyCapturePayment_result result = new partiallyCapturePayment_result();
820
      receiveBase(result, "partiallyCapturePayment");
821
      if (result.isSetSuccess()) {
822
        return result.success;
823
      }
824
      if (result.pe != null) {
825
        throw result.pe;
826
      }
827
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
828
    }
829
 
4008 mandeep.dh 830
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
831
    {
832
      send_getPaymentsRequiringExtraProcessing(category);
833
      return recv_getPaymentsRequiringExtraProcessing();
834
    }
835
 
836
    public void send_getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
837
    {
838
      getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
839
      args.setCategory(category);
840
      sendBase("getPaymentsRequiringExtraProcessing", args);
841
    }
842
 
843
    public List<Long> recv_getPaymentsRequiringExtraProcessing() throws org.apache.thrift.TException
844
    {
845
      getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
846
      receiveBase(result, "getPaymentsRequiringExtraProcessing");
847
      if (result.isSetSuccess()) {
848
        return result.success;
849
      }
850
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
851
    }
852
 
853
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
854
    {
855
      send_markPaymentAsProcessed(paymentId, category);
856
      recv_markPaymentAsProcessed();
857
    }
858
 
859
    public void send_markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
860
    {
861
      markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
862
      args.setPaymentId(paymentId);
863
      args.setCategory(category);
864
      sendBase("markPaymentAsProcessed", args);
865
    }
866
 
867
    public void recv_markPaymentAsProcessed() throws org.apache.thrift.TException
868
    {
869
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
870
      receiveBase(result, "markPaymentAsProcessed");
871
      return;
872
    }
873
 
8914 rajveer 874
    public PaymentStatus getPaymentStatusAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
8907 rajveer 875
    {
8914 rajveer 876
      send_getPaymentStatusAtGateway(merchantTxnId, amount, isDigital);
877
      return recv_getPaymentStatusAtGateway();
8907 rajveer 878
    }
879
 
8914 rajveer 880
    public void send_getPaymentStatusAtGateway(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
8907 rajveer 881
    {
8914 rajveer 882
      getPaymentStatusAtGateway_args args = new getPaymentStatusAtGateway_args();
8907 rajveer 883
      args.setMerchantTxnId(merchantTxnId);
884
      args.setAmount(amount);
885
      args.setIsDigital(isDigital);
8914 rajveer 886
      sendBase("getPaymentStatusAtGateway", args);
8907 rajveer 887
    }
888
 
8914 rajveer 889
    public PaymentStatus recv_getPaymentStatusAtGateway() throws PaymentException, org.apache.thrift.TException
8907 rajveer 890
    {
8914 rajveer 891
      getPaymentStatusAtGateway_result result = new getPaymentStatusAtGateway_result();
892
      receiveBase(result, "getPaymentStatusAtGateway");
8907 rajveer 893
      if (result.isSetSuccess()) {
894
        return result.success;
895
      }
896
      if (result.pe != null) {
897
        throw result.pe;
898
      }
8914 rajveer 899
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentStatusAtGateway failed: unknown result");
8907 rajveer 900
    }
901
 
123 ashish 902
  }
3430 rajveer 903
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
904
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
905
      private org.apache.thrift.async.TAsyncClientManager clientManager;
906
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
907
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
908
        this.clientManager = clientManager;
909
        this.protocolFactory = protocolFactory;
910
      }
911
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
912
        return new AsyncClient(protocolFactory, clientManager, transport);
913
      }
123 ashish 914
    }
915
 
3430 rajveer 916
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
917
      super(protocolFactory, clientManager, transport);
918
    }
123 ashish 919
 
6050 anupam.sin 920
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<createPayment_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 921
      checkReady();
6050 anupam.sin 922
      createPayment_call method_call = new createPayment_call(userId, amount, gatewayId, txnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 923
      this.___currentMethod = method_call;
924
      ___manager.call(method_call);
925
    }
926
 
927
    public static class createPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
928
      private long userId;
929
      private double amount;
930
      private long gatewayId;
931
      private long txnId;
6050 anupam.sin 932
      private boolean isDigital;
933
      public createPayment_call(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<createPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 934
        super(client, protocolFactory, transport, resultHandler, false);
935
        this.userId = userId;
936
        this.amount = amount;
937
        this.gatewayId = gatewayId;
938
        this.txnId = txnId;
6050 anupam.sin 939
        this.isDigital = isDigital;
123 ashish 940
      }
3430 rajveer 941
 
942
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
943
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
944
        createPayment_args args = new createPayment_args();
945
        args.setUserId(userId);
946
        args.setAmount(amount);
947
        args.setGatewayId(gatewayId);
948
        args.setTxnId(txnId);
6050 anupam.sin 949
        args.setIsDigital(isDigital);
3430 rajveer 950
        args.write(prot);
951
        prot.writeMessageEnd();
952
      }
953
 
954
      public long getResult() throws PaymentException, org.apache.thrift.TException {
955
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
956
          throw new IllegalStateException("Method call not finished!");
957
        }
958
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
959
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
960
        return (new Client(prot)).recv_createPayment();
961
      }
123 ashish 962
    }
963
 
3430 rajveer 964
    public void getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsForUser_call> resultHandler) throws org.apache.thrift.TException {
965
      checkReady();
966
      getPaymentsForUser_call method_call = new getPaymentsForUser_call(userId, fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
967
      this.___currentMethod = method_call;
968
      ___manager.call(method_call);
969
    }
970
 
971
    public static class getPaymentsForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
972
      private long userId;
973
      private long fromTime;
974
      private long toTime;
975
      private PaymentStatus status;
976
      private long gatewayId;
977
      public getPaymentsForUser_call(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsForUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
978
        super(client, protocolFactory, transport, resultHandler, false);
979
        this.userId = userId;
980
        this.fromTime = fromTime;
981
        this.toTime = toTime;
982
        this.status = status;
983
        this.gatewayId = gatewayId;
984
      }
985
 
986
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
987
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
988
        getPaymentsForUser_args args = new getPaymentsForUser_args();
989
        args.setUserId(userId);
990
        args.setFromTime(fromTime);
991
        args.setToTime(toTime);
992
        args.setStatus(status);
993
        args.setGatewayId(gatewayId);
994
        args.write(prot);
995
        prot.writeMessageEnd();
996
      }
997
 
998
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
999
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1000
          throw new IllegalStateException("Method call not finished!");
1001
        }
1002
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1003
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1004
        return (new Client(prot)).recv_getPaymentsForUser();
1005
      }
1006
    }
1007
 
1008
    public void getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPayments_call> resultHandler) throws org.apache.thrift.TException {
1009
      checkReady();
1010
      getPayments_call method_call = new getPayments_call(fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
1011
      this.___currentMethod = method_call;
1012
      ___manager.call(method_call);
1013
    }
1014
 
1015
    public static class getPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
1016
      private long fromTime;
1017
      private long toTime;
1018
      private PaymentStatus status;
1019
      private long gatewayId;
1020
      public getPayments_call(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPayments_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1021
        super(client, protocolFactory, transport, resultHandler, false);
1022
        this.fromTime = fromTime;
1023
        this.toTime = toTime;
1024
        this.status = status;
1025
        this.gatewayId = gatewayId;
1026
      }
1027
 
1028
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1029
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
1030
        getPayments_args args = new getPayments_args();
1031
        args.setFromTime(fromTime);
1032
        args.setToTime(toTime);
1033
        args.setStatus(status);
1034
        args.setGatewayId(gatewayId);
1035
        args.write(prot);
1036
        prot.writeMessageEnd();
1037
      }
1038
 
1039
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1040
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1041
          throw new IllegalStateException("Method call not finished!");
1042
        }
1043
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1044
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1045
        return (new Client(prot)).recv_getPayments();
1046
      }
1047
    }
1048
 
4141 chandransh 1049
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException {
1050
      checkReady();
1051
      getPaymentsByCapturedDate_call method_call = new getPaymentsByCapturedDate_call(fromTime, toTime, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
1052
      this.___currentMethod = method_call;
1053
      ___manager.call(method_call);
1054
    }
1055
 
1056
    public static class getPaymentsByCapturedDate_call extends org.apache.thrift.async.TAsyncMethodCall {
1057
      private long fromTime;
1058
      private long toTime;
1059
      private long gatewayId;
1060
      public getPaymentsByCapturedDate_call(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1061
        super(client, protocolFactory, transport, resultHandler, false);
1062
        this.fromTime = fromTime;
1063
        this.toTime = toTime;
1064
        this.gatewayId = gatewayId;
1065
      }
1066
 
1067
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1068
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsByCapturedDate", org.apache.thrift.protocol.TMessageType.CALL, 0));
1069
        getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
1070
        args.setFromTime(fromTime);
1071
        args.setToTime(toTime);
1072
        args.setGatewayId(gatewayId);
1073
        args.write(prot);
1074
        prot.writeMessageEnd();
1075
      }
1076
 
1077
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1078
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1079
          throw new IllegalStateException("Method call not finished!");
1080
        }
1081
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1082
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1083
        return (new Client(prot)).recv_getPaymentsByCapturedDate();
1084
      }
1085
    }
1086
 
3430 rajveer 1087
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException {
1088
      checkReady();
1089
      getPaymentGateway_call method_call = new getPaymentGateway_call(id, resultHandler, this, ___protocolFactory, ___transport);
1090
      this.___currentMethod = method_call;
1091
      ___manager.call(method_call);
1092
    }
1093
 
1094
    public static class getPaymentGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
1095
      private long id;
1096
      public getPaymentGateway_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPaymentGateway_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1097
        super(client, protocolFactory, transport, resultHandler, false);
1098
        this.id = id;
1099
      }
1100
 
1101
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1102
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
1103
        getPaymentGateway_args args = new getPaymentGateway_args();
1104
        args.setId(id);
1105
        args.write(prot);
1106
        prot.writeMessageEnd();
1107
      }
1108
 
1109
      public PaymentGateway getResult() throws PaymentException, org.apache.thrift.TException {
1110
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1111
          throw new IllegalStateException("Method call not finished!");
1112
        }
1113
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1114
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1115
        return (new Client(prot)).recv_getPaymentGateway();
1116
      }
1117
    }
1118
 
4600 varun.gupt 1119
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException {
1120
      checkReady();
1121
      getActivePaymentGateways_call method_call = new getActivePaymentGateways_call(resultHandler, this, ___protocolFactory, ___transport);
1122
      this.___currentMethod = method_call;
1123
      ___manager.call(method_call);
1124
    }
1125
 
1126
    public static class getActivePaymentGateways_call extends org.apache.thrift.async.TAsyncMethodCall {
1127
      public getActivePaymentGateways_call(org.apache.thrift.async.AsyncMethodCallback<getActivePaymentGateways_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1128
        super(client, protocolFactory, transport, resultHandler, false);
1129
      }
1130
 
1131
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1132
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActivePaymentGateways", org.apache.thrift.protocol.TMessageType.CALL, 0));
1133
        getActivePaymentGateways_args args = new getActivePaymentGateways_args();
1134
        args.write(prot);
1135
        prot.writeMessageEnd();
1136
      }
1137
 
1138
      public List<PaymentGateway> getResult() throws PaymentException, org.apache.thrift.TException {
1139
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1140
          throw new IllegalStateException("Method call not finished!");
1141
        }
1142
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1143
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1144
        return (new Client(prot)).recv_getActivePaymentGateways();
1145
      }
1146
    }
1147
 
3430 rajveer 1148
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<getPayment_call> resultHandler) throws org.apache.thrift.TException {
1149
      checkReady();
1150
      getPayment_call method_call = new getPayment_call(id, resultHandler, this, ___protocolFactory, ___transport);
1151
      this.___currentMethod = method_call;
1152
      ___manager.call(method_call);
1153
    }
1154
 
1155
    public static class getPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1156
      private long id;
1157
      public getPayment_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1158
        super(client, protocolFactory, transport, resultHandler, false);
1159
        this.id = id;
1160
      }
1161
 
1162
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1163
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1164
        getPayment_args args = new getPayment_args();
1165
        args.setId(id);
1166
        args.write(prot);
1167
        prot.writeMessageEnd();
1168
      }
1169
 
1170
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1171
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1172
          throw new IllegalStateException("Method call not finished!");
1173
        }
1174
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1175
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1176
        return (new Client(prot)).recv_getPayment();
1177
      }
1178
    }
1179
 
1180
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1181
      checkReady();
1182
      getPaymentForTxnId_call method_call = new getPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1183
      this.___currentMethod = method_call;
1184
      ___manager.call(method_call);
1185
    }
1186
 
1187
    public static class getPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1188
      private long txnId;
1189
      public getPaymentForTxnId_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForTxnId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1190
        super(client, protocolFactory, transport, resultHandler, false);
1191
        this.txnId = txnId;
1192
      }
1193
 
1194
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1195
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1196
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
1197
        args.setTxnId(txnId);
1198
        args.write(prot);
1199
        prot.writeMessageEnd();
1200
      }
1201
 
1202
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1203
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1204
          throw new IllegalStateException("Method call not finished!");
1205
        }
1206
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1207
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1208
        return (new Client(prot)).recv_getPaymentForTxnId();
1209
      }
1210
    }
1211
 
7049 anupam.sin 1212
    public void getPaymentForRechargeTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForRechargeTxnId_call> resultHandler) throws org.apache.thrift.TException {
1213
      checkReady();
1214
      getPaymentForRechargeTxnId_call method_call = new getPaymentForRechargeTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1215
      this.___currentMethod = method_call;
1216
      ___manager.call(method_call);
1217
    }
1218
 
1219
    public static class getPaymentForRechargeTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1220
      private long txnId;
1221
      public getPaymentForRechargeTxnId_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForRechargeTxnId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1222
        super(client, protocolFactory, transport, resultHandler, false);
1223
        this.txnId = txnId;
1224
      }
1225
 
1226
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1227
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForRechargeTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1228
        getPaymentForRechargeTxnId_args args = new getPaymentForRechargeTxnId_args();
1229
        args.setTxnId(txnId);
1230
        args.write(prot);
1231
        prot.writeMessageEnd();
1232
      }
1233
 
1234
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1235
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1236
          throw new IllegalStateException("Method call not finished!");
1237
        }
1238
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1239
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1240
        return (new Client(prot)).recv_getPaymentForRechargeTxnId();
1241
      }
1242
    }
1243
 
4600 varun.gupt 1244
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1245
      checkReady();
1246
      getSuccessfulPaymentForTxnId_call method_call = new getSuccessfulPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1247
      this.___currentMethod = method_call;
1248
      ___manager.call(method_call);
1249
    }
1250
 
1251
    public static class getSuccessfulPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1252
      private long txnId;
1253
      public getSuccessfulPaymentForTxnId_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentForTxnId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1254
        super(client, protocolFactory, transport, resultHandler, false);
1255
        this.txnId = txnId;
1256
      }
1257
 
1258
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1259
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1260
        getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
1261
        args.setTxnId(txnId);
1262
        args.write(prot);
1263
        prot.writeMessageEnd();
1264
      }
1265
 
1266
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1267
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1268
          throw new IllegalStateException("Method call not finished!");
1269
        }
1270
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1271
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1272
        return (new Client(prot)).recv_getSuccessfulPaymentForTxnId();
1273
      }
1274
    }
1275
 
3430 rajveer 1276
    public void updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes, org.apache.thrift.async.AsyncMethodCallback<updatePaymentDetails_call> resultHandler) throws org.apache.thrift.TException {
1277
      checkReady();
1278
      updatePaymentDetails_call method_call = new updatePaymentDetails_call(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes, resultHandler, this, ___protocolFactory, ___transport);
1279
      this.___currentMethod = method_call;
1280
      ___manager.call(method_call);
1281
    }
1282
 
1283
    public static class updatePaymentDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
1284
      private long id;
1285
      private String gatewayPaymentId;
1286
      private String sessionId;
1287
      private String gatewayTxnStatus;
1288
      private String description;
1289
      private String gatewayTxnId;
1290
      private String authCode;
1291
      private String referenceCode;
1292
      private String errorCode;
1293
      private PaymentStatus status;
1294
      private String gatewayTxnDate;
1295
      private List<Attribute> attributes;
1296
      public updatePaymentDetails_call(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes, org.apache.thrift.async.AsyncMethodCallback<updatePaymentDetails_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1297
        super(client, protocolFactory, transport, resultHandler, false);
1298
        this.id = id;
1299
        this.gatewayPaymentId = gatewayPaymentId;
1300
        this.sessionId = sessionId;
1301
        this.gatewayTxnStatus = gatewayTxnStatus;
1302
        this.description = description;
1303
        this.gatewayTxnId = gatewayTxnId;
1304
        this.authCode = authCode;
1305
        this.referenceCode = referenceCode;
1306
        this.errorCode = errorCode;
1307
        this.status = status;
1308
        this.gatewayTxnDate = gatewayTxnDate;
1309
        this.attributes = attributes;
1310
      }
1311
 
1312
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1313
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePaymentDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
1314
        updatePaymentDetails_args args = new updatePaymentDetails_args();
1315
        args.setId(id);
1316
        args.setGatewayPaymentId(gatewayPaymentId);
1317
        args.setSessionId(sessionId);
1318
        args.setGatewayTxnStatus(gatewayTxnStatus);
1319
        args.setDescription(description);
1320
        args.setGatewayTxnId(gatewayTxnId);
1321
        args.setAuthCode(authCode);
1322
        args.setReferenceCode(referenceCode);
1323
        args.setErrorCode(errorCode);
1324
        args.setStatus(status);
1325
        args.setGatewayTxnDate(gatewayTxnDate);
1326
        args.setAttributes(attributes);
1327
        args.write(prot);
1328
        prot.writeMessageEnd();
1329
      }
1330
 
1331
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1332
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1333
          throw new IllegalStateException("Method call not finished!");
1334
        }
1335
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1336
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1337
        return (new Client(prot)).recv_updatePaymentDetails();
1338
      }
1339
    }
1340
 
1341
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException {
1342
      checkReady();
1343
      getSuccessfulPaymentsAmountRange_call method_call = new getSuccessfulPaymentsAmountRange_call(resultHandler, this, ___protocolFactory, ___transport);
1344
      this.___currentMethod = method_call;
1345
      ___manager.call(method_call);
1346
    }
1347
 
1348
    public static class getSuccessfulPaymentsAmountRange_call extends org.apache.thrift.async.TAsyncMethodCall {
1349
      public getSuccessfulPaymentsAmountRange_call(org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentsAmountRange_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
      }
1352
 
1353
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1354
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentsAmountRange", org.apache.thrift.protocol.TMessageType.CALL, 0));
1355
        getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1356
        args.write(prot);
1357
        prot.writeMessageEnd();
1358
      }
1359
 
1360
      public List<Double> getResult() throws org.apache.thrift.TException {
1361
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1362
          throw new IllegalStateException("Method call not finished!");
1363
        }
1364
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1365
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1366
        return (new Client(prot)).recv_getSuccessfulPaymentsAmountRange();
1367
      }
1368
    }
1369
 
1370
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException {
1371
      checkReady();
1372
      initializeHdfcPayment_call method_call = new initializeHdfcPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1373
      this.___currentMethod = method_call;
1374
      ___manager.call(method_call);
1375
    }
1376
 
1377
    public static class initializeHdfcPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1378
      private long merchantPaymentId;
1379
      public initializeHdfcPayment_call(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1380
        super(client, protocolFactory, transport, resultHandler, false);
1381
        this.merchantPaymentId = merchantPaymentId;
1382
      }
1383
 
1384
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1385
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1386
        initializeHdfcPayment_args args = new initializeHdfcPayment_args();
1387
        args.setMerchantPaymentId(merchantPaymentId);
1388
        args.write(prot);
1389
        prot.writeMessageEnd();
1390
      }
1391
 
1392
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1393
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1394
          throw new IllegalStateException("Method call not finished!");
1395
        }
1396
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1397
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1398
        return (new Client(prot)).recv_initializeHdfcPayment();
1399
      }
1400
    }
1401
 
6228 anupam.sin 1402
    public void doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<doHdfcPaymentForDigitalOrder_call> resultHandler) throws org.apache.thrift.TException {
6050 anupam.sin 1403
      checkReady();
6228 anupam.sin 1404
      doHdfcPaymentForDigitalOrder_call method_call = new doHdfcPaymentForDigitalOrder_call(merchantPaymentId, rechargeOrderId, phone, resultHandler, this, ___protocolFactory, ___transport);
6050 anupam.sin 1405
      this.___currentMethod = method_call;
1406
      ___manager.call(method_call);
1407
    }
1408
 
1409
    public static class doHdfcPaymentForDigitalOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1410
      private long merchantPaymentId;
1411
      private long rechargeOrderId;
6228 anupam.sin 1412
      private String phone;
1413
      public doHdfcPaymentForDigitalOrder_call(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<doHdfcPaymentForDigitalOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
6050 anupam.sin 1414
        super(client, protocolFactory, transport, resultHandler, false);
1415
        this.merchantPaymentId = merchantPaymentId;
1416
        this.rechargeOrderId = rechargeOrderId;
6228 anupam.sin 1417
        this.phone = phone;
6050 anupam.sin 1418
      }
1419
 
1420
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1421
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doHdfcPaymentForDigitalOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1422
        doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
1423
        args.setMerchantPaymentId(merchantPaymentId);
1424
        args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 1425
        args.setPhone(phone);
6050 anupam.sin 1426
        args.write(prot);
1427
        prot.writeMessageEnd();
1428
      }
1429
 
1430
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1431
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1432
          throw new IllegalStateException("Method call not finished!");
1433
        }
1434
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1435
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1436
        return (new Client(prot)).recv_doHdfcPaymentForDigitalOrder();
1437
      }
1438
    }
1439
 
3616 chandransh 1440
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException {
1441
      checkReady();
1442
      initializeHdfcEmiPayment_call method_call = new initializeHdfcEmiPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1443
      this.___currentMethod = method_call;
1444
      ___manager.call(method_call);
1445
    }
1446
 
1447
    public static class initializeHdfcEmiPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1448
      private long merchantPaymentId;
1449
      public initializeHdfcEmiPayment_call(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1450
        super(client, protocolFactory, transport, resultHandler, false);
1451
        this.merchantPaymentId = merchantPaymentId;
1452
      }
1453
 
1454
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1455
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcEmiPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1456
        initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
1457
        args.setMerchantPaymentId(merchantPaymentId);
1458
        args.write(prot);
1459
        prot.writeMessageEnd();
1460
      }
1461
 
1462
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1463
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1464
          throw new IllegalStateException("Method call not finished!");
1465
        }
1466
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1467
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1468
        return (new Client(prot)).recv_initializeHdfcEmiPayment();
1469
      }
1470
    }
1471
 
3430 rajveer 1472
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
1473
      checkReady();
1474
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
1475
      this.___currentMethod = method_call;
1476
      ___manager.call(method_call);
1477
    }
1478
 
1479
    public static class createRefund_call extends org.apache.thrift.async.TAsyncMethodCall {
1480
      private long orderId;
1481
      private long merchantTxnId;
1482
      private double amount;
1483
      public createRefund_call(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.orderId = orderId;
1486
        this.merchantTxnId = merchantTxnId;
1487
        this.amount = amount;
1488
      }
1489
 
1490
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1491
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRefund", org.apache.thrift.protocol.TMessageType.CALL, 0));
1492
        createRefund_args args = new createRefund_args();
1493
        args.setOrderId(orderId);
1494
        args.setMerchantTxnId(merchantTxnId);
1495
        args.setAmount(amount);
1496
        args.write(prot);
1497
        prot.writeMessageEnd();
1498
      }
1499
 
1500
      public long getResult() throws PaymentException, org.apache.thrift.TException {
1501
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1502
          throw new IllegalStateException("Method call not finished!");
1503
        }
1504
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1505
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1506
        return (new Client(prot)).recv_createRefund();
1507
      }
1508
    }
1509
 
8618 rajveer 1510
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1511
      checkReady();
8618 rajveer 1512
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1513
      this.___currentMethod = method_call;
1514
      ___manager.call(method_call);
1515
    }
1516
 
1517
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1518
      private long merchantTxnId;
8618 rajveer 1519
      private boolean isDigital;
1520
      public capturePayment_call(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 1521
        super(client, protocolFactory, transport, resultHandler, false);
1522
        this.merchantTxnId = merchantTxnId;
8618 rajveer 1523
        this.isDigital = isDigital;
3430 rajveer 1524
      }
1525
 
1526
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1527
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1528
        capturePayment_args args = new capturePayment_args();
1529
        args.setMerchantTxnId(merchantTxnId);
8618 rajveer 1530
        args.setIsDigital(isDigital);
3430 rajveer 1531
        args.write(prot);
1532
        prot.writeMessageEnd();
1533
      }
1534
 
1535
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1536
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1537
          throw new IllegalStateException("Method call not finished!");
1538
        }
1539
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1540
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1541
        return (new Client(prot)).recv_capturePayment();
1542
      }
1543
    }
1544
 
6486 rajveer 1545
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_call> resultHandler) throws org.apache.thrift.TException {
1546
      checkReady();
1547
      refundPayment_call method_call = new refundPayment_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1548
      this.___currentMethod = method_call;
1549
      ___manager.call(method_call);
1550
    }
1551
 
1552
    public static class refundPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1553
      private long merchantTxnId;
1554
      private double amount;
1555
      private boolean isDigital;
1556
      public refundPayment_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1557
        super(client, protocolFactory, transport, resultHandler, false);
1558
        this.merchantTxnId = merchantTxnId;
1559
        this.amount = amount;
1560
        this.isDigital = isDigital;
1561
      }
1562
 
1563
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1564
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("refundPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1565
        refundPayment_args args = new refundPayment_args();
1566
        args.setMerchantTxnId(merchantTxnId);
1567
        args.setAmount(amount);
1568
        args.setIsDigital(isDigital);
1569
        args.write(prot);
1570
        prot.writeMessageEnd();
1571
      }
1572
 
1573
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1574
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1575
          throw new IllegalStateException("Method call not finished!");
1576
        }
1577
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1578
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1579
        return (new Client(prot)).recv_refundPayment();
1580
      }
1581
    }
1582
 
3956 chandransh 1583
    public void partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<partiallyCapturePayment_call> resultHandler) throws org.apache.thrift.TException {
1584
      checkReady();
1585
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1586
      this.___currentMethod = method_call;
1587
      ___manager.call(method_call);
1588
    }
1589
 
1590
    public static class partiallyCapturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1591
      private long merchantTxnId;
1592
      private double amount;
1593
      private String xferBy;
1594
      private String xferTxnId;
1595
      private long xferDate;
1596
      public partiallyCapturePayment_call(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<partiallyCapturePayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1597
        super(client, protocolFactory, transport, resultHandler, false);
1598
        this.merchantTxnId = merchantTxnId;
1599
        this.amount = amount;
1600
        this.xferBy = xferBy;
1601
        this.xferTxnId = xferTxnId;
1602
        this.xferDate = xferDate;
1603
      }
1604
 
1605
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1606
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partiallyCapturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1607
        partiallyCapturePayment_args args = new partiallyCapturePayment_args();
1608
        args.setMerchantTxnId(merchantTxnId);
1609
        args.setAmount(amount);
1610
        args.setXferBy(xferBy);
1611
        args.setXferTxnId(xferTxnId);
1612
        args.setXferDate(xferDate);
1613
        args.write(prot);
1614
        prot.writeMessageEnd();
1615
      }
1616
 
1617
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1618
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1619
          throw new IllegalStateException("Method call not finished!");
1620
        }
1621
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1622
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1623
        return (new Client(prot)).recv_partiallyCapturePayment();
1624
      }
1625
    }
1626
 
4008 mandeep.dh 1627
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException {
1628
      checkReady();
1629
      getPaymentsRequiringExtraProcessing_call method_call = new getPaymentsRequiringExtraProcessing_call(category, resultHandler, this, ___protocolFactory, ___transport);
1630
      this.___currentMethod = method_call;
1631
      ___manager.call(method_call);
1632
    }
1633
 
1634
    public static class getPaymentsRequiringExtraProcessing_call extends org.apache.thrift.async.TAsyncMethodCall {
1635
      private ExtraPaymentProcessingType category;
1636
      public getPaymentsRequiringExtraProcessing_call(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1637
        super(client, protocolFactory, transport, resultHandler, false);
1638
        this.category = category;
1639
      }
1640
 
1641
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1642
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsRequiringExtraProcessing", org.apache.thrift.protocol.TMessageType.CALL, 0));
1643
        getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
1644
        args.setCategory(category);
1645
        args.write(prot);
1646
        prot.writeMessageEnd();
1647
      }
1648
 
1649
      public List<Long> getResult() throws org.apache.thrift.TException {
1650
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1651
          throw new IllegalStateException("Method call not finished!");
1652
        }
1653
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1654
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1655
        return (new Client(prot)).recv_getPaymentsRequiringExtraProcessing();
1656
      }
1657
    }
1658
 
1659
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException {
1660
      checkReady();
1661
      markPaymentAsProcessed_call method_call = new markPaymentAsProcessed_call(paymentId, category, resultHandler, this, ___protocolFactory, ___transport);
1662
      this.___currentMethod = method_call;
1663
      ___manager.call(method_call);
1664
    }
1665
 
1666
    public static class markPaymentAsProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
1667
      private long paymentId;
1668
      private ExtraPaymentProcessingType category;
1669
      public markPaymentAsProcessed_call(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1670
        super(client, protocolFactory, transport, resultHandler, false);
1671
        this.paymentId = paymentId;
1672
        this.category = category;
1673
      }
1674
 
1675
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1676
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPaymentAsProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
1677
        markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
1678
        args.setPaymentId(paymentId);
1679
        args.setCategory(category);
1680
        args.write(prot);
1681
        prot.writeMessageEnd();
1682
      }
1683
 
1684
      public void getResult() throws org.apache.thrift.TException {
1685
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1686
          throw new IllegalStateException("Method call not finished!");
1687
        }
1688
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1689
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1690
        (new Client(prot)).recv_markPaymentAsProcessed();
1691
      }
1692
    }
1693
 
8914 rajveer 1694
    public void getPaymentStatusAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<getPaymentStatusAtGateway_call> resultHandler) throws org.apache.thrift.TException {
8907 rajveer 1695
      checkReady();
8914 rajveer 1696
      getPaymentStatusAtGateway_call method_call = new getPaymentStatusAtGateway_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
8907 rajveer 1697
      this.___currentMethod = method_call;
1698
      ___manager.call(method_call);
1699
    }
1700
 
8914 rajveer 1701
    public static class getPaymentStatusAtGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
8907 rajveer 1702
      private long merchantTxnId;
1703
      private double amount;
1704
      private boolean isDigital;
8914 rajveer 1705
      public getPaymentStatusAtGateway_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<getPaymentStatusAtGateway_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 {
8907 rajveer 1706
        super(client, protocolFactory, transport, resultHandler, false);
1707
        this.merchantTxnId = merchantTxnId;
1708
        this.amount = amount;
1709
        this.isDigital = isDigital;
1710
      }
1711
 
1712
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
8914 rajveer 1713
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentStatusAtGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
1714
        getPaymentStatusAtGateway_args args = new getPaymentStatusAtGateway_args();
8907 rajveer 1715
        args.setMerchantTxnId(merchantTxnId);
1716
        args.setAmount(amount);
1717
        args.setIsDigital(isDigital);
1718
        args.write(prot);
1719
        prot.writeMessageEnd();
1720
      }
1721
 
8914 rajveer 1722
      public PaymentStatus getResult() throws PaymentException, org.apache.thrift.TException {
8907 rajveer 1723
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1724
          throw new IllegalStateException("Method call not finished!");
1725
        }
1726
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1727
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
8914 rajveer 1728
        return (new Client(prot)).recv_getPaymentStatusAtGateway();
8907 rajveer 1729
      }
1730
    }
1731
 
3430 rajveer 1732
  }
1733
 
1734
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1735
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1736
    public Processor(I iface) {
1737
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1738
    }
1739
 
1740
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1741
      super(iface, getProcessMap(processMap));
1742
    }
1743
 
1744
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1745
      processMap.put("createPayment", new createPayment());
1746
      processMap.put("getPaymentsForUser", new getPaymentsForUser());
1747
      processMap.put("getPayments", new getPayments());
4141 chandransh 1748
      processMap.put("getPaymentsByCapturedDate", new getPaymentsByCapturedDate());
3430 rajveer 1749
      processMap.put("getPaymentGateway", new getPaymentGateway());
4600 varun.gupt 1750
      processMap.put("getActivePaymentGateways", new getActivePaymentGateways());
3430 rajveer 1751
      processMap.put("getPayment", new getPayment());
1752
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
7049 anupam.sin 1753
      processMap.put("getPaymentForRechargeTxnId", new getPaymentForRechargeTxnId());
4600 varun.gupt 1754
      processMap.put("getSuccessfulPaymentForTxnId", new getSuccessfulPaymentForTxnId());
3430 rajveer 1755
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
1756
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1757
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
6050 anupam.sin 1758
      processMap.put("doHdfcPaymentForDigitalOrder", new doHdfcPaymentForDigitalOrder());
3616 chandransh 1759
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
3430 rajveer 1760
      processMap.put("createRefund", new createRefund());
1761
      processMap.put("capturePayment", new capturePayment());
6486 rajveer 1762
      processMap.put("refundPayment", new refundPayment());
3956 chandransh 1763
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
4008 mandeep.dh 1764
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1765
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
8914 rajveer 1766
      processMap.put("getPaymentStatusAtGateway", new getPaymentStatusAtGateway());
3430 rajveer 1767
      return processMap;
1768
    }
1769
 
1770
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1771
      public createPayment() {
1772
        super("createPayment");
1773
      }
1774
 
1775
      protected createPayment_args getEmptyArgsInstance() {
1776
        return new createPayment_args();
1777
      }
1778
 
1779
      protected createPayment_result getResult(I iface, createPayment_args args) throws org.apache.thrift.TException {
123 ashish 1780
        createPayment_result result = new createPayment_result();
1781
        try {
6050 anupam.sin 1782
          result.success = iface.createPayment(args.userId, args.amount, args.gatewayId, args.txnId, args.isDigital);
420 ashish 1783
          result.setSuccessIsSet(true);
123 ashish 1784
        } catch (PaymentException pe) {
1785
          result.pe = pe;
1786
        }
3430 rajveer 1787
        return result;
123 ashish 1788
      }
1789
    }
1790
 
3430 rajveer 1791
    private static class getPaymentsForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsForUser_args> {
1792
      public getPaymentsForUser() {
1793
        super("getPaymentsForUser");
1794
      }
1795
 
1796
      protected getPaymentsForUser_args getEmptyArgsInstance() {
1797
        return new getPaymentsForUser_args();
1798
      }
1799
 
1800
      protected getPaymentsForUser_result getResult(I iface, getPaymentsForUser_args args) throws org.apache.thrift.TException {
123 ashish 1801
        getPaymentsForUser_result result = new getPaymentsForUser_result();
1802
        try {
3430 rajveer 1803
          result.success = iface.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1804
        } catch (PaymentException pe) {
1805
          result.pe = pe;
1806
        }
3430 rajveer 1807
        return result;
123 ashish 1808
      }
1809
    }
1810
 
3430 rajveer 1811
    private static class getPayments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayments_args> {
1812
      public getPayments() {
1813
        super("getPayments");
1814
      }
1815
 
1816
      protected getPayments_args getEmptyArgsInstance() {
1817
        return new getPayments_args();
1818
      }
1819
 
1820
      protected getPayments_result getResult(I iface, getPayments_args args) throws org.apache.thrift.TException {
123 ashish 1821
        getPayments_result result = new getPayments_result();
1822
        try {
3430 rajveer 1823
          result.success = iface.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1824
        } catch (PaymentException pe) {
1825
          result.pe = pe;
1826
        }
3430 rajveer 1827
        return result;
123 ashish 1828
      }
1829
    }
1830
 
4141 chandransh 1831
    private static class getPaymentsByCapturedDate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsByCapturedDate_args> {
1832
      public getPaymentsByCapturedDate() {
1833
        super("getPaymentsByCapturedDate");
1834
      }
1835
 
1836
      protected getPaymentsByCapturedDate_args getEmptyArgsInstance() {
1837
        return new getPaymentsByCapturedDate_args();
1838
      }
1839
 
1840
      protected getPaymentsByCapturedDate_result getResult(I iface, getPaymentsByCapturedDate_args args) throws org.apache.thrift.TException {
1841
        getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
1842
        try {
1843
          result.success = iface.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId);
1844
        } catch (PaymentException pe) {
1845
          result.pe = pe;
1846
        }
1847
        return result;
1848
      }
1849
    }
1850
 
3430 rajveer 1851
    private static class getPaymentGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentGateway_args> {
1852
      public getPaymentGateway() {
1853
        super("getPaymentGateway");
1854
      }
1855
 
1856
      protected getPaymentGateway_args getEmptyArgsInstance() {
1857
        return new getPaymentGateway_args();
1858
      }
1859
 
1860
      protected getPaymentGateway_result getResult(I iface, getPaymentGateway_args args) throws org.apache.thrift.TException {
420 ashish 1861
        getPaymentGateway_result result = new getPaymentGateway_result();
1862
        try {
3430 rajveer 1863
          result.success = iface.getPaymentGateway(args.id);
420 ashish 1864
        } catch (PaymentException pe) {
1865
          result.pe = pe;
1866
        }
3430 rajveer 1867
        return result;
420 ashish 1868
      }
1869
    }
1870
 
4600 varun.gupt 1871
    private static class getActivePaymentGateways<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActivePaymentGateways_args> {
1872
      public getActivePaymentGateways() {
1873
        super("getActivePaymentGateways");
1874
      }
1875
 
1876
      protected getActivePaymentGateways_args getEmptyArgsInstance() {
1877
        return new getActivePaymentGateways_args();
1878
      }
1879
 
1880
      protected getActivePaymentGateways_result getResult(I iface, getActivePaymentGateways_args args) throws org.apache.thrift.TException {
1881
        getActivePaymentGateways_result result = new getActivePaymentGateways_result();
1882
        try {
1883
          result.success = iface.getActivePaymentGateways();
1884
        } catch (PaymentException pe) {
1885
          result.pe = pe;
1886
        }
1887
        return result;
1888
      }
1889
    }
1890
 
3430 rajveer 1891
    private static class getPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayment_args> {
1892
      public getPayment() {
1893
        super("getPayment");
1894
      }
1895
 
1896
      protected getPayment_args getEmptyArgsInstance() {
1897
        return new getPayment_args();
1898
      }
1899
 
1900
      protected getPayment_result getResult(I iface, getPayment_args args) throws org.apache.thrift.TException {
695 rajveer 1901
        getPayment_result result = new getPayment_result();
420 ashish 1902
        try {
3430 rajveer 1903
          result.success = iface.getPayment(args.id);
420 ashish 1904
        } catch (PaymentException pe) {
1905
          result.pe = pe;
1906
        }
3430 rajveer 1907
        return result;
420 ashish 1908
      }
1909
    }
1910
 
3430 rajveer 1911
    private static class getPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForTxnId_args> {
1912
      public getPaymentForTxnId() {
1913
        super("getPaymentForTxnId");
1914
      }
1915
 
1916
      protected getPaymentForTxnId_args getEmptyArgsInstance() {
1917
        return new getPaymentForTxnId_args();
1918
      }
1919
 
1920
      protected getPaymentForTxnId_result getResult(I iface, getPaymentForTxnId_args args) throws org.apache.thrift.TException {
695 rajveer 1921
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 1922
        try {
3430 rajveer 1923
          result.success = iface.getPaymentForTxnId(args.txnId);
420 ashish 1924
        } catch (PaymentException pe) {
1925
          result.pe = pe;
1926
        }
3430 rajveer 1927
        return result;
420 ashish 1928
      }
1929
    }
1930
 
7049 anupam.sin 1931
    private static class getPaymentForRechargeTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForRechargeTxnId_args> {
1932
      public getPaymentForRechargeTxnId() {
1933
        super("getPaymentForRechargeTxnId");
1934
      }
1935
 
1936
      protected getPaymentForRechargeTxnId_args getEmptyArgsInstance() {
1937
        return new getPaymentForRechargeTxnId_args();
1938
      }
1939
 
1940
      protected getPaymentForRechargeTxnId_result getResult(I iface, getPaymentForRechargeTxnId_args args) throws org.apache.thrift.TException {
1941
        getPaymentForRechargeTxnId_result result = new getPaymentForRechargeTxnId_result();
1942
        try {
1943
          result.success = iface.getPaymentForRechargeTxnId(args.txnId);
1944
        } catch (PaymentException pe) {
1945
          result.pe = pe;
1946
        }
1947
        return result;
1948
      }
1949
    }
1950
 
4600 varun.gupt 1951
    private static class getSuccessfulPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentForTxnId_args> {
1952
      public getSuccessfulPaymentForTxnId() {
1953
        super("getSuccessfulPaymentForTxnId");
1954
      }
1955
 
1956
      protected getSuccessfulPaymentForTxnId_args getEmptyArgsInstance() {
1957
        return new getSuccessfulPaymentForTxnId_args();
1958
      }
1959
 
1960
      protected getSuccessfulPaymentForTxnId_result getResult(I iface, getSuccessfulPaymentForTxnId_args args) throws org.apache.thrift.TException {
1961
        getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
1962
        try {
1963
          result.success = iface.getSuccessfulPaymentForTxnId(args.txnId);
1964
        } catch (PaymentException pe) {
1965
          result.pe = pe;
1966
        }
1967
        return result;
1968
      }
1969
    }
1970
 
3430 rajveer 1971
    private static class updatePaymentDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePaymentDetails_args> {
1972
      public updatePaymentDetails() {
1973
        super("updatePaymentDetails");
1974
      }
1975
 
1976
      protected updatePaymentDetails_args getEmptyArgsInstance() {
1977
        return new updatePaymentDetails_args();
1978
      }
1979
 
1980
      protected updatePaymentDetails_result getResult(I iface, updatePaymentDetails_args args) throws org.apache.thrift.TException {
695 rajveer 1981
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 1982
        try {
3430 rajveer 1983
          result.success = iface.updatePaymentDetails(args.id, args.gatewayPaymentId, args.sessionId, args.gatewayTxnStatus, args.description, args.gatewayTxnId, args.authCode, args.referenceCode, args.errorCode, args.status, args.gatewayTxnDate, args.attributes);
695 rajveer 1984
          result.setSuccessIsSet(true);
420 ashish 1985
        } catch (PaymentException pe) {
1986
          result.pe = pe;
1987
        }
3430 rajveer 1988
        return result;
420 ashish 1989
      }
1990
    }
1991
 
3430 rajveer 1992
    private static class getSuccessfulPaymentsAmountRange<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentsAmountRange_args> {
1993
      public getSuccessfulPaymentsAmountRange() {
1994
        super("getSuccessfulPaymentsAmountRange");
1995
      }
1996
 
1997
      protected getSuccessfulPaymentsAmountRange_args getEmptyArgsInstance() {
1998
        return new getSuccessfulPaymentsAmountRange_args();
1999
      }
2000
 
2001
      protected getSuccessfulPaymentsAmountRange_result getResult(I iface, getSuccessfulPaymentsAmountRange_args args) throws org.apache.thrift.TException {
1731 ankur.sing 2002
        getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 2003
        result.success = iface.getSuccessfulPaymentsAmountRange();
2004
        return result;
1629 ankur.sing 2005
      }
2006
    }
2007
 
3430 rajveer 2008
    private static class initializeHdfcPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcPayment_args> {
2009
      public initializeHdfcPayment() {
2010
        super("initializeHdfcPayment");
2011
      }
2012
 
2013
      protected initializeHdfcPayment_args getEmptyArgsInstance() {
2014
        return new initializeHdfcPayment_args();
2015
      }
2016
 
2017
      protected initializeHdfcPayment_result getResult(I iface, initializeHdfcPayment_args args) throws org.apache.thrift.TException {
2462 chandransh 2018
        initializeHdfcPayment_result result = new initializeHdfcPayment_result();
2019
        try {
3430 rajveer 2020
          result.success = iface.initializeHdfcPayment(args.merchantPaymentId);
2462 chandransh 2021
        } catch (PaymentException pe) {
2022
          result.pe = pe;
2023
        }
3430 rajveer 2024
        return result;
2462 chandransh 2025
      }
2026
    }
2027
 
6050 anupam.sin 2028
    private static class doHdfcPaymentForDigitalOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doHdfcPaymentForDigitalOrder_args> {
2029
      public doHdfcPaymentForDigitalOrder() {
2030
        super("doHdfcPaymentForDigitalOrder");
2031
      }
2032
 
2033
      protected doHdfcPaymentForDigitalOrder_args getEmptyArgsInstance() {
2034
        return new doHdfcPaymentForDigitalOrder_args();
2035
      }
2036
 
2037
      protected doHdfcPaymentForDigitalOrder_result getResult(I iface, doHdfcPaymentForDigitalOrder_args args) throws org.apache.thrift.TException {
2038
        doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
2039
        try {
6228 anupam.sin 2040
          result.success = iface.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId, args.phone);
6050 anupam.sin 2041
        } catch (PaymentException pe) {
2042
          result.pe = pe;
2043
        }
2044
        return result;
2045
      }
2046
    }
2047
 
3616 chandransh 2048
    private static class initializeHdfcEmiPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcEmiPayment_args> {
2049
      public initializeHdfcEmiPayment() {
2050
        super("initializeHdfcEmiPayment");
2051
      }
2052
 
2053
      protected initializeHdfcEmiPayment_args getEmptyArgsInstance() {
2054
        return new initializeHdfcEmiPayment_args();
2055
      }
2056
 
2057
      protected initializeHdfcEmiPayment_result getResult(I iface, initializeHdfcEmiPayment_args args) throws org.apache.thrift.TException {
2058
        initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
2059
        try {
2060
          result.success = iface.initializeHdfcEmiPayment(args.merchantPaymentId);
2061
        } catch (PaymentException pe) {
2062
          result.pe = pe;
2063
        }
2064
        return result;
2065
      }
2066
    }
2067
 
3430 rajveer 2068
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
2069
      public createRefund() {
2070
        super("createRefund");
2071
      }
2072
 
2073
      protected createRefund_args getEmptyArgsInstance() {
2074
        return new createRefund_args();
2075
      }
2076
 
2077
      protected createRefund_result getResult(I iface, createRefund_args args) throws org.apache.thrift.TException {
2690 chandransh 2078
        createRefund_result result = new createRefund_result();
2079
        try {
3430 rajveer 2080
          result.success = iface.createRefund(args.orderId, args.merchantTxnId, args.amount);
2690 chandransh 2081
          result.setSuccessIsSet(true);
2082
        } catch (PaymentException pe) {
2083
          result.pe = pe;
2084
        }
3430 rajveer 2085
        return result;
2690 chandransh 2086
      }
2087
    }
2088
 
3430 rajveer 2089
    private static class capturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, capturePayment_args> {
2090
      public capturePayment() {
2091
        super("capturePayment");
2092
      }
2093
 
2094
      protected capturePayment_args getEmptyArgsInstance() {
2095
        return new capturePayment_args();
2096
      }
2097
 
2098
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
3010 chandransh 2099
        capturePayment_result result = new capturePayment_result();
2100
        try {
8618 rajveer 2101
          result.success = iface.capturePayment(args.merchantTxnId, args.isDigital);
3010 chandransh 2102
          result.setSuccessIsSet(true);
2103
        } catch (PaymentException pe) {
2104
          result.pe = pe;
2105
        }
3430 rajveer 2106
        return result;
3010 chandransh 2107
      }
2108
    }
2109
 
6486 rajveer 2110
    private static class refundPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, refundPayment_args> {
2111
      public refundPayment() {
2112
        super("refundPayment");
2113
      }
2114
 
2115
      protected refundPayment_args getEmptyArgsInstance() {
2116
        return new refundPayment_args();
2117
      }
2118
 
2119
      protected refundPayment_result getResult(I iface, refundPayment_args args) throws org.apache.thrift.TException {
2120
        refundPayment_result result = new refundPayment_result();
2121
        try {
2122
          result.success = iface.refundPayment(args.merchantTxnId, args.amount, args.isDigital);
2123
          result.setSuccessIsSet(true);
2124
        } catch (PaymentException pe) {
2125
          result.pe = pe;
2126
        }
2127
        return result;
2128
      }
2129
    }
2130
 
3956 chandransh 2131
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
2132
      public partiallyCapturePayment() {
2133
        super("partiallyCapturePayment");
2134
      }
2135
 
2136
      protected partiallyCapturePayment_args getEmptyArgsInstance() {
2137
        return new partiallyCapturePayment_args();
2138
      }
2139
 
2140
      protected partiallyCapturePayment_result getResult(I iface, partiallyCapturePayment_args args) throws org.apache.thrift.TException {
2141
        partiallyCapturePayment_result result = new partiallyCapturePayment_result();
2142
        try {
2143
          result.success = iface.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate);
2144
          result.setSuccessIsSet(true);
2145
        } catch (PaymentException pe) {
2146
          result.pe = pe;
2147
        }
2148
        return result;
2149
      }
2150
    }
2151
 
4008 mandeep.dh 2152
    private static class getPaymentsRequiringExtraProcessing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsRequiringExtraProcessing_args> {
2153
      public getPaymentsRequiringExtraProcessing() {
2154
        super("getPaymentsRequiringExtraProcessing");
2155
      }
2156
 
2157
      protected getPaymentsRequiringExtraProcessing_args getEmptyArgsInstance() {
2158
        return new getPaymentsRequiringExtraProcessing_args();
2159
      }
2160
 
2161
      protected getPaymentsRequiringExtraProcessing_result getResult(I iface, getPaymentsRequiringExtraProcessing_args args) throws org.apache.thrift.TException {
2162
        getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
2163
        result.success = iface.getPaymentsRequiringExtraProcessing(args.category);
2164
        return result;
2165
      }
2166
    }
2167
 
2168
    private static class markPaymentAsProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPaymentAsProcessed_args> {
2169
      public markPaymentAsProcessed() {
2170
        super("markPaymentAsProcessed");
2171
      }
2172
 
2173
      protected markPaymentAsProcessed_args getEmptyArgsInstance() {
2174
        return new markPaymentAsProcessed_args();
2175
      }
2176
 
2177
      protected markPaymentAsProcessed_result getResult(I iface, markPaymentAsProcessed_args args) throws org.apache.thrift.TException {
2178
        markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
2179
        iface.markPaymentAsProcessed(args.paymentId, args.category);
2180
        return result;
2181
      }
2182
    }
2183
 
8914 rajveer 2184
    private static class getPaymentStatusAtGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentStatusAtGateway_args> {
2185
      public getPaymentStatusAtGateway() {
2186
        super("getPaymentStatusAtGateway");
8907 rajveer 2187
      }
2188
 
8914 rajveer 2189
      protected getPaymentStatusAtGateway_args getEmptyArgsInstance() {
2190
        return new getPaymentStatusAtGateway_args();
8907 rajveer 2191
      }
2192
 
8914 rajveer 2193
      protected getPaymentStatusAtGateway_result getResult(I iface, getPaymentStatusAtGateway_args args) throws org.apache.thrift.TException {
2194
        getPaymentStatusAtGateway_result result = new getPaymentStatusAtGateway_result();
8907 rajveer 2195
        try {
8914 rajveer 2196
          result.success = iface.getPaymentStatusAtGateway(args.merchantTxnId, args.amount, args.isDigital);
8907 rajveer 2197
        } catch (PaymentException pe) {
2198
          result.pe = pe;
2199
        }
2200
        return result;
2201
      }
2202
    }
2203
 
123 ashish 2204
  }
2205
 
3430 rajveer 2206
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
2207
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
123 ashish 2208
 
3430 rajveer 2209
    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);
2210
    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);
2211
    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);
2212
    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 2213
    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 2214
 
3430 rajveer 2215
    private long userId; // required
2216
    private double amount; // required
2217
    private long gatewayId; // required
2218
    private long txnId; // required
6050 anupam.sin 2219
    private boolean isDigital; // required
123 ashish 2220
 
2221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2222
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 2223
      USER_ID((short)1, "userId"),
2224
      AMOUNT((short)2, "amount"),
2225
      GATEWAY_ID((short)3, "gatewayId"),
6050 anupam.sin 2226
      TXN_ID((short)4, "txnId"),
2227
      IS_DIGITAL((short)5, "isDigital");
123 ashish 2228
 
2229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2230
 
2231
      static {
2232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2233
          byName.put(field.getFieldName(), field);
2234
        }
2235
      }
2236
 
2237
      /**
2238
       * Find the _Fields constant that matches fieldId, or null if its not found.
2239
       */
2240
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2241
        switch(fieldId) {
2242
          case 1: // USER_ID
2243
            return USER_ID;
2244
          case 2: // AMOUNT
2245
            return AMOUNT;
2246
          case 3: // GATEWAY_ID
2247
            return GATEWAY_ID;
2248
          case 4: // TXN_ID
2249
            return TXN_ID;
6050 anupam.sin 2250
          case 5: // IS_DIGITAL
2251
            return IS_DIGITAL;
3430 rajveer 2252
          default:
2253
            return null;
2254
        }
123 ashish 2255
      }
2256
 
2257
      /**
2258
       * Find the _Fields constant that matches fieldId, throwing an exception
2259
       * if it is not found.
2260
       */
2261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2262
        _Fields fields = findByThriftId(fieldId);
2263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2264
        return fields;
2265
      }
2266
 
2267
      /**
2268
       * Find the _Fields constant that matches name, or null if its not found.
2269
       */
2270
      public static _Fields findByName(String name) {
2271
        return byName.get(name);
2272
      }
2273
 
2274
      private final short _thriftId;
2275
      private final String _fieldName;
2276
 
2277
      _Fields(short thriftId, String fieldName) {
2278
        _thriftId = thriftId;
2279
        _fieldName = fieldName;
2280
      }
2281
 
2282
      public short getThriftFieldId() {
2283
        return _thriftId;
2284
      }
2285
 
2286
      public String getFieldName() {
2287
        return _fieldName;
2288
      }
2289
    }
2290
 
2291
    // isset id assignments
695 rajveer 2292
    private static final int __USERID_ISSET_ID = 0;
2293
    private static final int __AMOUNT_ISSET_ID = 1;
2294
    private static final int __GATEWAYID_ISSET_ID = 2;
2295
    private static final int __TXNID_ISSET_ID = 3;
6050 anupam.sin 2296
    private static final int __ISDIGITAL_ISSET_ID = 4;
2297
    private BitSet __isset_bit_vector = new BitSet(5);
123 ashish 2298
 
3430 rajveer 2299
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2300
    static {
3430 rajveer 2301
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2302
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2303
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2304
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2305
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
2306
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2307
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2308
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2309
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6050 anupam.sin 2310
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2311
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 2312
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2313
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
123 ashish 2314
    }
2315
 
2316
    public createPayment_args() {
2317
    }
2318
 
2319
    public createPayment_args(
695 rajveer 2320
      long userId,
123 ashish 2321
      double amount,
695 rajveer 2322
      long gatewayId,
6050 anupam.sin 2323
      long txnId,
2324
      boolean isDigital)
123 ashish 2325
    {
2326
      this();
695 rajveer 2327
      this.userId = userId;
2328
      setUserIdIsSet(true);
123 ashish 2329
      this.amount = amount;
2330
      setAmountIsSet(true);
695 rajveer 2331
      this.gatewayId = gatewayId;
2332
      setGatewayIdIsSet(true);
2333
      this.txnId = txnId;
2334
      setTxnIdIsSet(true);
6050 anupam.sin 2335
      this.isDigital = isDigital;
2336
      setIsDigitalIsSet(true);
123 ashish 2337
    }
2338
 
2339
    /**
2340
     * Performs a deep copy on <i>other</i>.
2341
     */
2342
    public createPayment_args(createPayment_args other) {
2343
      __isset_bit_vector.clear();
2344
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 2345
      this.userId = other.userId;
123 ashish 2346
      this.amount = other.amount;
695 rajveer 2347
      this.gatewayId = other.gatewayId;
2348
      this.txnId = other.txnId;
6050 anupam.sin 2349
      this.isDigital = other.isDigital;
123 ashish 2350
    }
2351
 
2352
    public createPayment_args deepCopy() {
2353
      return new createPayment_args(this);
2354
    }
2355
 
3430 rajveer 2356
    @Override
2357
    public void clear() {
2358
      setUserIdIsSet(false);
2359
      this.userId = 0;
2360
      setAmountIsSet(false);
2361
      this.amount = 0.0;
2362
      setGatewayIdIsSet(false);
2363
      this.gatewayId = 0;
2364
      setTxnIdIsSet(false);
2365
      this.txnId = 0;
6050 anupam.sin 2366
      setIsDigitalIsSet(false);
2367
      this.isDigital = false;
123 ashish 2368
    }
2369
 
695 rajveer 2370
    public long getUserId() {
2371
      return this.userId;
123 ashish 2372
    }
2373
 
3430 rajveer 2374
    public void setUserId(long userId) {
695 rajveer 2375
      this.userId = userId;
2376
      setUserIdIsSet(true);
123 ashish 2377
    }
2378
 
695 rajveer 2379
    public void unsetUserId() {
2380
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 2381
    }
2382
 
3430 rajveer 2383
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
695 rajveer 2384
    public boolean isSetUserId() {
2385
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 2386
    }
2387
 
695 rajveer 2388
    public void setUserIdIsSet(boolean value) {
2389
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 2390
    }
2391
 
2392
    public double getAmount() {
2393
      return this.amount;
2394
    }
2395
 
3430 rajveer 2396
    public void setAmount(double amount) {
123 ashish 2397
      this.amount = amount;
2398
      setAmountIsSet(true);
2399
    }
2400
 
2401
    public void unsetAmount() {
2402
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
2403
    }
2404
 
3430 rajveer 2405
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
123 ashish 2406
    public boolean isSetAmount() {
2407
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
2408
    }
2409
 
2410
    public void setAmountIsSet(boolean value) {
2411
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
2412
    }
2413
 
695 rajveer 2414
    public long getGatewayId() {
2415
      return this.gatewayId;
123 ashish 2416
    }
2417
 
3430 rajveer 2418
    public void setGatewayId(long gatewayId) {
695 rajveer 2419
      this.gatewayId = gatewayId;
2420
      setGatewayIdIsSet(true);
123 ashish 2421
    }
2422
 
695 rajveer 2423
    public void unsetGatewayId() {
2424
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2425
    }
2426
 
3430 rajveer 2427
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 2428
    public boolean isSetGatewayId() {
2429
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2430
    }
2431
 
695 rajveer 2432
    public void setGatewayIdIsSet(boolean value) {
2433
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2434
    }
2435
 
695 rajveer 2436
    public long getTxnId() {
2437
      return this.txnId;
2438
    }
2439
 
3430 rajveer 2440
    public void setTxnId(long txnId) {
695 rajveer 2441
      this.txnId = txnId;
2442
      setTxnIdIsSet(true);
2443
    }
2444
 
2445
    public void unsetTxnId() {
2446
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
2447
    }
2448
 
3430 rajveer 2449
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 2450
    public boolean isSetTxnId() {
2451
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
2452
    }
2453
 
2454
    public void setTxnIdIsSet(boolean value) {
2455
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
2456
    }
2457
 
6050 anupam.sin 2458
    public boolean isIsDigital() {
2459
      return this.isDigital;
2460
    }
2461
 
2462
    public void setIsDigital(boolean isDigital) {
2463
      this.isDigital = isDigital;
2464
      setIsDigitalIsSet(true);
2465
    }
2466
 
2467
    public void unsetIsDigital() {
2468
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
2469
    }
2470
 
2471
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
2472
    public boolean isSetIsDigital() {
2473
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
2474
    }
2475
 
2476
    public void setIsDigitalIsSet(boolean value) {
2477
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
2478
    }
2479
 
123 ashish 2480
    public void setFieldValue(_Fields field, Object value) {
2481
      switch (field) {
2482
      case USER_ID:
2483
        if (value == null) {
695 rajveer 2484
          unsetUserId();
123 ashish 2485
        } else {
695 rajveer 2486
          setUserId((Long)value);
123 ashish 2487
        }
2488
        break;
2489
 
695 rajveer 2490
      case AMOUNT:
123 ashish 2491
        if (value == null) {
695 rajveer 2492
          unsetAmount();
123 ashish 2493
        } else {
695 rajveer 2494
          setAmount((Double)value);
123 ashish 2495
        }
2496
        break;
2497
 
695 rajveer 2498
      case GATEWAY_ID:
123 ashish 2499
        if (value == null) {
695 rajveer 2500
          unsetGatewayId();
123 ashish 2501
        } else {
695 rajveer 2502
          setGatewayId((Long)value);
123 ashish 2503
        }
2504
        break;
2505
 
695 rajveer 2506
      case TXN_ID:
123 ashish 2507
        if (value == null) {
695 rajveer 2508
          unsetTxnId();
123 ashish 2509
        } else {
695 rajveer 2510
          setTxnId((Long)value);
123 ashish 2511
        }
2512
        break;
2513
 
6050 anupam.sin 2514
      case IS_DIGITAL:
2515
        if (value == null) {
2516
          unsetIsDigital();
2517
        } else {
2518
          setIsDigital((Boolean)value);
2519
        }
2520
        break;
2521
 
123 ashish 2522
      }
2523
    }
2524
 
2525
    public Object getFieldValue(_Fields field) {
2526
      switch (field) {
2527
      case USER_ID:
3430 rajveer 2528
        return Long.valueOf(getUserId());
123 ashish 2529
 
2530
      case AMOUNT:
3430 rajveer 2531
        return Double.valueOf(getAmount());
123 ashish 2532
 
420 ashish 2533
      case GATEWAY_ID:
3430 rajveer 2534
        return Long.valueOf(getGatewayId());
123 ashish 2535
 
695 rajveer 2536
      case TXN_ID:
3430 rajveer 2537
        return Long.valueOf(getTxnId());
695 rajveer 2538
 
6050 anupam.sin 2539
      case IS_DIGITAL:
2540
        return Boolean.valueOf(isIsDigital());
2541
 
123 ashish 2542
      }
2543
      throw new IllegalStateException();
2544
    }
2545
 
3430 rajveer 2546
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2547
    public boolean isSet(_Fields field) {
2548
      if (field == null) {
2549
        throw new IllegalArgumentException();
2550
      }
123 ashish 2551
 
2552
      switch (field) {
2553
      case USER_ID:
695 rajveer 2554
        return isSetUserId();
123 ashish 2555
      case AMOUNT:
2556
        return isSetAmount();
420 ashish 2557
      case GATEWAY_ID:
695 rajveer 2558
        return isSetGatewayId();
2559
      case TXN_ID:
2560
        return isSetTxnId();
6050 anupam.sin 2561
      case IS_DIGITAL:
2562
        return isSetIsDigital();
123 ashish 2563
      }
2564
      throw new IllegalStateException();
2565
    }
2566
 
2567
    @Override
2568
    public boolean equals(Object that) {
2569
      if (that == null)
2570
        return false;
2571
      if (that instanceof createPayment_args)
2572
        return this.equals((createPayment_args)that);
2573
      return false;
2574
    }
2575
 
2576
    public boolean equals(createPayment_args that) {
2577
      if (that == null)
2578
        return false;
2579
 
695 rajveer 2580
      boolean this_present_userId = true;
2581
      boolean that_present_userId = true;
2582
      if (this_present_userId || that_present_userId) {
2583
        if (!(this_present_userId && that_present_userId))
123 ashish 2584
          return false;
695 rajveer 2585
        if (this.userId != that.userId)
123 ashish 2586
          return false;
2587
      }
2588
 
2589
      boolean this_present_amount = true;
2590
      boolean that_present_amount = true;
2591
      if (this_present_amount || that_present_amount) {
2592
        if (!(this_present_amount && that_present_amount))
2593
          return false;
2594
        if (this.amount != that.amount)
2595
          return false;
2596
      }
2597
 
695 rajveer 2598
      boolean this_present_gatewayId = true;
2599
      boolean that_present_gatewayId = true;
2600
      if (this_present_gatewayId || that_present_gatewayId) {
2601
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2602
          return false;
695 rajveer 2603
        if (this.gatewayId != that.gatewayId)
123 ashish 2604
          return false;
2605
      }
2606
 
695 rajveer 2607
      boolean this_present_txnId = true;
2608
      boolean that_present_txnId = true;
2609
      if (this_present_txnId || that_present_txnId) {
2610
        if (!(this_present_txnId && that_present_txnId))
2611
          return false;
2612
        if (this.txnId != that.txnId)
2613
          return false;
2614
      }
2615
 
6050 anupam.sin 2616
      boolean this_present_isDigital = true;
2617
      boolean that_present_isDigital = true;
2618
      if (this_present_isDigital || that_present_isDigital) {
2619
        if (!(this_present_isDigital && that_present_isDigital))
2620
          return false;
2621
        if (this.isDigital != that.isDigital)
2622
          return false;
2623
      }
2624
 
123 ashish 2625
      return true;
2626
    }
2627
 
2628
    @Override
2629
    public int hashCode() {
2630
      return 0;
2631
    }
2632
 
2633
    public int compareTo(createPayment_args other) {
2634
      if (!getClass().equals(other.getClass())) {
2635
        return getClass().getName().compareTo(other.getClass().getName());
2636
      }
2637
 
2638
      int lastComparison = 0;
2639
      createPayment_args typedOther = (createPayment_args)other;
2640
 
3430 rajveer 2641
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 2642
      if (lastComparison != 0) {
2643
        return lastComparison;
2644
      }
3430 rajveer 2645
      if (isSetUserId()) {
2646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
2647
        if (lastComparison != 0) {
2648
          return lastComparison;
2649
        }
123 ashish 2650
      }
3430 rajveer 2651
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
123 ashish 2652
      if (lastComparison != 0) {
2653
        return lastComparison;
2654
      }
3430 rajveer 2655
      if (isSetAmount()) {
2656
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
2657
        if (lastComparison != 0) {
2658
          return lastComparison;
2659
        }
123 ashish 2660
      }
3430 rajveer 2661
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 2662
      if (lastComparison != 0) {
2663
        return lastComparison;
2664
      }
3430 rajveer 2665
      if (isSetGatewayId()) {
2666
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
2667
        if (lastComparison != 0) {
2668
          return lastComparison;
2669
        }
123 ashish 2670
      }
3430 rajveer 2671
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
123 ashish 2672
      if (lastComparison != 0) {
2673
        return lastComparison;
2674
      }
3430 rajveer 2675
      if (isSetTxnId()) {
2676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
2677
        if (lastComparison != 0) {
2678
          return lastComparison;
2679
        }
123 ashish 2680
      }
6050 anupam.sin 2681
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
2682
      if (lastComparison != 0) {
2683
        return lastComparison;
2684
      }
2685
      if (isSetIsDigital()) {
2686
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
2687
        if (lastComparison != 0) {
2688
          return lastComparison;
2689
        }
2690
      }
123 ashish 2691
      return 0;
2692
    }
2693
 
3430 rajveer 2694
    public _Fields fieldForId(int fieldId) {
2695
      return _Fields.findByThriftId(fieldId);
2696
    }
2697
 
2698
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2699
      org.apache.thrift.protocol.TField field;
123 ashish 2700
      iprot.readStructBegin();
2701
      while (true)
2702
      {
2703
        field = iprot.readFieldBegin();
3430 rajveer 2704
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2705
          break;
2706
        }
3430 rajveer 2707
        switch (field.id) {
2708
          case 1: // USER_ID
2709
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2710
              this.userId = iprot.readI64();
2711
              setUserIdIsSet(true);
2712
            } else { 
2713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2714
            }
2715
            break;
2716
          case 2: // AMOUNT
2717
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
2718
              this.amount = iprot.readDouble();
2719
              setAmountIsSet(true);
2720
            } else { 
2721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2722
            }
2723
            break;
2724
          case 3: // GATEWAY_ID
2725
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2726
              this.gatewayId = iprot.readI64();
2727
              setGatewayIdIsSet(true);
2728
            } else { 
2729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2730
            }
2731
            break;
2732
          case 4: // TXN_ID
2733
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2734
              this.txnId = iprot.readI64();
2735
              setTxnIdIsSet(true);
2736
            } else { 
2737
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2738
            }
2739
            break;
6050 anupam.sin 2740
          case 5: // IS_DIGITAL
2741
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
2742
              this.isDigital = iprot.readBool();
2743
              setIsDigitalIsSet(true);
2744
            } else { 
2745
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2746
            }
2747
            break;
3430 rajveer 2748
          default:
2749
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2750
        }
3430 rajveer 2751
        iprot.readFieldEnd();
123 ashish 2752
      }
2753
      iprot.readStructEnd();
2754
      validate();
2755
    }
2756
 
3430 rajveer 2757
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2758
      validate();
2759
 
2760
      oprot.writeStructBegin(STRUCT_DESC);
2761
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 2762
      oprot.writeI64(this.userId);
123 ashish 2763
      oprot.writeFieldEnd();
2764
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
2765
      oprot.writeDouble(this.amount);
2766
      oprot.writeFieldEnd();
420 ashish 2767
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2768
      oprot.writeI64(this.gatewayId);
420 ashish 2769
      oprot.writeFieldEnd();
695 rajveer 2770
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
2771
      oprot.writeI64(this.txnId);
2772
      oprot.writeFieldEnd();
6050 anupam.sin 2773
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
2774
      oprot.writeBool(this.isDigital);
2775
      oprot.writeFieldEnd();
123 ashish 2776
      oprot.writeFieldStop();
2777
      oprot.writeStructEnd();
2778
    }
2779
 
2780
    @Override
2781
    public String toString() {
2782
      StringBuilder sb = new StringBuilder("createPayment_args(");
2783
      boolean first = true;
2784
 
695 rajveer 2785
      sb.append("userId:");
2786
      sb.append(this.userId);
123 ashish 2787
      first = false;
2788
      if (!first) sb.append(", ");
2789
      sb.append("amount:");
2790
      sb.append(this.amount);
2791
      first = false;
2792
      if (!first) sb.append(", ");
695 rajveer 2793
      sb.append("gatewayId:");
2794
      sb.append(this.gatewayId);
123 ashish 2795
      first = false;
695 rajveer 2796
      if (!first) sb.append(", ");
2797
      sb.append("txnId:");
2798
      sb.append(this.txnId);
2799
      first = false;
6050 anupam.sin 2800
      if (!first) sb.append(", ");
2801
      sb.append("isDigital:");
2802
      sb.append(this.isDigital);
2803
      first = false;
123 ashish 2804
      sb.append(")");
2805
      return sb.toString();
2806
    }
2807
 
3430 rajveer 2808
    public void validate() throws org.apache.thrift.TException {
123 ashish 2809
      // check for required fields
2810
    }
2811
 
3430 rajveer 2812
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2813
      try {
2814
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2815
      } catch (org.apache.thrift.TException te) {
2816
        throw new java.io.IOException(te);
2817
      }
2818
    }
2819
 
2820
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2821
      try {
2822
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2823
      } catch (org.apache.thrift.TException te) {
2824
        throw new java.io.IOException(te);
2825
      }
2826
    }
2827
 
123 ashish 2828
  }
2829
 
3430 rajveer 2830
  public static class createPayment_result implements org.apache.thrift.TBase<createPayment_result, createPayment_result._Fields>, java.io.Serializable, Cloneable   {
2831
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_result");
123 ashish 2832
 
3430 rajveer 2833
    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);
2834
    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 2835
 
3430 rajveer 2836
    private long success; // required
2837
    private PaymentException pe; // required
123 ashish 2838
 
2839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2840
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 2841
      SUCCESS((short)0, "success"),
2842
      PE((short)1, "pe");
2843
 
2844
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2845
 
2846
      static {
2847
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2848
          byName.put(field.getFieldName(), field);
2849
        }
2850
      }
2851
 
2852
      /**
2853
       * Find the _Fields constant that matches fieldId, or null if its not found.
2854
       */
2855
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2856
        switch(fieldId) {
2857
          case 0: // SUCCESS
2858
            return SUCCESS;
2859
          case 1: // PE
2860
            return PE;
2861
          default:
2862
            return null;
2863
        }
123 ashish 2864
      }
2865
 
2866
      /**
2867
       * Find the _Fields constant that matches fieldId, throwing an exception
2868
       * if it is not found.
2869
       */
2870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2871
        _Fields fields = findByThriftId(fieldId);
2872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2873
        return fields;
2874
      }
2875
 
2876
      /**
2877
       * Find the _Fields constant that matches name, or null if its not found.
2878
       */
2879
      public static _Fields findByName(String name) {
2880
        return byName.get(name);
2881
      }
2882
 
2883
      private final short _thriftId;
2884
      private final String _fieldName;
2885
 
2886
      _Fields(short thriftId, String fieldName) {
2887
        _thriftId = thriftId;
2888
        _fieldName = fieldName;
2889
      }
2890
 
2891
      public short getThriftFieldId() {
2892
        return _thriftId;
2893
      }
2894
 
2895
      public String getFieldName() {
2896
        return _fieldName;
2897
      }
2898
    }
2899
 
2900
    // isset id assignments
420 ashish 2901
    private static final int __SUCCESS_ISSET_ID = 0;
2902
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 2903
 
3430 rajveer 2904
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2905
    static {
3430 rajveer 2906
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2907
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2908
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2909
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2910
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2911
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2912
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
123 ashish 2913
    }
2914
 
2915
    public createPayment_result() {
2916
    }
2917
 
2918
    public createPayment_result(
420 ashish 2919
      long success,
123 ashish 2920
      PaymentException pe)
2921
    {
2922
      this();
2923
      this.success = success;
420 ashish 2924
      setSuccessIsSet(true);
123 ashish 2925
      this.pe = pe;
2926
    }
2927
 
2928
    /**
2929
     * Performs a deep copy on <i>other</i>.
2930
     */
2931
    public createPayment_result(createPayment_result other) {
420 ashish 2932
      __isset_bit_vector.clear();
2933
      __isset_bit_vector.or(other.__isset_bit_vector);
2934
      this.success = other.success;
123 ashish 2935
      if (other.isSetPe()) {
2936
        this.pe = new PaymentException(other.pe);
2937
      }
2938
    }
2939
 
2940
    public createPayment_result deepCopy() {
2941
      return new createPayment_result(this);
2942
    }
2943
 
3430 rajveer 2944
    @Override
2945
    public void clear() {
2946
      setSuccessIsSet(false);
2947
      this.success = 0;
2948
      this.pe = null;
123 ashish 2949
    }
2950
 
420 ashish 2951
    public long getSuccess() {
123 ashish 2952
      return this.success;
2953
    }
2954
 
3430 rajveer 2955
    public void setSuccess(long success) {
123 ashish 2956
      this.success = success;
420 ashish 2957
      setSuccessIsSet(true);
123 ashish 2958
    }
2959
 
2960
    public void unsetSuccess() {
420 ashish 2961
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 2962
    }
2963
 
3430 rajveer 2964
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 2965
    public boolean isSetSuccess() {
420 ashish 2966
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 2967
    }
2968
 
2969
    public void setSuccessIsSet(boolean value) {
420 ashish 2970
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 2971
    }
2972
 
2973
    public PaymentException getPe() {
2974
      return this.pe;
2975
    }
2976
 
3430 rajveer 2977
    public void setPe(PaymentException pe) {
123 ashish 2978
      this.pe = pe;
2979
    }
2980
 
2981
    public void unsetPe() {
2982
      this.pe = null;
2983
    }
2984
 
3430 rajveer 2985
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 2986
    public boolean isSetPe() {
2987
      return this.pe != null;
2988
    }
2989
 
2990
    public void setPeIsSet(boolean value) {
2991
      if (!value) {
2992
        this.pe = null;
2993
      }
2994
    }
2995
 
2996
    public void setFieldValue(_Fields field, Object value) {
2997
      switch (field) {
2998
      case SUCCESS:
2999
        if (value == null) {
3000
          unsetSuccess();
3001
        } else {
420 ashish 3002
          setSuccess((Long)value);
123 ashish 3003
        }
3004
        break;
3005
 
3006
      case PE:
3007
        if (value == null) {
3008
          unsetPe();
3009
        } else {
3010
          setPe((PaymentException)value);
3011
        }
3012
        break;
3013
 
3014
      }
3015
    }
3016
 
3017
    public Object getFieldValue(_Fields field) {
3018
      switch (field) {
3019
      case SUCCESS:
3430 rajveer 3020
        return Long.valueOf(getSuccess());
123 ashish 3021
 
3022
      case PE:
3023
        return getPe();
3024
 
3025
      }
3026
      throw new IllegalStateException();
3027
    }
3028
 
3430 rajveer 3029
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3030
    public boolean isSet(_Fields field) {
3031
      if (field == null) {
3032
        throw new IllegalArgumentException();
3033
      }
123 ashish 3034
 
3035
      switch (field) {
3036
      case SUCCESS:
3037
        return isSetSuccess();
3038
      case PE:
3039
        return isSetPe();
3040
      }
3041
      throw new IllegalStateException();
3042
    }
3043
 
3044
    @Override
3045
    public boolean equals(Object that) {
3046
      if (that == null)
3047
        return false;
3048
      if (that instanceof createPayment_result)
3049
        return this.equals((createPayment_result)that);
3050
      return false;
3051
    }
3052
 
3053
    public boolean equals(createPayment_result that) {
3054
      if (that == null)
3055
        return false;
3056
 
420 ashish 3057
      boolean this_present_success = true;
3058
      boolean that_present_success = true;
123 ashish 3059
      if (this_present_success || that_present_success) {
3060
        if (!(this_present_success && that_present_success))
3061
          return false;
420 ashish 3062
        if (this.success != that.success)
123 ashish 3063
          return false;
3064
      }
3065
 
3066
      boolean this_present_pe = true && this.isSetPe();
3067
      boolean that_present_pe = true && that.isSetPe();
3068
      if (this_present_pe || that_present_pe) {
3069
        if (!(this_present_pe && that_present_pe))
3070
          return false;
3071
        if (!this.pe.equals(that.pe))
3072
          return false;
3073
      }
3074
 
3075
      return true;
3076
    }
3077
 
3078
    @Override
3079
    public int hashCode() {
3080
      return 0;
3081
    }
3082
 
420 ashish 3083
    public int compareTo(createPayment_result other) {
3084
      if (!getClass().equals(other.getClass())) {
3085
        return getClass().getName().compareTo(other.getClass().getName());
3086
      }
3087
 
3088
      int lastComparison = 0;
3089
      createPayment_result typedOther = (createPayment_result)other;
3090
 
3430 rajveer 3091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 3092
      if (lastComparison != 0) {
3093
        return lastComparison;
3094
      }
3430 rajveer 3095
      if (isSetSuccess()) {
3096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3097
        if (lastComparison != 0) {
3098
          return lastComparison;
3099
        }
420 ashish 3100
      }
3430 rajveer 3101
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 3102
      if (lastComparison != 0) {
3103
        return lastComparison;
3104
      }
3430 rajveer 3105
      if (isSetPe()) {
3106
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
3107
        if (lastComparison != 0) {
3108
          return lastComparison;
3109
        }
420 ashish 3110
      }
3111
      return 0;
3112
    }
3113
 
3430 rajveer 3114
    public _Fields fieldForId(int fieldId) {
3115
      return _Fields.findByThriftId(fieldId);
3116
    }
3117
 
3118
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3119
      org.apache.thrift.protocol.TField field;
123 ashish 3120
      iprot.readStructBegin();
3121
      while (true)
3122
      {
3123
        field = iprot.readFieldBegin();
3430 rajveer 3124
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3125
          break;
3126
        }
3430 rajveer 3127
        switch (field.id) {
3128
          case 0: // SUCCESS
3129
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3130
              this.success = iprot.readI64();
3131
              setSuccessIsSet(true);
3132
            } else { 
3133
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3134
            }
3135
            break;
3136
          case 1: // PE
3137
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3138
              this.pe = new PaymentException();
3139
              this.pe.read(iprot);
3140
            } else { 
3141
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3142
            }
3143
            break;
3144
          default:
3145
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3146
        }
3430 rajveer 3147
        iprot.readFieldEnd();
123 ashish 3148
      }
3149
      iprot.readStructEnd();
3150
      validate();
3151
    }
3152
 
3430 rajveer 3153
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3154
      oprot.writeStructBegin(STRUCT_DESC);
3155
 
3156
      if (this.isSetSuccess()) {
3157
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 3158
        oprot.writeI64(this.success);
123 ashish 3159
        oprot.writeFieldEnd();
3160
      } else if (this.isSetPe()) {
3161
        oprot.writeFieldBegin(PE_FIELD_DESC);
3162
        this.pe.write(oprot);
3163
        oprot.writeFieldEnd();
3164
      }
3165
      oprot.writeFieldStop();
3166
      oprot.writeStructEnd();
3167
    }
3168
 
3169
    @Override
3170
    public String toString() {
3171
      StringBuilder sb = new StringBuilder("createPayment_result(");
3172
      boolean first = true;
3173
 
3174
      sb.append("success:");
420 ashish 3175
      sb.append(this.success);
123 ashish 3176
      first = false;
3177
      if (!first) sb.append(", ");
3178
      sb.append("pe:");
3179
      if (this.pe == null) {
3180
        sb.append("null");
3181
      } else {
3182
        sb.append(this.pe);
3183
      }
3184
      first = false;
3185
      sb.append(")");
3186
      return sb.toString();
3187
    }
3188
 
3430 rajveer 3189
    public void validate() throws org.apache.thrift.TException {
123 ashish 3190
      // check for required fields
3191
    }
3192
 
3430 rajveer 3193
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3194
      try {
3195
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3196
      } catch (org.apache.thrift.TException te) {
3197
        throw new java.io.IOException(te);
3198
      }
3199
    }
3200
 
3201
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3202
      try {
3203
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3204
      } catch (org.apache.thrift.TException te) {
3205
        throw new java.io.IOException(te);
3206
      }
3207
    }
3208
 
123 ashish 3209
  }
3210
 
3430 rajveer 3211
  public static class getPaymentsForUser_args implements org.apache.thrift.TBase<getPaymentsForUser_args, getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable   {
3212
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_args");
123 ashish 3213
 
3430 rajveer 3214
    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);
3215
    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);
3216
    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);
3217
    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);
3218
    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 3219
 
3430 rajveer 3220
    private long userId; // required
3221
    private long fromTime; // required
3222
    private long toTime; // required
3223
    private PaymentStatus status; // required
3224
    private long gatewayId; // required
123 ashish 3225
 
3226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3227
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3228
      USER_ID((short)1, "userId"),
695 rajveer 3229
      FROM_TIME((short)2, "fromTime"),
3230
      TO_TIME((short)3, "toTime"),
123 ashish 3231
      /**
3232
       * 
3233
       * @see PaymentStatus
3234
       */
3235
      STATUS((short)4, "status"),
695 rajveer 3236
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 3237
 
3238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3239
 
3240
      static {
3241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3242
          byName.put(field.getFieldName(), field);
3243
        }
3244
      }
3245
 
3246
      /**
3247
       * Find the _Fields constant that matches fieldId, or null if its not found.
3248
       */
3249
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3250
        switch(fieldId) {
3251
          case 1: // USER_ID
3252
            return USER_ID;
3253
          case 2: // FROM_TIME
3254
            return FROM_TIME;
3255
          case 3: // TO_TIME
3256
            return TO_TIME;
3257
          case 4: // STATUS
3258
            return STATUS;
3259
          case 5: // GATEWAY_ID
3260
            return GATEWAY_ID;
3261
          default:
3262
            return null;
3263
        }
123 ashish 3264
      }
3265
 
3266
      /**
3267
       * Find the _Fields constant that matches fieldId, throwing an exception
3268
       * if it is not found.
3269
       */
3270
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3271
        _Fields fields = findByThriftId(fieldId);
3272
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3273
        return fields;
3274
      }
3275
 
3276
      /**
3277
       * Find the _Fields constant that matches name, or null if its not found.
3278
       */
3279
      public static _Fields findByName(String name) {
3280
        return byName.get(name);
3281
      }
3282
 
3283
      private final short _thriftId;
3284
      private final String _fieldName;
3285
 
3286
      _Fields(short thriftId, String fieldName) {
3287
        _thriftId = thriftId;
3288
        _fieldName = fieldName;
3289
      }
3290
 
3291
      public short getThriftFieldId() {
3292
        return _thriftId;
3293
      }
3294
 
3295
      public String getFieldName() {
3296
        return _fieldName;
3297
      }
3298
    }
3299
 
3300
    // isset id assignments
3301
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 3302
    private static final int __FROMTIME_ISSET_ID = 1;
3303
    private static final int __TOTIME_ISSET_ID = 2;
3304
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 3305
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 3306
 
3430 rajveer 3307
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3308
    static {
3430 rajveer 3309
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3310
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3311
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3312
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3313
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3314
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3315
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3316
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3317
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
3318
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3319
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3320
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3321
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
123 ashish 3322
    }
3323
 
3324
    public getPaymentsForUser_args() {
3325
    }
3326
 
3327
    public getPaymentsForUser_args(
3328
      long userId,
695 rajveer 3329
      long fromTime,
3330
      long toTime,
123 ashish 3331
      PaymentStatus status,
695 rajveer 3332
      long gatewayId)
123 ashish 3333
    {
3334
      this();
3335
      this.userId = userId;
3336
      setUserIdIsSet(true);
695 rajveer 3337
      this.fromTime = fromTime;
3338
      setFromTimeIsSet(true);
3339
      this.toTime = toTime;
3340
      setToTimeIsSet(true);
123 ashish 3341
      this.status = status;
695 rajveer 3342
      this.gatewayId = gatewayId;
3343
      setGatewayIdIsSet(true);
123 ashish 3344
    }
3345
 
3346
    /**
3347
     * Performs a deep copy on <i>other</i>.
3348
     */
3349
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
3350
      __isset_bit_vector.clear();
3351
      __isset_bit_vector.or(other.__isset_bit_vector);
3352
      this.userId = other.userId;
695 rajveer 3353
      this.fromTime = other.fromTime;
3354
      this.toTime = other.toTime;
123 ashish 3355
      if (other.isSetStatus()) {
3356
        this.status = other.status;
3357
      }
695 rajveer 3358
      this.gatewayId = other.gatewayId;
123 ashish 3359
    }
3360
 
3361
    public getPaymentsForUser_args deepCopy() {
3362
      return new getPaymentsForUser_args(this);
3363
    }
3364
 
3430 rajveer 3365
    @Override
3366
    public void clear() {
3367
      setUserIdIsSet(false);
3368
      this.userId = 0;
3369
      setFromTimeIsSet(false);
3370
      this.fromTime = 0;
3371
      setToTimeIsSet(false);
3372
      this.toTime = 0;
3373
      this.status = null;
3374
      setGatewayIdIsSet(false);
3375
      this.gatewayId = 0;
123 ashish 3376
    }
3377
 
3378
    public long getUserId() {
3379
      return this.userId;
3380
    }
3381
 
3430 rajveer 3382
    public void setUserId(long userId) {
123 ashish 3383
      this.userId = userId;
3384
      setUserIdIsSet(true);
3385
    }
3386
 
3387
    public void unsetUserId() {
3388
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3389
    }
3390
 
3430 rajveer 3391
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
123 ashish 3392
    public boolean isSetUserId() {
3393
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3394
    }
3395
 
3396
    public void setUserIdIsSet(boolean value) {
3397
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3398
    }
3399
 
695 rajveer 3400
    public long getFromTime() {
3401
      return this.fromTime;
123 ashish 3402
    }
3403
 
3430 rajveer 3404
    public void setFromTime(long fromTime) {
695 rajveer 3405
      this.fromTime = fromTime;
3406
      setFromTimeIsSet(true);
123 ashish 3407
    }
3408
 
695 rajveer 3409
    public void unsetFromTime() {
3410
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3411
    }
3412
 
3430 rajveer 3413
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 3414
    public boolean isSetFromTime() {
3415
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3416
    }
3417
 
695 rajveer 3418
    public void setFromTimeIsSet(boolean value) {
3419
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3420
    }
3421
 
695 rajveer 3422
    public long getToTime() {
3423
      return this.toTime;
123 ashish 3424
    }
3425
 
3430 rajveer 3426
    public void setToTime(long toTime) {
695 rajveer 3427
      this.toTime = toTime;
3428
      setToTimeIsSet(true);
123 ashish 3429
    }
3430
 
695 rajveer 3431
    public void unsetToTime() {
3432
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3433
    }
3434
 
3430 rajveer 3435
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 3436
    public boolean isSetToTime() {
3437
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3438
    }
3439
 
695 rajveer 3440
    public void setToTimeIsSet(boolean value) {
3441
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3442
    }
3443
 
3444
    /**
3445
     * 
3446
     * @see PaymentStatus
3447
     */
3448
    public PaymentStatus getStatus() {
3449
      return this.status;
3450
    }
3451
 
3452
    /**
3453
     * 
3454
     * @see PaymentStatus
3455
     */
3430 rajveer 3456
    public void setStatus(PaymentStatus status) {
123 ashish 3457
      this.status = status;
3458
    }
3459
 
3460
    public void unsetStatus() {
3461
      this.status = null;
3462
    }
3463
 
3430 rajveer 3464
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 3465
    public boolean isSetStatus() {
3466
      return this.status != null;
3467
    }
3468
 
3469
    public void setStatusIsSet(boolean value) {
3470
      if (!value) {
3471
        this.status = null;
3472
      }
3473
    }
3474
 
695 rajveer 3475
    public long getGatewayId() {
3476
      return this.gatewayId;
123 ashish 3477
    }
3478
 
3430 rajveer 3479
    public void setGatewayId(long gatewayId) {
695 rajveer 3480
      this.gatewayId = gatewayId;
3481
      setGatewayIdIsSet(true);
123 ashish 3482
    }
3483
 
695 rajveer 3484
    public void unsetGatewayId() {
3485
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3486
    }
3487
 
3430 rajveer 3488
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 3489
    public boolean isSetGatewayId() {
3490
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3491
    }
3492
 
695 rajveer 3493
    public void setGatewayIdIsSet(boolean value) {
3494
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3495
    }
3496
 
3497
    public void setFieldValue(_Fields field, Object value) {
3498
      switch (field) {
3499
      case USER_ID:
3500
        if (value == null) {
3501
          unsetUserId();
3502
        } else {
3503
          setUserId((Long)value);
3504
        }
3505
        break;
3506
 
3507
      case FROM_TIME:
3508
        if (value == null) {
695 rajveer 3509
          unsetFromTime();
123 ashish 3510
        } else {
695 rajveer 3511
          setFromTime((Long)value);
123 ashish 3512
        }
3513
        break;
3514
 
3515
      case TO_TIME:
3516
        if (value == null) {
695 rajveer 3517
          unsetToTime();
123 ashish 3518
        } else {
695 rajveer 3519
          setToTime((Long)value);
123 ashish 3520
        }
3521
        break;
3522
 
3523
      case STATUS:
3524
        if (value == null) {
3525
          unsetStatus();
3526
        } else {
3527
          setStatus((PaymentStatus)value);
3528
        }
3529
        break;
3530
 
420 ashish 3531
      case GATEWAY_ID:
123 ashish 3532
        if (value == null) {
695 rajveer 3533
          unsetGatewayId();
123 ashish 3534
        } else {
695 rajveer 3535
          setGatewayId((Long)value);
123 ashish 3536
        }
3537
        break;
3538
 
3539
      }
3540
    }
3541
 
3542
    public Object getFieldValue(_Fields field) {
3543
      switch (field) {
3544
      case USER_ID:
3430 rajveer 3545
        return Long.valueOf(getUserId());
123 ashish 3546
 
3547
      case FROM_TIME:
3430 rajveer 3548
        return Long.valueOf(getFromTime());
123 ashish 3549
 
3550
      case TO_TIME:
3430 rajveer 3551
        return Long.valueOf(getToTime());
123 ashish 3552
 
3553
      case STATUS:
3554
        return getStatus();
3555
 
420 ashish 3556
      case GATEWAY_ID:
3430 rajveer 3557
        return Long.valueOf(getGatewayId());
123 ashish 3558
 
3559
      }
3560
      throw new IllegalStateException();
3561
    }
3562
 
3430 rajveer 3563
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3564
    public boolean isSet(_Fields field) {
3565
      if (field == null) {
3566
        throw new IllegalArgumentException();
3567
      }
123 ashish 3568
 
3569
      switch (field) {
3570
      case USER_ID:
3571
        return isSetUserId();
3572
      case FROM_TIME:
695 rajveer 3573
        return isSetFromTime();
123 ashish 3574
      case TO_TIME:
695 rajveer 3575
        return isSetToTime();
123 ashish 3576
      case STATUS:
3577
        return isSetStatus();
420 ashish 3578
      case GATEWAY_ID:
695 rajveer 3579
        return isSetGatewayId();
123 ashish 3580
      }
3581
      throw new IllegalStateException();
3582
    }
3583
 
3584
    @Override
3585
    public boolean equals(Object that) {
3586
      if (that == null)
3587
        return false;
3588
      if (that instanceof getPaymentsForUser_args)
3589
        return this.equals((getPaymentsForUser_args)that);
3590
      return false;
3591
    }
3592
 
3593
    public boolean equals(getPaymentsForUser_args that) {
3594
      if (that == null)
3595
        return false;
3596
 
3597
      boolean this_present_userId = true;
3598
      boolean that_present_userId = true;
3599
      if (this_present_userId || that_present_userId) {
3600
        if (!(this_present_userId && that_present_userId))
3601
          return false;
3602
        if (this.userId != that.userId)
3603
          return false;
3604
      }
3605
 
695 rajveer 3606
      boolean this_present_fromTime = true;
3607
      boolean that_present_fromTime = true;
3608
      if (this_present_fromTime || that_present_fromTime) {
3609
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3610
          return false;
695 rajveer 3611
        if (this.fromTime != that.fromTime)
123 ashish 3612
          return false;
3613
      }
3614
 
695 rajveer 3615
      boolean this_present_toTime = true;
3616
      boolean that_present_toTime = true;
3617
      if (this_present_toTime || that_present_toTime) {
3618
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3619
          return false;
695 rajveer 3620
        if (this.toTime != that.toTime)
123 ashish 3621
          return false;
3622
      }
3623
 
3624
      boolean this_present_status = true && this.isSetStatus();
3625
      boolean that_present_status = true && that.isSetStatus();
3626
      if (this_present_status || that_present_status) {
3627
        if (!(this_present_status && that_present_status))
3628
          return false;
3629
        if (!this.status.equals(that.status))
3630
          return false;
3631
      }
3632
 
695 rajveer 3633
      boolean this_present_gatewayId = true;
3634
      boolean that_present_gatewayId = true;
3635
      if (this_present_gatewayId || that_present_gatewayId) {
3636
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3637
          return false;
695 rajveer 3638
        if (this.gatewayId != that.gatewayId)
123 ashish 3639
          return false;
3640
      }
3641
 
3642
      return true;
3643
    }
3644
 
3645
    @Override
3646
    public int hashCode() {
3647
      return 0;
3648
    }
3649
 
3650
    public int compareTo(getPaymentsForUser_args other) {
3651
      if (!getClass().equals(other.getClass())) {
3652
        return getClass().getName().compareTo(other.getClass().getName());
3653
      }
3654
 
3655
      int lastComparison = 0;
3656
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
3657
 
3430 rajveer 3658
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 3659
      if (lastComparison != 0) {
3660
        return lastComparison;
3661
      }
3430 rajveer 3662
      if (isSetUserId()) {
3663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
3664
        if (lastComparison != 0) {
3665
          return lastComparison;
3666
        }
123 ashish 3667
      }
3430 rajveer 3668
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 3669
      if (lastComparison != 0) {
3670
        return lastComparison;
3671
      }
3430 rajveer 3672
      if (isSetFromTime()) {
3673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
3674
        if (lastComparison != 0) {
3675
          return lastComparison;
3676
        }
123 ashish 3677
      }
3430 rajveer 3678
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 3679
      if (lastComparison != 0) {
3680
        return lastComparison;
3681
      }
3430 rajveer 3682
      if (isSetToTime()) {
3683
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
3684
        if (lastComparison != 0) {
3685
          return lastComparison;
3686
        }
123 ashish 3687
      }
3430 rajveer 3688
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 3689
      if (lastComparison != 0) {
3690
        return lastComparison;
3691
      }
3430 rajveer 3692
      if (isSetStatus()) {
3693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3694
        if (lastComparison != 0) {
3695
          return lastComparison;
3696
        }
123 ashish 3697
      }
3430 rajveer 3698
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 3699
      if (lastComparison != 0) {
3700
        return lastComparison;
3701
      }
3430 rajveer 3702
      if (isSetGatewayId()) {
3703
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
3704
        if (lastComparison != 0) {
3705
          return lastComparison;
3706
        }
123 ashish 3707
      }
3708
      return 0;
3709
    }
3710
 
3430 rajveer 3711
    public _Fields fieldForId(int fieldId) {
3712
      return _Fields.findByThriftId(fieldId);
3713
    }
3714
 
3715
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3716
      org.apache.thrift.protocol.TField field;
123 ashish 3717
      iprot.readStructBegin();
3718
      while (true)
3719
      {
3720
        field = iprot.readFieldBegin();
3430 rajveer 3721
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3722
          break;
3723
        }
3430 rajveer 3724
        switch (field.id) {
3725
          case 1: // USER_ID
3726
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3727
              this.userId = iprot.readI64();
3728
              setUserIdIsSet(true);
3729
            } else { 
3730
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3731
            }
3732
            break;
3733
          case 2: // FROM_TIME
3734
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3735
              this.fromTime = iprot.readI64();
3736
              setFromTimeIsSet(true);
3737
            } else { 
3738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3739
            }
3740
            break;
3741
          case 3: // TO_TIME
3742
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3743
              this.toTime = iprot.readI64();
3744
              setToTimeIsSet(true);
3745
            } else { 
3746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3747
            }
3748
            break;
3749
          case 4: // STATUS
3750
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3751
              this.status = PaymentStatus.findByValue(iprot.readI32());
3752
            } else { 
3753
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3754
            }
3755
            break;
3756
          case 5: // GATEWAY_ID
3757
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3758
              this.gatewayId = iprot.readI64();
3759
              setGatewayIdIsSet(true);
3760
            } else { 
3761
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3762
            }
3763
            break;
3764
          default:
3765
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3766
        }
3430 rajveer 3767
        iprot.readFieldEnd();
123 ashish 3768
      }
3769
      iprot.readStructEnd();
3770
      validate();
3771
    }
3772
 
3430 rajveer 3773
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3774
      validate();
3775
 
3776
      oprot.writeStructBegin(STRUCT_DESC);
3777
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3778
      oprot.writeI64(this.userId);
3779
      oprot.writeFieldEnd();
3780
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3781
      oprot.writeI64(this.fromTime);
123 ashish 3782
      oprot.writeFieldEnd();
3783
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3784
      oprot.writeI64(this.toTime);
123 ashish 3785
      oprot.writeFieldEnd();
3786
      if (this.status != null) {
3787
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3788
        oprot.writeI32(this.status.getValue());
3789
        oprot.writeFieldEnd();
3790
      }
420 ashish 3791
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3792
      oprot.writeI64(this.gatewayId);
420 ashish 3793
      oprot.writeFieldEnd();
123 ashish 3794
      oprot.writeFieldStop();
3795
      oprot.writeStructEnd();
3796
    }
3797
 
3798
    @Override
3799
    public String toString() {
3800
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
3801
      boolean first = true;
3802
 
3803
      sb.append("userId:");
3804
      sb.append(this.userId);
3805
      first = false;
3806
      if (!first) sb.append(", ");
695 rajveer 3807
      sb.append("fromTime:");
3808
      sb.append(this.fromTime);
123 ashish 3809
      first = false;
3810
      if (!first) sb.append(", ");
695 rajveer 3811
      sb.append("toTime:");
3812
      sb.append(this.toTime);
123 ashish 3813
      first = false;
3814
      if (!first) sb.append(", ");
3815
      sb.append("status:");
3816
      if (this.status == null) {
3817
        sb.append("null");
3818
      } else {
3819
        sb.append(this.status);
3820
      }
3821
      first = false;
3822
      if (!first) sb.append(", ");
695 rajveer 3823
      sb.append("gatewayId:");
3824
      sb.append(this.gatewayId);
123 ashish 3825
      first = false;
3826
      sb.append(")");
3827
      return sb.toString();
3828
    }
3829
 
3430 rajveer 3830
    public void validate() throws org.apache.thrift.TException {
123 ashish 3831
      // check for required fields
3832
    }
3833
 
3430 rajveer 3834
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3835
      try {
3836
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3837
      } catch (org.apache.thrift.TException te) {
3838
        throw new java.io.IOException(te);
3839
      }
3840
    }
3841
 
3842
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3843
      try {
3844
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3845
      } catch (org.apache.thrift.TException te) {
3846
        throw new java.io.IOException(te);
3847
      }
3848
    }
3849
 
123 ashish 3850
  }
3851
 
3430 rajveer 3852
  public static class getPaymentsForUser_result implements org.apache.thrift.TBase<getPaymentsForUser_result, getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable   {
3853
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_result");
123 ashish 3854
 
3430 rajveer 3855
    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);
3856
    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 3857
 
3430 rajveer 3858
    private List<Payment> success; // required
3859
    private PaymentException pe; // required
123 ashish 3860
 
3861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3862
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3863
      SUCCESS((short)0, "success"),
3864
      PE((short)1, "pe");
3865
 
3866
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3867
 
3868
      static {
3869
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3870
          byName.put(field.getFieldName(), field);
3871
        }
3872
      }
3873
 
3874
      /**
3875
       * Find the _Fields constant that matches fieldId, or null if its not found.
3876
       */
3877
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3878
        switch(fieldId) {
3879
          case 0: // SUCCESS
3880
            return SUCCESS;
3881
          case 1: // PE
3882
            return PE;
3883
          default:
3884
            return null;
3885
        }
123 ashish 3886
      }
3887
 
3888
      /**
3889
       * Find the _Fields constant that matches fieldId, throwing an exception
3890
       * if it is not found.
3891
       */
3892
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3893
        _Fields fields = findByThriftId(fieldId);
3894
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3895
        return fields;
3896
      }
3897
 
3898
      /**
3899
       * Find the _Fields constant that matches name, or null if its not found.
3900
       */
3901
      public static _Fields findByName(String name) {
3902
        return byName.get(name);
3903
      }
3904
 
3905
      private final short _thriftId;
3906
      private final String _fieldName;
3907
 
3908
      _Fields(short thriftId, String fieldName) {
3909
        _thriftId = thriftId;
3910
        _fieldName = fieldName;
3911
      }
3912
 
3913
      public short getThriftFieldId() {
3914
        return _thriftId;
3915
      }
3916
 
3917
      public String getFieldName() {
3918
        return _fieldName;
3919
      }
3920
    }
3921
 
3922
    // isset id assignments
3923
 
3430 rajveer 3924
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3925
    static {
3430 rajveer 3926
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3927
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3928
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3929
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
3930
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3931
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3932
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3933
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
123 ashish 3934
    }
3935
 
3936
    public getPaymentsForUser_result() {
3937
    }
3938
 
3939
    public getPaymentsForUser_result(
3940
      List<Payment> success,
3941
      PaymentException pe)
3942
    {
3943
      this();
3944
      this.success = success;
3945
      this.pe = pe;
3946
    }
3947
 
3948
    /**
3949
     * Performs a deep copy on <i>other</i>.
3950
     */
3951
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
3952
      if (other.isSetSuccess()) {
3953
        List<Payment> __this__success = new ArrayList<Payment>();
3954
        for (Payment other_element : other.success) {
3955
          __this__success.add(new Payment(other_element));
3956
        }
3957
        this.success = __this__success;
3958
      }
3959
      if (other.isSetPe()) {
3960
        this.pe = new PaymentException(other.pe);
3961
      }
3962
    }
3963
 
3964
    public getPaymentsForUser_result deepCopy() {
3965
      return new getPaymentsForUser_result(this);
3966
    }
3967
 
3430 rajveer 3968
    @Override
3969
    public void clear() {
3970
      this.success = null;
3971
      this.pe = null;
123 ashish 3972
    }
3973
 
3974
    public int getSuccessSize() {
3975
      return (this.success == null) ? 0 : this.success.size();
3976
    }
3977
 
3978
    public java.util.Iterator<Payment> getSuccessIterator() {
3979
      return (this.success == null) ? null : this.success.iterator();
3980
    }
3981
 
3982
    public void addToSuccess(Payment elem) {
3983
      if (this.success == null) {
3984
        this.success = new ArrayList<Payment>();
3985
      }
3986
      this.success.add(elem);
3987
    }
3988
 
3989
    public List<Payment> getSuccess() {
3990
      return this.success;
3991
    }
3992
 
3430 rajveer 3993
    public void setSuccess(List<Payment> success) {
123 ashish 3994
      this.success = success;
3995
    }
3996
 
3997
    public void unsetSuccess() {
3998
      this.success = null;
3999
    }
4000
 
3430 rajveer 4001
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4002
    public boolean isSetSuccess() {
4003
      return this.success != null;
4004
    }
4005
 
4006
    public void setSuccessIsSet(boolean value) {
4007
      if (!value) {
4008
        this.success = null;
4009
      }
4010
    }
4011
 
4012
    public PaymentException getPe() {
4013
      return this.pe;
4014
    }
4015
 
3430 rajveer 4016
    public void setPe(PaymentException pe) {
123 ashish 4017
      this.pe = pe;
4018
    }
4019
 
4020
    public void unsetPe() {
4021
      this.pe = null;
4022
    }
4023
 
3430 rajveer 4024
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 4025
    public boolean isSetPe() {
4026
      return this.pe != null;
4027
    }
4028
 
4029
    public void setPeIsSet(boolean value) {
4030
      if (!value) {
4031
        this.pe = null;
4032
      }
4033
    }
4034
 
4035
    public void setFieldValue(_Fields field, Object value) {
4036
      switch (field) {
4037
      case SUCCESS:
4038
        if (value == null) {
4039
          unsetSuccess();
4040
        } else {
4041
          setSuccess((List<Payment>)value);
4042
        }
4043
        break;
4044
 
4045
      case PE:
4046
        if (value == null) {
4047
          unsetPe();
4048
        } else {
4049
          setPe((PaymentException)value);
4050
        }
4051
        break;
4052
 
4053
      }
4054
    }
4055
 
4056
    public Object getFieldValue(_Fields field) {
4057
      switch (field) {
4058
      case SUCCESS:
4059
        return getSuccess();
4060
 
4061
      case PE:
4062
        return getPe();
4063
 
4064
      }
4065
      throw new IllegalStateException();
4066
    }
4067
 
3430 rajveer 4068
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4069
    public boolean isSet(_Fields field) {
4070
      if (field == null) {
4071
        throw new IllegalArgumentException();
4072
      }
123 ashish 4073
 
4074
      switch (field) {
4075
      case SUCCESS:
4076
        return isSetSuccess();
4077
      case PE:
4078
        return isSetPe();
4079
      }
4080
      throw new IllegalStateException();
4081
    }
4082
 
4083
    @Override
4084
    public boolean equals(Object that) {
4085
      if (that == null)
4086
        return false;
4087
      if (that instanceof getPaymentsForUser_result)
4088
        return this.equals((getPaymentsForUser_result)that);
4089
      return false;
4090
    }
4091
 
4092
    public boolean equals(getPaymentsForUser_result that) {
4093
      if (that == null)
4094
        return false;
4095
 
4096
      boolean this_present_success = true && this.isSetSuccess();
4097
      boolean that_present_success = true && that.isSetSuccess();
4098
      if (this_present_success || that_present_success) {
4099
        if (!(this_present_success && that_present_success))
4100
          return false;
4101
        if (!this.success.equals(that.success))
4102
          return false;
4103
      }
4104
 
4105
      boolean this_present_pe = true && this.isSetPe();
4106
      boolean that_present_pe = true && that.isSetPe();
4107
      if (this_present_pe || that_present_pe) {
4108
        if (!(this_present_pe && that_present_pe))
4109
          return false;
4110
        if (!this.pe.equals(that.pe))
4111
          return false;
4112
      }
4113
 
4114
      return true;
4115
    }
4116
 
4117
    @Override
4118
    public int hashCode() {
4119
      return 0;
4120
    }
4121
 
695 rajveer 4122
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 4123
      if (!getClass().equals(other.getClass())) {
4124
        return getClass().getName().compareTo(other.getClass().getName());
4125
      }
4126
 
4127
      int lastComparison = 0;
695 rajveer 4128
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 4129
 
3430 rajveer 4130
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 4131
      if (lastComparison != 0) {
4132
        return lastComparison;
4133
      }
3430 rajveer 4134
      if (isSetSuccess()) {
4135
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4136
        if (lastComparison != 0) {
4137
          return lastComparison;
4138
        }
123 ashish 4139
      }
3430 rajveer 4140
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
123 ashish 4141
      if (lastComparison != 0) {
4142
        return lastComparison;
4143
      }
3430 rajveer 4144
      if (isSetPe()) {
4145
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
4146
        if (lastComparison != 0) {
4147
          return lastComparison;
4148
        }
123 ashish 4149
      }
4150
      return 0;
4151
    }
4152
 
3430 rajveer 4153
    public _Fields fieldForId(int fieldId) {
4154
      return _Fields.findByThriftId(fieldId);
4155
    }
4156
 
4157
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4158
      org.apache.thrift.protocol.TField field;
123 ashish 4159
      iprot.readStructBegin();
4160
      while (true)
4161
      {
4162
        field = iprot.readFieldBegin();
3430 rajveer 4163
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4164
          break;
4165
        }
3430 rajveer 4166
        switch (field.id) {
4167
          case 0: // SUCCESS
4168
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4169
              {
4170
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
4171
                this.success = new ArrayList<Payment>(_list12.size);
4172
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
123 ashish 4173
                {
3430 rajveer 4174
                  Payment _elem14; // required
4175
                  _elem14 = new Payment();
4176
                  _elem14.read(iprot);
4177
                  this.success.add(_elem14);
123 ashish 4178
                }
3430 rajveer 4179
                iprot.readListEnd();
123 ashish 4180
              }
3430 rajveer 4181
            } else { 
4182
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4183
            }
4184
            break;
4185
          case 1: // PE
4186
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4187
              this.pe = new PaymentException();
4188
              this.pe.read(iprot);
4189
            } else { 
4190
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4191
            }
4192
            break;
4193
          default:
4194
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4195
        }
3430 rajveer 4196
        iprot.readFieldEnd();
123 ashish 4197
      }
4198
      iprot.readStructEnd();
4199
      validate();
4200
    }
4201
 
3430 rajveer 4202
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4203
      oprot.writeStructBegin(STRUCT_DESC);
4204
 
4205
      if (this.isSetSuccess()) {
4206
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4207
        {
3430 rajveer 4208
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 4209
          for (Payment _iter15 : this.success)
123 ashish 4210
          {
2747 chandransh 4211
            _iter15.write(oprot);
123 ashish 4212
          }
4213
          oprot.writeListEnd();
4214
        }
4215
        oprot.writeFieldEnd();
4216
      } else if (this.isSetPe()) {
4217
        oprot.writeFieldBegin(PE_FIELD_DESC);
4218
        this.pe.write(oprot);
4219
        oprot.writeFieldEnd();
4220
      }
4221
      oprot.writeFieldStop();
4222
      oprot.writeStructEnd();
4223
    }
4224
 
4225
    @Override
4226
    public String toString() {
695 rajveer 4227
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 4228
      boolean first = true;
4229
 
4230
      sb.append("success:");
4231
      if (this.success == null) {
4232
        sb.append("null");
4233
      } else {
4234
        sb.append(this.success);
4235
      }
4236
      first = false;
4237
      if (!first) sb.append(", ");
4238
      sb.append("pe:");
4239
      if (this.pe == null) {
4240
        sb.append("null");
4241
      } else {
4242
        sb.append(this.pe);
4243
      }
4244
      first = false;
4245
      sb.append(")");
4246
      return sb.toString();
4247
    }
4248
 
3430 rajveer 4249
    public void validate() throws org.apache.thrift.TException {
123 ashish 4250
      // check for required fields
4251
    }
4252
 
3430 rajveer 4253
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4254
      try {
4255
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4256
      } catch (org.apache.thrift.TException te) {
4257
        throw new java.io.IOException(te);
4258
      }
4259
    }
4260
 
4261
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4262
      try {
4263
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4264
      } catch (org.apache.thrift.TException te) {
4265
        throw new java.io.IOException(te);
4266
      }
4267
    }
4268
 
123 ashish 4269
  }
4270
 
3430 rajveer 4271
  public static class getPayments_args implements org.apache.thrift.TBase<getPayments_args, getPayments_args._Fields>, java.io.Serializable, Cloneable   {
4272
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_args");
123 ashish 4273
 
3430 rajveer 4274
    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);
4275
    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);
4276
    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);
4277
    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 4278
 
3430 rajveer 4279
    private long fromTime; // required
4280
    private long toTime; // required
4281
    private PaymentStatus status; // required
4282
    private long gatewayId; // required
123 ashish 4283
 
4284
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4285
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 4286
      FROM_TIME((short)1, "fromTime"),
4287
      TO_TIME((short)2, "toTime"),
123 ashish 4288
      /**
4289
       * 
4290
       * @see PaymentStatus
4291
       */
4292
      STATUS((short)3, "status"),
695 rajveer 4293
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 4294
 
4295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4296
 
4297
      static {
4298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4299
          byName.put(field.getFieldName(), field);
4300
        }
4301
      }
4302
 
4303
      /**
4304
       * Find the _Fields constant that matches fieldId, or null if its not found.
4305
       */
4306
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4307
        switch(fieldId) {
4308
          case 1: // FROM_TIME
4309
            return FROM_TIME;
4310
          case 2: // TO_TIME
4311
            return TO_TIME;
4312
          case 3: // STATUS
4313
            return STATUS;
4314
          case 4: // GATEWAY_ID
4315
            return GATEWAY_ID;
4316
          default:
4317
            return null;
4318
        }
123 ashish 4319
      }
4320
 
4321
      /**
4322
       * Find the _Fields constant that matches fieldId, throwing an exception
4323
       * if it is not found.
4324
       */
4325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4326
        _Fields fields = findByThriftId(fieldId);
4327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4328
        return fields;
4329
      }
4330
 
4331
      /**
4332
       * Find the _Fields constant that matches name, or null if its not found.
4333
       */
4334
      public static _Fields findByName(String name) {
4335
        return byName.get(name);
4336
      }
4337
 
4338
      private final short _thriftId;
4339
      private final String _fieldName;
4340
 
4341
      _Fields(short thriftId, String fieldName) {
4342
        _thriftId = thriftId;
4343
        _fieldName = fieldName;
4344
      }
4345
 
4346
      public short getThriftFieldId() {
4347
        return _thriftId;
4348
      }
4349
 
4350
      public String getFieldName() {
4351
        return _fieldName;
4352
      }
4353
    }
4354
 
4355
    // isset id assignments
695 rajveer 4356
    private static final int __FROMTIME_ISSET_ID = 0;
4357
    private static final int __TOTIME_ISSET_ID = 1;
4358
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 4359
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 4360
 
3430 rajveer 4361
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4362
    static {
3430 rajveer 4363
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4364
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4365
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4366
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4367
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4368
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4369
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
4370
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4371
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4372
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4373
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
123 ashish 4374
    }
4375
 
4376
    public getPayments_args() {
4377
    }
4378
 
4379
    public getPayments_args(
695 rajveer 4380
      long fromTime,
4381
      long toTime,
123 ashish 4382
      PaymentStatus status,
695 rajveer 4383
      long gatewayId)
123 ashish 4384
    {
4385
      this();
695 rajveer 4386
      this.fromTime = fromTime;
4387
      setFromTimeIsSet(true);
4388
      this.toTime = toTime;
4389
      setToTimeIsSet(true);
123 ashish 4390
      this.status = status;
695 rajveer 4391
      this.gatewayId = gatewayId;
4392
      setGatewayIdIsSet(true);
123 ashish 4393
    }
4394
 
4395
    /**
4396
     * Performs a deep copy on <i>other</i>.
4397
     */
4398
    public getPayments_args(getPayments_args other) {
4399
      __isset_bit_vector.clear();
4400
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 4401
      this.fromTime = other.fromTime;
4402
      this.toTime = other.toTime;
123 ashish 4403
      if (other.isSetStatus()) {
4404
        this.status = other.status;
4405
      }
695 rajveer 4406
      this.gatewayId = other.gatewayId;
123 ashish 4407
    }
4408
 
4409
    public getPayments_args deepCopy() {
4410
      return new getPayments_args(this);
4411
    }
4412
 
3430 rajveer 4413
    @Override
4414
    public void clear() {
4415
      setFromTimeIsSet(false);
4416
      this.fromTime = 0;
4417
      setToTimeIsSet(false);
4418
      this.toTime = 0;
4419
      this.status = null;
4420
      setGatewayIdIsSet(false);
4421
      this.gatewayId = 0;
123 ashish 4422
    }
4423
 
695 rajveer 4424
    public long getFromTime() {
4425
      return this.fromTime;
123 ashish 4426
    }
4427
 
3430 rajveer 4428
    public void setFromTime(long fromTime) {
695 rajveer 4429
      this.fromTime = fromTime;
4430
      setFromTimeIsSet(true);
123 ashish 4431
    }
4432
 
695 rajveer 4433
    public void unsetFromTime() {
4434
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 4435
    }
4436
 
3430 rajveer 4437
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 4438
    public boolean isSetFromTime() {
4439
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 4440
    }
4441
 
695 rajveer 4442
    public void setFromTimeIsSet(boolean value) {
4443
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 4444
    }
4445
 
695 rajveer 4446
    public long getToTime() {
4447
      return this.toTime;
123 ashish 4448
    }
4449
 
3430 rajveer 4450
    public void setToTime(long toTime) {
695 rajveer 4451
      this.toTime = toTime;
4452
      setToTimeIsSet(true);
123 ashish 4453
    }
4454
 
695 rajveer 4455
    public void unsetToTime() {
4456
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 4457
    }
4458
 
3430 rajveer 4459
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 4460
    public boolean isSetToTime() {
4461
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 4462
    }
4463
 
695 rajveer 4464
    public void setToTimeIsSet(boolean value) {
4465
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 4466
    }
4467
 
4468
    /**
4469
     * 
4470
     * @see PaymentStatus
4471
     */
4472
    public PaymentStatus getStatus() {
4473
      return this.status;
4474
    }
4475
 
4476
    /**
4477
     * 
4478
     * @see PaymentStatus
4479
     */
3430 rajveer 4480
    public void setStatus(PaymentStatus status) {
123 ashish 4481
      this.status = status;
4482
    }
4483
 
4484
    public void unsetStatus() {
4485
      this.status = null;
4486
    }
4487
 
3430 rajveer 4488
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 4489
    public boolean isSetStatus() {
4490
      return this.status != null;
4491
    }
4492
 
4493
    public void setStatusIsSet(boolean value) {
4494
      if (!value) {
4495
        this.status = null;
4496
      }
4497
    }
4498
 
695 rajveer 4499
    public long getGatewayId() {
4500
      return this.gatewayId;
123 ashish 4501
    }
4502
 
3430 rajveer 4503
    public void setGatewayId(long gatewayId) {
695 rajveer 4504
      this.gatewayId = gatewayId;
4505
      setGatewayIdIsSet(true);
123 ashish 4506
    }
4507
 
695 rajveer 4508
    public void unsetGatewayId() {
4509
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 4510
    }
4511
 
3430 rajveer 4512
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 4513
    public boolean isSetGatewayId() {
4514
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 4515
    }
4516
 
695 rajveer 4517
    public void setGatewayIdIsSet(boolean value) {
4518
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 4519
    }
4520
 
4521
    public void setFieldValue(_Fields field, Object value) {
4522
      switch (field) {
4523
      case FROM_TIME:
4524
        if (value == null) {
695 rajveer 4525
          unsetFromTime();
123 ashish 4526
        } else {
695 rajveer 4527
          setFromTime((Long)value);
123 ashish 4528
        }
4529
        break;
4530
 
4531
      case TO_TIME:
4532
        if (value == null) {
695 rajveer 4533
          unsetToTime();
123 ashish 4534
        } else {
695 rajveer 4535
          setToTime((Long)value);
123 ashish 4536
        }
4537
        break;
4538
 
4539
      case STATUS:
4540
        if (value == null) {
4541
          unsetStatus();
4542
        } else {
4543
          setStatus((PaymentStatus)value);
4544
        }
4545
        break;
4546
 
420 ashish 4547
      case GATEWAY_ID:
123 ashish 4548
        if (value == null) {
695 rajveer 4549
          unsetGatewayId();
123 ashish 4550
        } else {
695 rajveer 4551
          setGatewayId((Long)value);
123 ashish 4552
        }
4553
        break;
4554
 
4555
      }
4556
    }
4557
 
4558
    public Object getFieldValue(_Fields field) {
4559
      switch (field) {
4560
      case FROM_TIME:
3430 rajveer 4561
        return Long.valueOf(getFromTime());
123 ashish 4562
 
4563
      case TO_TIME:
3430 rajveer 4564
        return Long.valueOf(getToTime());
123 ashish 4565
 
4566
      case STATUS:
4567
        return getStatus();
4568
 
420 ashish 4569
      case GATEWAY_ID:
3430 rajveer 4570
        return Long.valueOf(getGatewayId());
123 ashish 4571
 
4572
      }
4573
      throw new IllegalStateException();
4574
    }
4575
 
3430 rajveer 4576
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4577
    public boolean isSet(_Fields field) {
4578
      if (field == null) {
4579
        throw new IllegalArgumentException();
4580
      }
123 ashish 4581
 
4582
      switch (field) {
4583
      case FROM_TIME:
695 rajveer 4584
        return isSetFromTime();
123 ashish 4585
      case TO_TIME:
695 rajveer 4586
        return isSetToTime();
123 ashish 4587
      case STATUS:
4588
        return isSetStatus();
420 ashish 4589
      case GATEWAY_ID:
695 rajveer 4590
        return isSetGatewayId();
123 ashish 4591
      }
4592
      throw new IllegalStateException();
4593
    }
4594
 
4595
    @Override
4596
    public boolean equals(Object that) {
4597
      if (that == null)
4598
        return false;
4599
      if (that instanceof getPayments_args)
4600
        return this.equals((getPayments_args)that);
4601
      return false;
4602
    }
4603
 
4604
    public boolean equals(getPayments_args that) {
4605
      if (that == null)
4606
        return false;
4607
 
695 rajveer 4608
      boolean this_present_fromTime = true;
4609
      boolean that_present_fromTime = true;
4610
      if (this_present_fromTime || that_present_fromTime) {
4611
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 4612
          return false;
695 rajveer 4613
        if (this.fromTime != that.fromTime)
123 ashish 4614
          return false;
4615
      }
4616
 
695 rajveer 4617
      boolean this_present_toTime = true;
4618
      boolean that_present_toTime = true;
4619
      if (this_present_toTime || that_present_toTime) {
4620
        if (!(this_present_toTime && that_present_toTime))
123 ashish 4621
          return false;
695 rajveer 4622
        if (this.toTime != that.toTime)
123 ashish 4623
          return false;
4624
      }
4625
 
4626
      boolean this_present_status = true && this.isSetStatus();
4627
      boolean that_present_status = true && that.isSetStatus();
4628
      if (this_present_status || that_present_status) {
4629
        if (!(this_present_status && that_present_status))
4630
          return false;
4631
        if (!this.status.equals(that.status))
4632
          return false;
4633
      }
4634
 
695 rajveer 4635
      boolean this_present_gatewayId = true;
4636
      boolean that_present_gatewayId = true;
4637
      if (this_present_gatewayId || that_present_gatewayId) {
4638
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 4639
          return false;
695 rajveer 4640
        if (this.gatewayId != that.gatewayId)
123 ashish 4641
          return false;
4642
      }
4643
 
4644
      return true;
4645
    }
4646
 
4647
    @Override
4648
    public int hashCode() {
4649
      return 0;
4650
    }
4651
 
4652
    public int compareTo(getPayments_args other) {
4653
      if (!getClass().equals(other.getClass())) {
4654
        return getClass().getName().compareTo(other.getClass().getName());
4655
      }
4656
 
4657
      int lastComparison = 0;
4658
      getPayments_args typedOther = (getPayments_args)other;
4659
 
3430 rajveer 4660
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 4661
      if (lastComparison != 0) {
4662
        return lastComparison;
4663
      }
3430 rajveer 4664
      if (isSetFromTime()) {
4665
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
4666
        if (lastComparison != 0) {
4667
          return lastComparison;
4668
        }
123 ashish 4669
      }
3430 rajveer 4670
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 4671
      if (lastComparison != 0) {
4672
        return lastComparison;
4673
      }
3430 rajveer 4674
      if (isSetToTime()) {
4675
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
4676
        if (lastComparison != 0) {
4677
          return lastComparison;
4678
        }
123 ashish 4679
      }
3430 rajveer 4680
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 4681
      if (lastComparison != 0) {
4682
        return lastComparison;
4683
      }
3430 rajveer 4684
      if (isSetStatus()) {
4685
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4686
        if (lastComparison != 0) {
4687
          return lastComparison;
4688
        }
123 ashish 4689
      }
3430 rajveer 4690
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 4691
      if (lastComparison != 0) {
4692
        return lastComparison;
4693
      }
3430 rajveer 4694
      if (isSetGatewayId()) {
4695
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
4696
        if (lastComparison != 0) {
4697
          return lastComparison;
4698
        }
123 ashish 4699
      }
4700
      return 0;
4701
    }
4702
 
3430 rajveer 4703
    public _Fields fieldForId(int fieldId) {
4704
      return _Fields.findByThriftId(fieldId);
4705
    }
4706
 
4707
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4708
      org.apache.thrift.protocol.TField field;
123 ashish 4709
      iprot.readStructBegin();
4710
      while (true)
4711
      {
4712
        field = iprot.readFieldBegin();
3430 rajveer 4713
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4714
          break;
4715
        }
3430 rajveer 4716
        switch (field.id) {
4717
          case 1: // FROM_TIME
4718
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4719
              this.fromTime = iprot.readI64();
4720
              setFromTimeIsSet(true);
4721
            } else { 
4722
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4723
            }
4724
            break;
4725
          case 2: // TO_TIME
4726
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4727
              this.toTime = iprot.readI64();
4728
              setToTimeIsSet(true);
4729
            } else { 
4730
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4731
            }
4732
            break;
4733
          case 3: // STATUS
4734
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4735
              this.status = PaymentStatus.findByValue(iprot.readI32());
4736
            } else { 
4737
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4738
            }
4739
            break;
4740
          case 4: // GATEWAY_ID
4741
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4742
              this.gatewayId = iprot.readI64();
4743
              setGatewayIdIsSet(true);
4744
            } else { 
4745
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4746
            }
4747
            break;
4748
          default:
4749
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4750
        }
3430 rajveer 4751
        iprot.readFieldEnd();
123 ashish 4752
      }
4753
      iprot.readStructEnd();
4754
      validate();
4755
    }
4756
 
3430 rajveer 4757
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4758
      validate();
4759
 
4760
      oprot.writeStructBegin(STRUCT_DESC);
4761
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 4762
      oprot.writeI64(this.fromTime);
123 ashish 4763
      oprot.writeFieldEnd();
4764
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 4765
      oprot.writeI64(this.toTime);
123 ashish 4766
      oprot.writeFieldEnd();
4767
      if (this.status != null) {
4768
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4769
        oprot.writeI32(this.status.getValue());
4770
        oprot.writeFieldEnd();
4771
      }
420 ashish 4772
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 4773
      oprot.writeI64(this.gatewayId);
420 ashish 4774
      oprot.writeFieldEnd();
123 ashish 4775
      oprot.writeFieldStop();
4776
      oprot.writeStructEnd();
4777
    }
4778
 
4779
    @Override
4780
    public String toString() {
4781
      StringBuilder sb = new StringBuilder("getPayments_args(");
4782
      boolean first = true;
4783
 
695 rajveer 4784
      sb.append("fromTime:");
4785
      sb.append(this.fromTime);
123 ashish 4786
      first = false;
4787
      if (!first) sb.append(", ");
695 rajveer 4788
      sb.append("toTime:");
4789
      sb.append(this.toTime);
123 ashish 4790
      first = false;
4791
      if (!first) sb.append(", ");
4792
      sb.append("status:");
4793
      if (this.status == null) {
4794
        sb.append("null");
4795
      } else {
4796
        sb.append(this.status);
4797
      }
4798
      first = false;
4799
      if (!first) sb.append(", ");
695 rajveer 4800
      sb.append("gatewayId:");
4801
      sb.append(this.gatewayId);
123 ashish 4802
      first = false;
4803
      sb.append(")");
4804
      return sb.toString();
4805
    }
4806
 
3430 rajveer 4807
    public void validate() throws org.apache.thrift.TException {
123 ashish 4808
      // check for required fields
4809
    }
4810
 
3430 rajveer 4811
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4812
      try {
4813
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4814
      } catch (org.apache.thrift.TException te) {
4815
        throw new java.io.IOException(te);
4816
      }
4817
    }
4818
 
4819
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4820
      try {
4821
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4822
      } catch (org.apache.thrift.TException te) {
4823
        throw new java.io.IOException(te);
4824
      }
4825
    }
4826
 
123 ashish 4827
  }
4828
 
3430 rajveer 4829
  public static class getPayments_result implements org.apache.thrift.TBase<getPayments_result, getPayments_result._Fields>, java.io.Serializable, Cloneable   {
4830
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_result");
123 ashish 4831
 
3430 rajveer 4832
    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);
4833
    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 4834
 
3430 rajveer 4835
    private List<Payment> success; // required
4836
    private PaymentException pe; // required
123 ashish 4837
 
4838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4839
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 4840
      SUCCESS((short)0, "success"),
4841
      PE((short)1, "pe");
4842
 
4843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4844
 
4845
      static {
4846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4847
          byName.put(field.getFieldName(), field);
4848
        }
4849
      }
4850
 
4851
      /**
4852
       * Find the _Fields constant that matches fieldId, or null if its not found.
4853
       */
4854
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4855
        switch(fieldId) {
4856
          case 0: // SUCCESS
4857
            return SUCCESS;
4858
          case 1: // PE
4859
            return PE;
4860
          default:
4861
            return null;
4862
        }
123 ashish 4863
      }
4864
 
4865
      /**
4866
       * Find the _Fields constant that matches fieldId, throwing an exception
4867
       * if it is not found.
4868
       */
4869
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4870
        _Fields fields = findByThriftId(fieldId);
4871
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4872
        return fields;
4873
      }
4874
 
4875
      /**
4876
       * Find the _Fields constant that matches name, or null if its not found.
4877
       */
4878
      public static _Fields findByName(String name) {
4879
        return byName.get(name);
4880
      }
4881
 
4882
      private final short _thriftId;
4883
      private final String _fieldName;
4884
 
4885
      _Fields(short thriftId, String fieldName) {
4886
        _thriftId = thriftId;
4887
        _fieldName = fieldName;
4888
      }
4889
 
4890
      public short getThriftFieldId() {
4891
        return _thriftId;
4892
      }
4893
 
4894
      public String getFieldName() {
4895
        return _fieldName;
4896
      }
4897
    }
4898
 
4899
    // isset id assignments
4900
 
3430 rajveer 4901
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4902
    static {
3430 rajveer 4903
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4904
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4905
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4906
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
4907
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4908
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4909
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4910
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
123 ashish 4911
    }
4912
 
4913
    public getPayments_result() {
4914
    }
4915
 
4916
    public getPayments_result(
4917
      List<Payment> success,
4918
      PaymentException pe)
4919
    {
4920
      this();
4921
      this.success = success;
4922
      this.pe = pe;
4923
    }
4924
 
4925
    /**
4926
     * Performs a deep copy on <i>other</i>.
4927
     */
4928
    public getPayments_result(getPayments_result other) {
4929
      if (other.isSetSuccess()) {
4930
        List<Payment> __this__success = new ArrayList<Payment>();
4931
        for (Payment other_element : other.success) {
4932
          __this__success.add(new Payment(other_element));
4933
        }
4934
        this.success = __this__success;
4935
      }
4936
      if (other.isSetPe()) {
4937
        this.pe = new PaymentException(other.pe);
4938
      }
4939
    }
4940
 
4941
    public getPayments_result deepCopy() {
4942
      return new getPayments_result(this);
4943
    }
4944
 
3430 rajveer 4945
    @Override
4946
    public void clear() {
4947
      this.success = null;
4948
      this.pe = null;
123 ashish 4949
    }
4950
 
4951
    public int getSuccessSize() {
4952
      return (this.success == null) ? 0 : this.success.size();
4953
    }
4954
 
4955
    public java.util.Iterator<Payment> getSuccessIterator() {
4956
      return (this.success == null) ? null : this.success.iterator();
4957
    }
4958
 
4959
    public void addToSuccess(Payment elem) {
4960
      if (this.success == null) {
4961
        this.success = new ArrayList<Payment>();
4962
      }
4963
      this.success.add(elem);
4964
    }
4965
 
4966
    public List<Payment> getSuccess() {
4967
      return this.success;
4968
    }
4969
 
3430 rajveer 4970
    public void setSuccess(List<Payment> success) {
123 ashish 4971
      this.success = success;
4972
    }
4973
 
4974
    public void unsetSuccess() {
4975
      this.success = null;
4976
    }
4977
 
3430 rajveer 4978
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4979
    public boolean isSetSuccess() {
4980
      return this.success != null;
4981
    }
4982
 
4983
    public void setSuccessIsSet(boolean value) {
4984
      if (!value) {
4985
        this.success = null;
4986
      }
4987
    }
4988
 
4989
    public PaymentException getPe() {
4990
      return this.pe;
4991
    }
4992
 
3430 rajveer 4993
    public void setPe(PaymentException pe) {
123 ashish 4994
      this.pe = pe;
4995
    }
4996
 
4997
    public void unsetPe() {
4998
      this.pe = null;
4999
    }
5000
 
3430 rajveer 5001
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 5002
    public boolean isSetPe() {
5003
      return this.pe != null;
5004
    }
5005
 
5006
    public void setPeIsSet(boolean value) {
5007
      if (!value) {
5008
        this.pe = null;
5009
      }
5010
    }
5011
 
5012
    public void setFieldValue(_Fields field, Object value) {
5013
      switch (field) {
5014
      case SUCCESS:
5015
        if (value == null) {
5016
          unsetSuccess();
5017
        } else {
5018
          setSuccess((List<Payment>)value);
5019
        }
5020
        break;
5021
 
5022
      case PE:
5023
        if (value == null) {
5024
          unsetPe();
5025
        } else {
5026
          setPe((PaymentException)value);
5027
        }
5028
        break;
5029
 
5030
      }
5031
    }
5032
 
5033
    public Object getFieldValue(_Fields field) {
5034
      switch (field) {
5035
      case SUCCESS:
5036
        return getSuccess();
5037
 
5038
      case PE:
5039
        return getPe();
5040
 
5041
      }
5042
      throw new IllegalStateException();
5043
    }
5044
 
3430 rajveer 5045
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5046
    public boolean isSet(_Fields field) {
5047
      if (field == null) {
5048
        throw new IllegalArgumentException();
5049
      }
123 ashish 5050
 
5051
      switch (field) {
5052
      case SUCCESS:
5053
        return isSetSuccess();
5054
      case PE:
5055
        return isSetPe();
5056
      }
5057
      throw new IllegalStateException();
5058
    }
5059
 
5060
    @Override
5061
    public boolean equals(Object that) {
5062
      if (that == null)
5063
        return false;
5064
      if (that instanceof getPayments_result)
5065
        return this.equals((getPayments_result)that);
5066
      return false;
5067
    }
5068
 
5069
    public boolean equals(getPayments_result that) {
5070
      if (that == null)
5071
        return false;
5072
 
5073
      boolean this_present_success = true && this.isSetSuccess();
5074
      boolean that_present_success = true && that.isSetSuccess();
5075
      if (this_present_success || that_present_success) {
5076
        if (!(this_present_success && that_present_success))
5077
          return false;
5078
        if (!this.success.equals(that.success))
5079
          return false;
5080
      }
5081
 
5082
      boolean this_present_pe = true && this.isSetPe();
5083
      boolean that_present_pe = true && that.isSetPe();
5084
      if (this_present_pe || that_present_pe) {
5085
        if (!(this_present_pe && that_present_pe))
5086
          return false;
5087
        if (!this.pe.equals(that.pe))
5088
          return false;
5089
      }
5090
 
5091
      return true;
5092
    }
5093
 
5094
    @Override
5095
    public int hashCode() {
5096
      return 0;
5097
    }
5098
 
695 rajveer 5099
    public int compareTo(getPayments_result other) {
123 ashish 5100
      if (!getClass().equals(other.getClass())) {
5101
        return getClass().getName().compareTo(other.getClass().getName());
5102
      }
5103
 
5104
      int lastComparison = 0;
695 rajveer 5105
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 5106
 
3430 rajveer 5107
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 5108
      if (lastComparison != 0) {
5109
        return lastComparison;
5110
      }
3430 rajveer 5111
      if (isSetSuccess()) {
5112
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5113
        if (lastComparison != 0) {
5114
          return lastComparison;
5115
        }
123 ashish 5116
      }
3430 rajveer 5117
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 5118
      if (lastComparison != 0) {
5119
        return lastComparison;
123 ashish 5120
      }
3430 rajveer 5121
      if (isSetPe()) {
5122
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
5123
        if (lastComparison != 0) {
5124
          return lastComparison;
5125
        }
123 ashish 5126
      }
5127
      return 0;
5128
    }
5129
 
3430 rajveer 5130
    public _Fields fieldForId(int fieldId) {
5131
      return _Fields.findByThriftId(fieldId);
5132
    }
5133
 
5134
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5135
      org.apache.thrift.protocol.TField field;
123 ashish 5136
      iprot.readStructBegin();
5137
      while (true)
5138
      {
5139
        field = iprot.readFieldBegin();
3430 rajveer 5140
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 5141
          break;
5142
        }
3430 rajveer 5143
        switch (field.id) {
5144
          case 0: // SUCCESS
5145
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5146
              {
5147
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
5148
                this.success = new ArrayList<Payment>(_list16.size);
5149
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
420 ashish 5150
                {
3430 rajveer 5151
                  Payment _elem18; // required
5152
                  _elem18 = new Payment();
5153
                  _elem18.read(iprot);
5154
                  this.success.add(_elem18);
420 ashish 5155
                }
3430 rajveer 5156
                iprot.readListEnd();
123 ashish 5157
              }
3430 rajveer 5158
            } else { 
5159
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5160
            }
5161
            break;
5162
          case 1: // PE
5163
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5164
              this.pe = new PaymentException();
5165
              this.pe.read(iprot);
5166
            } else { 
5167
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5168
            }
5169
            break;
5170
          default:
5171
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 5172
        }
3430 rajveer 5173
        iprot.readFieldEnd();
123 ashish 5174
      }
5175
      iprot.readStructEnd();
5176
      validate();
5177
    }
5178
 
3430 rajveer 5179
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 5180
      oprot.writeStructBegin(STRUCT_DESC);
5181
 
5182
      if (this.isSetSuccess()) {
5183
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 5184
        {
3430 rajveer 5185
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 5186
          for (Payment _iter19 : this.success)
420 ashish 5187
          {
2747 chandransh 5188
            _iter19.write(oprot);
420 ashish 5189
          }
5190
          oprot.writeListEnd();
5191
        }
123 ashish 5192
        oprot.writeFieldEnd();
5193
      } else if (this.isSetPe()) {
5194
        oprot.writeFieldBegin(PE_FIELD_DESC);
5195
        this.pe.write(oprot);
5196
        oprot.writeFieldEnd();
5197
      }
5198
      oprot.writeFieldStop();
5199
      oprot.writeStructEnd();
5200
    }
5201
 
5202
    @Override
5203
    public String toString() {
695 rajveer 5204
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 5205
      boolean first = true;
5206
 
5207
      sb.append("success:");
5208
      if (this.success == null) {
5209
        sb.append("null");
5210
      } else {
5211
        sb.append(this.success);
5212
      }
5213
      first = false;
5214
      if (!first) sb.append(", ");
5215
      sb.append("pe:");
5216
      if (this.pe == null) {
5217
        sb.append("null");
5218
      } else {
5219
        sb.append(this.pe);
5220
      }
5221
      first = false;
5222
      sb.append(")");
5223
      return sb.toString();
5224
    }
5225
 
3430 rajveer 5226
    public void validate() throws org.apache.thrift.TException {
123 ashish 5227
      // check for required fields
5228
    }
5229
 
3430 rajveer 5230
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5231
      try {
5232
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5233
      } catch (org.apache.thrift.TException te) {
5234
        throw new java.io.IOException(te);
5235
      }
5236
    }
5237
 
5238
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5239
      try {
5240
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5241
      } catch (org.apache.thrift.TException te) {
5242
        throw new java.io.IOException(te);
5243
      }
5244
    }
5245
 
123 ashish 5246
  }
5247
 
4141 chandransh 5248
  public static class getPaymentsByCapturedDate_args implements org.apache.thrift.TBase<getPaymentsByCapturedDate_args, getPaymentsByCapturedDate_args._Fields>, java.io.Serializable, Cloneable   {
5249
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_args");
5250
 
5251
    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);
5252
    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);
5253
    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);
5254
 
5255
    private long fromTime; // required
5256
    private long toTime; // required
5257
    private long gatewayId; // required
5258
 
5259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5260
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5261
      FROM_TIME((short)1, "fromTime"),
5262
      TO_TIME((short)2, "toTime"),
5263
      GATEWAY_ID((short)3, "gatewayId");
5264
 
5265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5266
 
5267
      static {
5268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5269
          byName.put(field.getFieldName(), field);
5270
        }
5271
      }
5272
 
5273
      /**
5274
       * Find the _Fields constant that matches fieldId, or null if its not found.
5275
       */
5276
      public static _Fields findByThriftId(int fieldId) {
5277
        switch(fieldId) {
5278
          case 1: // FROM_TIME
5279
            return FROM_TIME;
5280
          case 2: // TO_TIME
5281
            return TO_TIME;
5282
          case 3: // GATEWAY_ID
5283
            return GATEWAY_ID;
5284
          default:
5285
            return null;
5286
        }
5287
      }
5288
 
5289
      /**
5290
       * Find the _Fields constant that matches fieldId, throwing an exception
5291
       * if it is not found.
5292
       */
5293
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5294
        _Fields fields = findByThriftId(fieldId);
5295
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5296
        return fields;
5297
      }
5298
 
5299
      /**
5300
       * Find the _Fields constant that matches name, or null if its not found.
5301
       */
5302
      public static _Fields findByName(String name) {
5303
        return byName.get(name);
5304
      }
5305
 
5306
      private final short _thriftId;
5307
      private final String _fieldName;
5308
 
5309
      _Fields(short thriftId, String fieldName) {
5310
        _thriftId = thriftId;
5311
        _fieldName = fieldName;
5312
      }
5313
 
5314
      public short getThriftFieldId() {
5315
        return _thriftId;
5316
      }
5317
 
5318
      public String getFieldName() {
5319
        return _fieldName;
5320
      }
5321
    }
5322
 
5323
    // isset id assignments
5324
    private static final int __FROMTIME_ISSET_ID = 0;
5325
    private static final int __TOTIME_ISSET_ID = 1;
5326
    private static final int __GATEWAYID_ISSET_ID = 2;
5327
    private BitSet __isset_bit_vector = new BitSet(3);
5328
 
5329
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5330
    static {
5331
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5332
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5333
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5334
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5336
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5337
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5338
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5339
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_args.class, metaDataMap);
5340
    }
5341
 
5342
    public getPaymentsByCapturedDate_args() {
5343
    }
5344
 
5345
    public getPaymentsByCapturedDate_args(
5346
      long fromTime,
5347
      long toTime,
5348
      long gatewayId)
5349
    {
5350
      this();
5351
      this.fromTime = fromTime;
5352
      setFromTimeIsSet(true);
5353
      this.toTime = toTime;
5354
      setToTimeIsSet(true);
5355
      this.gatewayId = gatewayId;
5356
      setGatewayIdIsSet(true);
5357
    }
5358
 
5359
    /**
5360
     * Performs a deep copy on <i>other</i>.
5361
     */
5362
    public getPaymentsByCapturedDate_args(getPaymentsByCapturedDate_args other) {
5363
      __isset_bit_vector.clear();
5364
      __isset_bit_vector.or(other.__isset_bit_vector);
5365
      this.fromTime = other.fromTime;
5366
      this.toTime = other.toTime;
5367
      this.gatewayId = other.gatewayId;
5368
    }
5369
 
5370
    public getPaymentsByCapturedDate_args deepCopy() {
5371
      return new getPaymentsByCapturedDate_args(this);
5372
    }
5373
 
5374
    @Override
5375
    public void clear() {
5376
      setFromTimeIsSet(false);
5377
      this.fromTime = 0;
5378
      setToTimeIsSet(false);
5379
      this.toTime = 0;
5380
      setGatewayIdIsSet(false);
5381
      this.gatewayId = 0;
5382
    }
5383
 
5384
    public long getFromTime() {
5385
      return this.fromTime;
5386
    }
5387
 
5388
    public void setFromTime(long fromTime) {
5389
      this.fromTime = fromTime;
5390
      setFromTimeIsSet(true);
5391
    }
5392
 
5393
    public void unsetFromTime() {
5394
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
5395
    }
5396
 
5397
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
5398
    public boolean isSetFromTime() {
5399
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
5400
    }
5401
 
5402
    public void setFromTimeIsSet(boolean value) {
5403
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
5404
    }
5405
 
5406
    public long getToTime() {
5407
      return this.toTime;
5408
    }
5409
 
5410
    public void setToTime(long toTime) {
5411
      this.toTime = toTime;
5412
      setToTimeIsSet(true);
5413
    }
5414
 
5415
    public void unsetToTime() {
5416
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
5417
    }
5418
 
5419
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
5420
    public boolean isSetToTime() {
5421
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
5422
    }
5423
 
5424
    public void setToTimeIsSet(boolean value) {
5425
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
5426
    }
5427
 
5428
    public long getGatewayId() {
5429
      return this.gatewayId;
5430
    }
5431
 
5432
    public void setGatewayId(long gatewayId) {
5433
      this.gatewayId = gatewayId;
5434
      setGatewayIdIsSet(true);
5435
    }
5436
 
5437
    public void unsetGatewayId() {
5438
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
5439
    }
5440
 
5441
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
5442
    public boolean isSetGatewayId() {
5443
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
5444
    }
5445
 
5446
    public void setGatewayIdIsSet(boolean value) {
5447
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
5448
    }
5449
 
5450
    public void setFieldValue(_Fields field, Object value) {
5451
      switch (field) {
5452
      case FROM_TIME:
5453
        if (value == null) {
5454
          unsetFromTime();
5455
        } else {
5456
          setFromTime((Long)value);
5457
        }
5458
        break;
5459
 
5460
      case TO_TIME:
5461
        if (value == null) {
5462
          unsetToTime();
5463
        } else {
5464
          setToTime((Long)value);
5465
        }
5466
        break;
5467
 
5468
      case GATEWAY_ID:
5469
        if (value == null) {
5470
          unsetGatewayId();
5471
        } else {
5472
          setGatewayId((Long)value);
5473
        }
5474
        break;
5475
 
5476
      }
5477
    }
5478
 
5479
    public Object getFieldValue(_Fields field) {
5480
      switch (field) {
5481
      case FROM_TIME:
5482
        return Long.valueOf(getFromTime());
5483
 
5484
      case TO_TIME:
5485
        return Long.valueOf(getToTime());
5486
 
5487
      case GATEWAY_ID:
5488
        return Long.valueOf(getGatewayId());
5489
 
5490
      }
5491
      throw new IllegalStateException();
5492
    }
5493
 
5494
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5495
    public boolean isSet(_Fields field) {
5496
      if (field == null) {
5497
        throw new IllegalArgumentException();
5498
      }
5499
 
5500
      switch (field) {
5501
      case FROM_TIME:
5502
        return isSetFromTime();
5503
      case TO_TIME:
5504
        return isSetToTime();
5505
      case GATEWAY_ID:
5506
        return isSetGatewayId();
5507
      }
5508
      throw new IllegalStateException();
5509
    }
5510
 
5511
    @Override
5512
    public boolean equals(Object that) {
5513
      if (that == null)
5514
        return false;
5515
      if (that instanceof getPaymentsByCapturedDate_args)
5516
        return this.equals((getPaymentsByCapturedDate_args)that);
5517
      return false;
5518
    }
5519
 
5520
    public boolean equals(getPaymentsByCapturedDate_args that) {
5521
      if (that == null)
5522
        return false;
5523
 
5524
      boolean this_present_fromTime = true;
5525
      boolean that_present_fromTime = true;
5526
      if (this_present_fromTime || that_present_fromTime) {
5527
        if (!(this_present_fromTime && that_present_fromTime))
5528
          return false;
5529
        if (this.fromTime != that.fromTime)
5530
          return false;
5531
      }
5532
 
5533
      boolean this_present_toTime = true;
5534
      boolean that_present_toTime = true;
5535
      if (this_present_toTime || that_present_toTime) {
5536
        if (!(this_present_toTime && that_present_toTime))
5537
          return false;
5538
        if (this.toTime != that.toTime)
5539
          return false;
5540
      }
5541
 
5542
      boolean this_present_gatewayId = true;
5543
      boolean that_present_gatewayId = true;
5544
      if (this_present_gatewayId || that_present_gatewayId) {
5545
        if (!(this_present_gatewayId && that_present_gatewayId))
5546
          return false;
5547
        if (this.gatewayId != that.gatewayId)
5548
          return false;
5549
      }
5550
 
5551
      return true;
5552
    }
5553
 
5554
    @Override
5555
    public int hashCode() {
5556
      return 0;
5557
    }
5558
 
5559
    public int compareTo(getPaymentsByCapturedDate_args other) {
5560
      if (!getClass().equals(other.getClass())) {
5561
        return getClass().getName().compareTo(other.getClass().getName());
5562
      }
5563
 
5564
      int lastComparison = 0;
5565
      getPaymentsByCapturedDate_args typedOther = (getPaymentsByCapturedDate_args)other;
5566
 
5567
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
5568
      if (lastComparison != 0) {
5569
        return lastComparison;
5570
      }
5571
      if (isSetFromTime()) {
5572
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
5573
        if (lastComparison != 0) {
5574
          return lastComparison;
5575
        }
5576
      }
5577
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
5578
      if (lastComparison != 0) {
5579
        return lastComparison;
5580
      }
5581
      if (isSetToTime()) {
5582
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
5583
        if (lastComparison != 0) {
5584
          return lastComparison;
5585
        }
5586
      }
5587
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
5588
      if (lastComparison != 0) {
5589
        return lastComparison;
5590
      }
5591
      if (isSetGatewayId()) {
5592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
5593
        if (lastComparison != 0) {
5594
          return lastComparison;
5595
        }
5596
      }
5597
      return 0;
5598
    }
5599
 
5600
    public _Fields fieldForId(int fieldId) {
5601
      return _Fields.findByThriftId(fieldId);
5602
    }
5603
 
5604
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5605
      org.apache.thrift.protocol.TField field;
5606
      iprot.readStructBegin();
5607
      while (true)
5608
      {
5609
        field = iprot.readFieldBegin();
5610
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5611
          break;
5612
        }
5613
        switch (field.id) {
5614
          case 1: // FROM_TIME
5615
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5616
              this.fromTime = iprot.readI64();
5617
              setFromTimeIsSet(true);
5618
            } else { 
5619
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5620
            }
5621
            break;
5622
          case 2: // TO_TIME
5623
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5624
              this.toTime = iprot.readI64();
5625
              setToTimeIsSet(true);
5626
            } else { 
5627
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5628
            }
5629
            break;
5630
          case 3: // GATEWAY_ID
5631
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5632
              this.gatewayId = iprot.readI64();
5633
              setGatewayIdIsSet(true);
5634
            } else { 
5635
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5636
            }
5637
            break;
5638
          default:
5639
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5640
        }
5641
        iprot.readFieldEnd();
5642
      }
5643
      iprot.readStructEnd();
5644
      validate();
5645
    }
5646
 
5647
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5648
      validate();
5649
 
5650
      oprot.writeStructBegin(STRUCT_DESC);
5651
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
5652
      oprot.writeI64(this.fromTime);
5653
      oprot.writeFieldEnd();
5654
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
5655
      oprot.writeI64(this.toTime);
5656
      oprot.writeFieldEnd();
5657
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
5658
      oprot.writeI64(this.gatewayId);
5659
      oprot.writeFieldEnd();
5660
      oprot.writeFieldStop();
5661
      oprot.writeStructEnd();
5662
    }
5663
 
5664
    @Override
5665
    public String toString() {
5666
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_args(");
5667
      boolean first = true;
5668
 
5669
      sb.append("fromTime:");
5670
      sb.append(this.fromTime);
5671
      first = false;
5672
      if (!first) sb.append(", ");
5673
      sb.append("toTime:");
5674
      sb.append(this.toTime);
5675
      first = false;
5676
      if (!first) sb.append(", ");
5677
      sb.append("gatewayId:");
5678
      sb.append(this.gatewayId);
5679
      first = false;
5680
      sb.append(")");
5681
      return sb.toString();
5682
    }
5683
 
5684
    public void validate() throws org.apache.thrift.TException {
5685
      // check for required fields
5686
    }
5687
 
5688
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5689
      try {
5690
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5691
      } catch (org.apache.thrift.TException te) {
5692
        throw new java.io.IOException(te);
5693
      }
5694
    }
5695
 
5696
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5697
      try {
5698
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5699
      } catch (org.apache.thrift.TException te) {
5700
        throw new java.io.IOException(te);
5701
      }
5702
    }
5703
 
5704
  }
5705
 
5706
  public static class getPaymentsByCapturedDate_result implements org.apache.thrift.TBase<getPaymentsByCapturedDate_result, getPaymentsByCapturedDate_result._Fields>, java.io.Serializable, Cloneable   {
5707
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_result");
5708
 
5709
    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);
5710
    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);
5711
 
5712
    private List<Payment> success; // required
5713
    private PaymentException pe; // required
5714
 
5715
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5716
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5717
      SUCCESS((short)0, "success"),
5718
      PE((short)1, "pe");
5719
 
5720
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5721
 
5722
      static {
5723
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5724
          byName.put(field.getFieldName(), field);
5725
        }
5726
      }
5727
 
5728
      /**
5729
       * Find the _Fields constant that matches fieldId, or null if its not found.
5730
       */
5731
      public static _Fields findByThriftId(int fieldId) {
5732
        switch(fieldId) {
5733
          case 0: // SUCCESS
5734
            return SUCCESS;
5735
          case 1: // PE
5736
            return PE;
5737
          default:
5738
            return null;
5739
        }
5740
      }
5741
 
5742
      /**
5743
       * Find the _Fields constant that matches fieldId, throwing an exception
5744
       * if it is not found.
5745
       */
5746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5747
        _Fields fields = findByThriftId(fieldId);
5748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5749
        return fields;
5750
      }
5751
 
5752
      /**
5753
       * Find the _Fields constant that matches name, or null if its not found.
5754
       */
5755
      public static _Fields findByName(String name) {
5756
        return byName.get(name);
5757
      }
5758
 
5759
      private final short _thriftId;
5760
      private final String _fieldName;
5761
 
5762
      _Fields(short thriftId, String fieldName) {
5763
        _thriftId = thriftId;
5764
        _fieldName = fieldName;
5765
      }
5766
 
5767
      public short getThriftFieldId() {
5768
        return _thriftId;
5769
      }
5770
 
5771
      public String getFieldName() {
5772
        return _fieldName;
5773
      }
5774
    }
5775
 
5776
    // isset id assignments
5777
 
5778
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5779
    static {
5780
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5781
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5782
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5783
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
5784
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5785
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5786
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5787
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_result.class, metaDataMap);
5788
    }
5789
 
5790
    public getPaymentsByCapturedDate_result() {
5791
    }
5792
 
5793
    public getPaymentsByCapturedDate_result(
5794
      List<Payment> success,
5795
      PaymentException pe)
5796
    {
5797
      this();
5798
      this.success = success;
5799
      this.pe = pe;
5800
    }
5801
 
5802
    /**
5803
     * Performs a deep copy on <i>other</i>.
5804
     */
5805
    public getPaymentsByCapturedDate_result(getPaymentsByCapturedDate_result other) {
5806
      if (other.isSetSuccess()) {
5807
        List<Payment> __this__success = new ArrayList<Payment>();
5808
        for (Payment other_element : other.success) {
5809
          __this__success.add(new Payment(other_element));
5810
        }
5811
        this.success = __this__success;
5812
      }
5813
      if (other.isSetPe()) {
5814
        this.pe = new PaymentException(other.pe);
5815
      }
5816
    }
5817
 
5818
    public getPaymentsByCapturedDate_result deepCopy() {
5819
      return new getPaymentsByCapturedDate_result(this);
5820
    }
5821
 
5822
    @Override
5823
    public void clear() {
5824
      this.success = null;
5825
      this.pe = null;
5826
    }
5827
 
5828
    public int getSuccessSize() {
5829
      return (this.success == null) ? 0 : this.success.size();
5830
    }
5831
 
5832
    public java.util.Iterator<Payment> getSuccessIterator() {
5833
      return (this.success == null) ? null : this.success.iterator();
5834
    }
5835
 
5836
    public void addToSuccess(Payment elem) {
5837
      if (this.success == null) {
5838
        this.success = new ArrayList<Payment>();
5839
      }
5840
      this.success.add(elem);
5841
    }
5842
 
5843
    public List<Payment> getSuccess() {
5844
      return this.success;
5845
    }
5846
 
5847
    public void setSuccess(List<Payment> success) {
5848
      this.success = success;
5849
    }
5850
 
5851
    public void unsetSuccess() {
5852
      this.success = null;
5853
    }
5854
 
5855
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5856
    public boolean isSetSuccess() {
5857
      return this.success != null;
5858
    }
5859
 
5860
    public void setSuccessIsSet(boolean value) {
5861
      if (!value) {
5862
        this.success = null;
5863
      }
5864
    }
5865
 
5866
    public PaymentException getPe() {
5867
      return this.pe;
5868
    }
5869
 
5870
    public void setPe(PaymentException pe) {
5871
      this.pe = pe;
5872
    }
5873
 
5874
    public void unsetPe() {
5875
      this.pe = null;
5876
    }
5877
 
5878
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
5879
    public boolean isSetPe() {
5880
      return this.pe != null;
5881
    }
5882
 
5883
    public void setPeIsSet(boolean value) {
5884
      if (!value) {
5885
        this.pe = null;
5886
      }
5887
    }
5888
 
5889
    public void setFieldValue(_Fields field, Object value) {
5890
      switch (field) {
5891
      case SUCCESS:
5892
        if (value == null) {
5893
          unsetSuccess();
5894
        } else {
5895
          setSuccess((List<Payment>)value);
5896
        }
5897
        break;
5898
 
5899
      case PE:
5900
        if (value == null) {
5901
          unsetPe();
5902
        } else {
5903
          setPe((PaymentException)value);
5904
        }
5905
        break;
5906
 
5907
      }
5908
    }
5909
 
5910
    public Object getFieldValue(_Fields field) {
5911
      switch (field) {
5912
      case SUCCESS:
5913
        return getSuccess();
5914
 
5915
      case PE:
5916
        return getPe();
5917
 
5918
      }
5919
      throw new IllegalStateException();
5920
    }
5921
 
5922
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5923
    public boolean isSet(_Fields field) {
5924
      if (field == null) {
5925
        throw new IllegalArgumentException();
5926
      }
5927
 
5928
      switch (field) {
5929
      case SUCCESS:
5930
        return isSetSuccess();
5931
      case PE:
5932
        return isSetPe();
5933
      }
5934
      throw new IllegalStateException();
5935
    }
5936
 
5937
    @Override
5938
    public boolean equals(Object that) {
5939
      if (that == null)
5940
        return false;
5941
      if (that instanceof getPaymentsByCapturedDate_result)
5942
        return this.equals((getPaymentsByCapturedDate_result)that);
5943
      return false;
5944
    }
5945
 
5946
    public boolean equals(getPaymentsByCapturedDate_result that) {
5947
      if (that == null)
5948
        return false;
5949
 
5950
      boolean this_present_success = true && this.isSetSuccess();
5951
      boolean that_present_success = true && that.isSetSuccess();
5952
      if (this_present_success || that_present_success) {
5953
        if (!(this_present_success && that_present_success))
5954
          return false;
5955
        if (!this.success.equals(that.success))
5956
          return false;
5957
      }
5958
 
5959
      boolean this_present_pe = true && this.isSetPe();
5960
      boolean that_present_pe = true && that.isSetPe();
5961
      if (this_present_pe || that_present_pe) {
5962
        if (!(this_present_pe && that_present_pe))
5963
          return false;
5964
        if (!this.pe.equals(that.pe))
5965
          return false;
5966
      }
5967
 
5968
      return true;
5969
    }
5970
 
5971
    @Override
5972
    public int hashCode() {
5973
      return 0;
5974
    }
5975
 
5976
    public int compareTo(getPaymentsByCapturedDate_result other) {
5977
      if (!getClass().equals(other.getClass())) {
5978
        return getClass().getName().compareTo(other.getClass().getName());
5979
      }
5980
 
5981
      int lastComparison = 0;
5982
      getPaymentsByCapturedDate_result typedOther = (getPaymentsByCapturedDate_result)other;
5983
 
5984
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5985
      if (lastComparison != 0) {
5986
        return lastComparison;
5987
      }
5988
      if (isSetSuccess()) {
5989
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5990
        if (lastComparison != 0) {
5991
          return lastComparison;
5992
        }
5993
      }
5994
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
5995
      if (lastComparison != 0) {
5996
        return lastComparison;
5997
      }
5998
      if (isSetPe()) {
5999
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6000
        if (lastComparison != 0) {
6001
          return lastComparison;
6002
        }
6003
      }
6004
      return 0;
6005
    }
6006
 
6007
    public _Fields fieldForId(int fieldId) {
6008
      return _Fields.findByThriftId(fieldId);
6009
    }
6010
 
6011
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6012
      org.apache.thrift.protocol.TField field;
6013
      iprot.readStructBegin();
6014
      while (true)
6015
      {
6016
        field = iprot.readFieldBegin();
6017
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6018
          break;
6019
        }
6020
        switch (field.id) {
6021
          case 0: // SUCCESS
6022
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6023
              {
6024
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
6025
                this.success = new ArrayList<Payment>(_list20.size);
6026
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
6027
                {
6028
                  Payment _elem22; // required
6029
                  _elem22 = new Payment();
6030
                  _elem22.read(iprot);
6031
                  this.success.add(_elem22);
6032
                }
6033
                iprot.readListEnd();
6034
              }
6035
            } else { 
6036
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6037
            }
6038
            break;
6039
          case 1: // PE
6040
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6041
              this.pe = new PaymentException();
6042
              this.pe.read(iprot);
6043
            } else { 
6044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6045
            }
6046
            break;
6047
          default:
6048
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6049
        }
6050
        iprot.readFieldEnd();
6051
      }
6052
      iprot.readStructEnd();
6053
      validate();
6054
    }
6055
 
6056
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6057
      oprot.writeStructBegin(STRUCT_DESC);
6058
 
6059
      if (this.isSetSuccess()) {
6060
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6061
        {
6062
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6063
          for (Payment _iter23 : this.success)
6064
          {
6065
            _iter23.write(oprot);
6066
          }
6067
          oprot.writeListEnd();
6068
        }
6069
        oprot.writeFieldEnd();
6070
      } else if (this.isSetPe()) {
6071
        oprot.writeFieldBegin(PE_FIELD_DESC);
6072
        this.pe.write(oprot);
6073
        oprot.writeFieldEnd();
6074
      }
6075
      oprot.writeFieldStop();
6076
      oprot.writeStructEnd();
6077
    }
6078
 
6079
    @Override
6080
    public String toString() {
6081
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_result(");
6082
      boolean first = true;
6083
 
6084
      sb.append("success:");
6085
      if (this.success == null) {
6086
        sb.append("null");
6087
      } else {
6088
        sb.append(this.success);
6089
      }
6090
      first = false;
6091
      if (!first) sb.append(", ");
6092
      sb.append("pe:");
6093
      if (this.pe == null) {
6094
        sb.append("null");
6095
      } else {
6096
        sb.append(this.pe);
6097
      }
6098
      first = false;
6099
      sb.append(")");
6100
      return sb.toString();
6101
    }
6102
 
6103
    public void validate() throws org.apache.thrift.TException {
6104
      // check for required fields
6105
    }
6106
 
6107
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6108
      try {
6109
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6110
      } catch (org.apache.thrift.TException te) {
6111
        throw new java.io.IOException(te);
6112
      }
6113
    }
6114
 
6115
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6116
      try {
6117
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6118
      } catch (org.apache.thrift.TException te) {
6119
        throw new java.io.IOException(te);
6120
      }
6121
    }
6122
 
6123
  }
6124
 
3430 rajveer 6125
  public static class getPaymentGateway_args implements org.apache.thrift.TBase<getPaymentGateway_args, getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable   {
6126
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_args");
123 ashish 6127
 
3430 rajveer 6128
    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 6129
 
3430 rajveer 6130
    private long id; // required
123 ashish 6131
 
6132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6133
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 6134
      ID((short)1, "id");
123 ashish 6135
 
6136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6137
 
6138
      static {
6139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6140
          byName.put(field.getFieldName(), field);
6141
        }
6142
      }
6143
 
6144
      /**
6145
       * Find the _Fields constant that matches fieldId, or null if its not found.
6146
       */
6147
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6148
        switch(fieldId) {
6149
          case 1: // ID
6150
            return ID;
6151
          default:
6152
            return null;
6153
        }
123 ashish 6154
      }
6155
 
6156
      /**
6157
       * Find the _Fields constant that matches fieldId, throwing an exception
6158
       * if it is not found.
6159
       */
6160
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6161
        _Fields fields = findByThriftId(fieldId);
6162
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6163
        return fields;
6164
      }
6165
 
6166
      /**
6167
       * Find the _Fields constant that matches name, or null if its not found.
6168
       */
6169
      public static _Fields findByName(String name) {
6170
        return byName.get(name);
6171
      }
6172
 
6173
      private final short _thriftId;
6174
      private final String _fieldName;
6175
 
6176
      _Fields(short thriftId, String fieldName) {
6177
        _thriftId = thriftId;
6178
        _fieldName = fieldName;
6179
      }
6180
 
6181
      public short getThriftFieldId() {
6182
        return _thriftId;
6183
      }
6184
 
6185
      public String getFieldName() {
6186
        return _fieldName;
6187
      }
6188
    }
6189
 
6190
    // isset id assignments
420 ashish 6191
    private static final int __ID_ISSET_ID = 0;
123 ashish 6192
    private BitSet __isset_bit_vector = new BitSet(1);
6193
 
3430 rajveer 6194
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 6195
    static {
3430 rajveer 6196
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6197
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6198
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6199
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6200
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 6201
    }
6202
 
695 rajveer 6203
    public getPaymentGateway_args() {
123 ashish 6204
    }
6205
 
695 rajveer 6206
    public getPaymentGateway_args(
6207
      long id)
123 ashish 6208
    {
6209
      this();
420 ashish 6210
      this.id = id;
6211
      setIdIsSet(true);
123 ashish 6212
    }
6213
 
6214
    /**
6215
     * Performs a deep copy on <i>other</i>.
6216
     */
695 rajveer 6217
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 6218
      __isset_bit_vector.clear();
6219
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 6220
      this.id = other.id;
123 ashish 6221
    }
6222
 
695 rajveer 6223
    public getPaymentGateway_args deepCopy() {
6224
      return new getPaymentGateway_args(this);
123 ashish 6225
    }
6226
 
3430 rajveer 6227
    @Override
6228
    public void clear() {
6229
      setIdIsSet(false);
6230
      this.id = 0;
123 ashish 6231
    }
6232
 
420 ashish 6233
    public long getId() {
6234
      return this.id;
123 ashish 6235
    }
6236
 
3430 rajveer 6237
    public void setId(long id) {
420 ashish 6238
      this.id = id;
6239
      setIdIsSet(true);
123 ashish 6240
    }
6241
 
420 ashish 6242
    public void unsetId() {
6243
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 6244
    }
6245
 
3430 rajveer 6246
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 6247
    public boolean isSetId() {
6248
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 6249
    }
6250
 
420 ashish 6251
    public void setIdIsSet(boolean value) {
6252
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 6253
    }
6254
 
6255
    public void setFieldValue(_Fields field, Object value) {
6256
      switch (field) {
420 ashish 6257
      case ID:
123 ashish 6258
        if (value == null) {
420 ashish 6259
          unsetId();
123 ashish 6260
        } else {
420 ashish 6261
          setId((Long)value);
123 ashish 6262
        }
6263
        break;
6264
 
6265
      }
6266
    }
6267
 
6268
    public Object getFieldValue(_Fields field) {
6269
      switch (field) {
420 ashish 6270
      case ID:
3430 rajveer 6271
        return Long.valueOf(getId());
123 ashish 6272
 
6273
      }
6274
      throw new IllegalStateException();
6275
    }
6276
 
3430 rajveer 6277
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6278
    public boolean isSet(_Fields field) {
6279
      if (field == null) {
6280
        throw new IllegalArgumentException();
6281
      }
123 ashish 6282
 
6283
      switch (field) {
420 ashish 6284
      case ID:
6285
        return isSetId();
123 ashish 6286
      }
6287
      throw new IllegalStateException();
6288
    }
6289
 
6290
    @Override
6291
    public boolean equals(Object that) {
6292
      if (that == null)
6293
        return false;
695 rajveer 6294
      if (that instanceof getPaymentGateway_args)
6295
        return this.equals((getPaymentGateway_args)that);
123 ashish 6296
      return false;
6297
    }
6298
 
695 rajveer 6299
    public boolean equals(getPaymentGateway_args that) {
123 ashish 6300
      if (that == null)
6301
        return false;
6302
 
420 ashish 6303
      boolean this_present_id = true;
6304
      boolean that_present_id = true;
6305
      if (this_present_id || that_present_id) {
6306
        if (!(this_present_id && that_present_id))
123 ashish 6307
          return false;
420 ashish 6308
        if (this.id != that.id)
123 ashish 6309
          return false;
6310
      }
6311
 
6312
      return true;
6313
    }
6314
 
6315
    @Override
6316
    public int hashCode() {
6317
      return 0;
6318
    }
6319
 
695 rajveer 6320
    public int compareTo(getPaymentGateway_args other) {
123 ashish 6321
      if (!getClass().equals(other.getClass())) {
6322
        return getClass().getName().compareTo(other.getClass().getName());
6323
      }
6324
 
6325
      int lastComparison = 0;
695 rajveer 6326
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 6327
 
3430 rajveer 6328
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
123 ashish 6329
      if (lastComparison != 0) {
6330
        return lastComparison;
6331
      }
3430 rajveer 6332
      if (isSetId()) {
6333
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
6334
        if (lastComparison != 0) {
6335
          return lastComparison;
6336
        }
123 ashish 6337
      }
6338
      return 0;
6339
    }
6340
 
3430 rajveer 6341
    public _Fields fieldForId(int fieldId) {
6342
      return _Fields.findByThriftId(fieldId);
6343
    }
6344
 
6345
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6346
      org.apache.thrift.protocol.TField field;
123 ashish 6347
      iprot.readStructBegin();
6348
      while (true)
6349
      {
6350
        field = iprot.readFieldBegin();
3430 rajveer 6351
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 6352
          break;
6353
        }
3430 rajveer 6354
        switch (field.id) {
6355
          case 1: // ID
6356
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6357
              this.id = iprot.readI64();
6358
              setIdIsSet(true);
6359
            } else { 
6360
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6361
            }
6362
            break;
6363
          default:
6364
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 6365
        }
3430 rajveer 6366
        iprot.readFieldEnd();
123 ashish 6367
      }
6368
      iprot.readStructEnd();
6369
      validate();
6370
    }
6371
 
3430 rajveer 6372
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 6373
      validate();
6374
 
6375
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 6376
      oprot.writeFieldBegin(ID_FIELD_DESC);
6377
      oprot.writeI64(this.id);
123 ashish 6378
      oprot.writeFieldEnd();
6379
      oprot.writeFieldStop();
6380
      oprot.writeStructEnd();
6381
    }
6382
 
6383
    @Override
6384
    public String toString() {
695 rajveer 6385
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 6386
      boolean first = true;
6387
 
420 ashish 6388
      sb.append("id:");
6389
      sb.append(this.id);
123 ashish 6390
      first = false;
6391
      sb.append(")");
6392
      return sb.toString();
6393
    }
6394
 
3430 rajveer 6395
    public void validate() throws org.apache.thrift.TException {
123 ashish 6396
      // check for required fields
6397
    }
6398
 
3430 rajveer 6399
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6400
      try {
6401
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6402
      } catch (org.apache.thrift.TException te) {
6403
        throw new java.io.IOException(te);
6404
      }
6405
    }
6406
 
6407
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6408
      try {
6409
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6410
        __isset_bit_vector = new BitSet(1);
6411
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6412
      } catch (org.apache.thrift.TException te) {
6413
        throw new java.io.IOException(te);
6414
      }
6415
    }
6416
 
123 ashish 6417
  }
6418
 
3430 rajveer 6419
  public static class getPaymentGateway_result implements org.apache.thrift.TBase<getPaymentGateway_result, getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable   {
6420
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_result");
123 ashish 6421
 
3430 rajveer 6422
    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);
6423
    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 6424
 
3430 rajveer 6425
    private PaymentGateway success; // required
6426
    private PaymentException pe; // required
123 ashish 6427
 
6428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6429
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 6430
      SUCCESS((short)0, "success"),
6431
      PE((short)1, "pe");
6432
 
6433
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6434
 
6435
      static {
6436
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6437
          byName.put(field.getFieldName(), field);
6438
        }
6439
      }
6440
 
6441
      /**
6442
       * Find the _Fields constant that matches fieldId, or null if its not found.
6443
       */
6444
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6445
        switch(fieldId) {
6446
          case 0: // SUCCESS
6447
            return SUCCESS;
6448
          case 1: // PE
6449
            return PE;
6450
          default:
6451
            return null;
6452
        }
420 ashish 6453
      }
6454
 
6455
      /**
6456
       * Find the _Fields constant that matches fieldId, throwing an exception
6457
       * if it is not found.
6458
       */
6459
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6460
        _Fields fields = findByThriftId(fieldId);
6461
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6462
        return fields;
6463
      }
6464
 
6465
      /**
6466
       * Find the _Fields constant that matches name, or null if its not found.
6467
       */
6468
      public static _Fields findByName(String name) {
6469
        return byName.get(name);
6470
      }
6471
 
6472
      private final short _thriftId;
6473
      private final String _fieldName;
6474
 
6475
      _Fields(short thriftId, String fieldName) {
6476
        _thriftId = thriftId;
6477
        _fieldName = fieldName;
6478
      }
6479
 
6480
      public short getThriftFieldId() {
6481
        return _thriftId;
6482
      }
6483
 
6484
      public String getFieldName() {
6485
        return _fieldName;
6486
      }
6487
    }
6488
 
6489
    // isset id assignments
6490
 
3430 rajveer 6491
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6492
    static {
3430 rajveer 6493
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6494
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6495
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class)));
6496
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6497
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6498
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6499
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 6500
    }
6501
 
695 rajveer 6502
    public getPaymentGateway_result() {
420 ashish 6503
    }
6504
 
695 rajveer 6505
    public getPaymentGateway_result(
6506
      PaymentGateway success,
420 ashish 6507
      PaymentException pe)
6508
    {
6509
      this();
6510
      this.success = success;
6511
      this.pe = pe;
6512
    }
6513
 
6514
    /**
6515
     * Performs a deep copy on <i>other</i>.
6516
     */
695 rajveer 6517
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 6518
      if (other.isSetSuccess()) {
695 rajveer 6519
        this.success = new PaymentGateway(other.success);
420 ashish 6520
      }
6521
      if (other.isSetPe()) {
6522
        this.pe = new PaymentException(other.pe);
6523
      }
6524
    }
6525
 
695 rajveer 6526
    public getPaymentGateway_result deepCopy() {
6527
      return new getPaymentGateway_result(this);
420 ashish 6528
    }
6529
 
3430 rajveer 6530
    @Override
6531
    public void clear() {
6532
      this.success = null;
6533
      this.pe = null;
420 ashish 6534
    }
6535
 
695 rajveer 6536
    public PaymentGateway getSuccess() {
420 ashish 6537
      return this.success;
6538
    }
6539
 
3430 rajveer 6540
    public void setSuccess(PaymentGateway success) {
420 ashish 6541
      this.success = success;
6542
    }
6543
 
6544
    public void unsetSuccess() {
6545
      this.success = null;
6546
    }
6547
 
3430 rajveer 6548
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 6549
    public boolean isSetSuccess() {
6550
      return this.success != null;
6551
    }
6552
 
6553
    public void setSuccessIsSet(boolean value) {
6554
      if (!value) {
6555
        this.success = null;
6556
      }
6557
    }
6558
 
6559
    public PaymentException getPe() {
6560
      return this.pe;
6561
    }
6562
 
3430 rajveer 6563
    public void setPe(PaymentException pe) {
420 ashish 6564
      this.pe = pe;
6565
    }
6566
 
6567
    public void unsetPe() {
6568
      this.pe = null;
6569
    }
6570
 
3430 rajveer 6571
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 6572
    public boolean isSetPe() {
6573
      return this.pe != null;
6574
    }
6575
 
6576
    public void setPeIsSet(boolean value) {
6577
      if (!value) {
6578
        this.pe = null;
6579
      }
6580
    }
6581
 
6582
    public void setFieldValue(_Fields field, Object value) {
6583
      switch (field) {
6584
      case SUCCESS:
6585
        if (value == null) {
6586
          unsetSuccess();
6587
        } else {
695 rajveer 6588
          setSuccess((PaymentGateway)value);
420 ashish 6589
        }
6590
        break;
6591
 
6592
      case PE:
6593
        if (value == null) {
6594
          unsetPe();
6595
        } else {
6596
          setPe((PaymentException)value);
6597
        }
6598
        break;
6599
 
6600
      }
6601
    }
6602
 
6603
    public Object getFieldValue(_Fields field) {
6604
      switch (field) {
6605
      case SUCCESS:
6606
        return getSuccess();
6607
 
6608
      case PE:
6609
        return getPe();
6610
 
6611
      }
6612
      throw new IllegalStateException();
6613
    }
6614
 
3430 rajveer 6615
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6616
    public boolean isSet(_Fields field) {
6617
      if (field == null) {
6618
        throw new IllegalArgumentException();
6619
      }
420 ashish 6620
 
6621
      switch (field) {
6622
      case SUCCESS:
6623
        return isSetSuccess();
6624
      case PE:
6625
        return isSetPe();
6626
      }
6627
      throw new IllegalStateException();
6628
    }
6629
 
6630
    @Override
6631
    public boolean equals(Object that) {
6632
      if (that == null)
6633
        return false;
695 rajveer 6634
      if (that instanceof getPaymentGateway_result)
6635
        return this.equals((getPaymentGateway_result)that);
420 ashish 6636
      return false;
6637
    }
6638
 
695 rajveer 6639
    public boolean equals(getPaymentGateway_result that) {
420 ashish 6640
      if (that == null)
6641
        return false;
6642
 
6643
      boolean this_present_success = true && this.isSetSuccess();
6644
      boolean that_present_success = true && that.isSetSuccess();
6645
      if (this_present_success || that_present_success) {
6646
        if (!(this_present_success && that_present_success))
6647
          return false;
6648
        if (!this.success.equals(that.success))
6649
          return false;
6650
      }
6651
 
6652
      boolean this_present_pe = true && this.isSetPe();
6653
      boolean that_present_pe = true && that.isSetPe();
6654
      if (this_present_pe || that_present_pe) {
6655
        if (!(this_present_pe && that_present_pe))
6656
          return false;
6657
        if (!this.pe.equals(that.pe))
6658
          return false;
6659
      }
6660
 
6661
      return true;
6662
    }
6663
 
6664
    @Override
6665
    public int hashCode() {
6666
      return 0;
6667
    }
6668
 
695 rajveer 6669
    public int compareTo(getPaymentGateway_result other) {
6670
      if (!getClass().equals(other.getClass())) {
6671
        return getClass().getName().compareTo(other.getClass().getName());
6672
      }
6673
 
6674
      int lastComparison = 0;
6675
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
6676
 
3430 rajveer 6677
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 6678
      if (lastComparison != 0) {
6679
        return lastComparison;
6680
      }
3430 rajveer 6681
      if (isSetSuccess()) {
6682
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6683
        if (lastComparison != 0) {
6684
          return lastComparison;
6685
        }
695 rajveer 6686
      }
3430 rajveer 6687
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 6688
      if (lastComparison != 0) {
6689
        return lastComparison;
6690
      }
3430 rajveer 6691
      if (isSetPe()) {
6692
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6693
        if (lastComparison != 0) {
6694
          return lastComparison;
6695
        }
695 rajveer 6696
      }
6697
      return 0;
6698
    }
6699
 
3430 rajveer 6700
    public _Fields fieldForId(int fieldId) {
6701
      return _Fields.findByThriftId(fieldId);
6702
    }
6703
 
6704
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6705
      org.apache.thrift.protocol.TField field;
420 ashish 6706
      iprot.readStructBegin();
6707
      while (true)
6708
      {
6709
        field = iprot.readFieldBegin();
3430 rajveer 6710
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6711
          break;
6712
        }
3430 rajveer 6713
        switch (field.id) {
6714
          case 0: // SUCCESS
6715
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6716
              this.success = new PaymentGateway();
6717
              this.success.read(iprot);
6718
            } else { 
6719
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6720
            }
6721
            break;
6722
          case 1: // PE
6723
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6724
              this.pe = new PaymentException();
6725
              this.pe.read(iprot);
6726
            } else { 
6727
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6728
            }
6729
            break;
6730
          default:
6731
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6732
        }
3430 rajveer 6733
        iprot.readFieldEnd();
420 ashish 6734
      }
6735
      iprot.readStructEnd();
6736
      validate();
6737
    }
6738
 
3430 rajveer 6739
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6740
      oprot.writeStructBegin(STRUCT_DESC);
6741
 
6742
      if (this.isSetSuccess()) {
6743
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 6744
        this.success.write(oprot);
420 ashish 6745
        oprot.writeFieldEnd();
6746
      } else if (this.isSetPe()) {
6747
        oprot.writeFieldBegin(PE_FIELD_DESC);
6748
        this.pe.write(oprot);
6749
        oprot.writeFieldEnd();
6750
      }
6751
      oprot.writeFieldStop();
6752
      oprot.writeStructEnd();
6753
    }
6754
 
6755
    @Override
6756
    public String toString() {
695 rajveer 6757
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 6758
      boolean first = true;
6759
 
6760
      sb.append("success:");
6761
      if (this.success == null) {
6762
        sb.append("null");
6763
      } else {
6764
        sb.append(this.success);
6765
      }
6766
      first = false;
6767
      if (!first) sb.append(", ");
6768
      sb.append("pe:");
6769
      if (this.pe == null) {
6770
        sb.append("null");
6771
      } else {
6772
        sb.append(this.pe);
6773
      }
6774
      first = false;
6775
      sb.append(")");
6776
      return sb.toString();
6777
    }
6778
 
3430 rajveer 6779
    public void validate() throws org.apache.thrift.TException {
420 ashish 6780
      // check for required fields
6781
    }
6782
 
3430 rajveer 6783
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6784
      try {
6785
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6786
      } catch (org.apache.thrift.TException te) {
6787
        throw new java.io.IOException(te);
6788
      }
6789
    }
6790
 
6791
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6792
      try {
6793
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6794
      } catch (org.apache.thrift.TException te) {
6795
        throw new java.io.IOException(te);
6796
      }
6797
    }
6798
 
420 ashish 6799
  }
6800
 
4600 varun.gupt 6801
  public static class getActivePaymentGateways_args implements org.apache.thrift.TBase<getActivePaymentGateways_args, getActivePaymentGateways_args._Fields>, java.io.Serializable, Cloneable   {
6802
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_args");
6803
 
6804
 
6805
 
6806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6807
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6808
;
6809
 
6810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6811
 
6812
      static {
6813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6814
          byName.put(field.getFieldName(), field);
6815
        }
6816
      }
6817
 
6818
      /**
6819
       * Find the _Fields constant that matches fieldId, or null if its not found.
6820
       */
6821
      public static _Fields findByThriftId(int fieldId) {
6822
        switch(fieldId) {
6823
          default:
6824
            return null;
6825
        }
6826
      }
6827
 
6828
      /**
6829
       * Find the _Fields constant that matches fieldId, throwing an exception
6830
       * if it is not found.
6831
       */
6832
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6833
        _Fields fields = findByThriftId(fieldId);
6834
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6835
        return fields;
6836
      }
6837
 
6838
      /**
6839
       * Find the _Fields constant that matches name, or null if its not found.
6840
       */
6841
      public static _Fields findByName(String name) {
6842
        return byName.get(name);
6843
      }
6844
 
6845
      private final short _thriftId;
6846
      private final String _fieldName;
6847
 
6848
      _Fields(short thriftId, String fieldName) {
6849
        _thriftId = thriftId;
6850
        _fieldName = fieldName;
6851
      }
6852
 
6853
      public short getThriftFieldId() {
6854
        return _thriftId;
6855
      }
6856
 
6857
      public String getFieldName() {
6858
        return _fieldName;
6859
      }
6860
    }
6861
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6862
    static {
6863
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6864
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6865
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_args.class, metaDataMap);
6866
    }
6867
 
6868
    public getActivePaymentGateways_args() {
6869
    }
6870
 
6871
    /**
6872
     * Performs a deep copy on <i>other</i>.
6873
     */
6874
    public getActivePaymentGateways_args(getActivePaymentGateways_args other) {
6875
    }
6876
 
6877
    public getActivePaymentGateways_args deepCopy() {
6878
      return new getActivePaymentGateways_args(this);
6879
    }
6880
 
6881
    @Override
6882
    public void clear() {
6883
    }
6884
 
6885
    public void setFieldValue(_Fields field, Object value) {
6886
      switch (field) {
6887
      }
6888
    }
6889
 
6890
    public Object getFieldValue(_Fields field) {
6891
      switch (field) {
6892
      }
6893
      throw new IllegalStateException();
6894
    }
6895
 
6896
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6897
    public boolean isSet(_Fields field) {
6898
      if (field == null) {
6899
        throw new IllegalArgumentException();
6900
      }
6901
 
6902
      switch (field) {
6903
      }
6904
      throw new IllegalStateException();
6905
    }
6906
 
6907
    @Override
6908
    public boolean equals(Object that) {
6909
      if (that == null)
6910
        return false;
6911
      if (that instanceof getActivePaymentGateways_args)
6912
        return this.equals((getActivePaymentGateways_args)that);
6913
      return false;
6914
    }
6915
 
6916
    public boolean equals(getActivePaymentGateways_args that) {
6917
      if (that == null)
6918
        return false;
6919
 
6920
      return true;
6921
    }
6922
 
6923
    @Override
6924
    public int hashCode() {
6925
      return 0;
6926
    }
6927
 
6928
    public int compareTo(getActivePaymentGateways_args other) {
6929
      if (!getClass().equals(other.getClass())) {
6930
        return getClass().getName().compareTo(other.getClass().getName());
6931
      }
6932
 
6933
      int lastComparison = 0;
6934
      getActivePaymentGateways_args typedOther = (getActivePaymentGateways_args)other;
6935
 
6936
      return 0;
6937
    }
6938
 
6939
    public _Fields fieldForId(int fieldId) {
6940
      return _Fields.findByThriftId(fieldId);
6941
    }
6942
 
6943
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6944
      org.apache.thrift.protocol.TField field;
6945
      iprot.readStructBegin();
6946
      while (true)
6947
      {
6948
        field = iprot.readFieldBegin();
6949
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6950
          break;
6951
        }
6952
        switch (field.id) {
6953
          default:
6954
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6955
        }
6956
        iprot.readFieldEnd();
6957
      }
6958
      iprot.readStructEnd();
6959
      validate();
6960
    }
6961
 
6962
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6963
      validate();
6964
 
6965
      oprot.writeStructBegin(STRUCT_DESC);
6966
      oprot.writeFieldStop();
6967
      oprot.writeStructEnd();
6968
    }
6969
 
6970
    @Override
6971
    public String toString() {
6972
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_args(");
6973
      boolean first = true;
6974
 
6975
      sb.append(")");
6976
      return sb.toString();
6977
    }
6978
 
6979
    public void validate() throws org.apache.thrift.TException {
6980
      // check for required fields
6981
    }
6982
 
6983
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6984
      try {
6985
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6986
      } catch (org.apache.thrift.TException te) {
6987
        throw new java.io.IOException(te);
6988
      }
6989
    }
6990
 
6991
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6992
      try {
6993
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6994
      } catch (org.apache.thrift.TException te) {
6995
        throw new java.io.IOException(te);
6996
      }
6997
    }
6998
 
6999
  }
7000
 
7001
  public static class getActivePaymentGateways_result implements org.apache.thrift.TBase<getActivePaymentGateways_result, getActivePaymentGateways_result._Fields>, java.io.Serializable, Cloneable   {
7002
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_result");
7003
 
7004
    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);
7005
    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);
7006
 
7007
    private List<PaymentGateway> success; // required
7008
    private PaymentException pe; // required
7009
 
7010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7011
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7012
      SUCCESS((short)0, "success"),
7013
      PE((short)1, "pe");
7014
 
7015
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7016
 
7017
      static {
7018
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7019
          byName.put(field.getFieldName(), field);
7020
        }
7021
      }
7022
 
7023
      /**
7024
       * Find the _Fields constant that matches fieldId, or null if its not found.
7025
       */
7026
      public static _Fields findByThriftId(int fieldId) {
7027
        switch(fieldId) {
7028
          case 0: // SUCCESS
7029
            return SUCCESS;
7030
          case 1: // PE
7031
            return PE;
7032
          default:
7033
            return null;
7034
        }
7035
      }
7036
 
7037
      /**
7038
       * Find the _Fields constant that matches fieldId, throwing an exception
7039
       * if it is not found.
7040
       */
7041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7042
        _Fields fields = findByThriftId(fieldId);
7043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7044
        return fields;
7045
      }
7046
 
7047
      /**
7048
       * Find the _Fields constant that matches name, or null if its not found.
7049
       */
7050
      public static _Fields findByName(String name) {
7051
        return byName.get(name);
7052
      }
7053
 
7054
      private final short _thriftId;
7055
      private final String _fieldName;
7056
 
7057
      _Fields(short thriftId, String fieldName) {
7058
        _thriftId = thriftId;
7059
        _fieldName = fieldName;
7060
      }
7061
 
7062
      public short getThriftFieldId() {
7063
        return _thriftId;
7064
      }
7065
 
7066
      public String getFieldName() {
7067
        return _fieldName;
7068
      }
7069
    }
7070
 
7071
    // isset id assignments
7072
 
7073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7074
    static {
7075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7076
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7077
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7078
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class))));
7079
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7080
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7081
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7082
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_result.class, metaDataMap);
7083
    }
7084
 
7085
    public getActivePaymentGateways_result() {
7086
    }
7087
 
7088
    public getActivePaymentGateways_result(
7089
      List<PaymentGateway> success,
7090
      PaymentException pe)
7091
    {
7092
      this();
7093
      this.success = success;
7094
      this.pe = pe;
7095
    }
7096
 
7097
    /**
7098
     * Performs a deep copy on <i>other</i>.
7099
     */
7100
    public getActivePaymentGateways_result(getActivePaymentGateways_result other) {
7101
      if (other.isSetSuccess()) {
7102
        List<PaymentGateway> __this__success = new ArrayList<PaymentGateway>();
7103
        for (PaymentGateway other_element : other.success) {
7104
          __this__success.add(new PaymentGateway(other_element));
7105
        }
7106
        this.success = __this__success;
7107
      }
7108
      if (other.isSetPe()) {
7109
        this.pe = new PaymentException(other.pe);
7110
      }
7111
    }
7112
 
7113
    public getActivePaymentGateways_result deepCopy() {
7114
      return new getActivePaymentGateways_result(this);
7115
    }
7116
 
7117
    @Override
7118
    public void clear() {
7119
      this.success = null;
7120
      this.pe = null;
7121
    }
7122
 
7123
    public int getSuccessSize() {
7124
      return (this.success == null) ? 0 : this.success.size();
7125
    }
7126
 
7127
    public java.util.Iterator<PaymentGateway> getSuccessIterator() {
7128
      return (this.success == null) ? null : this.success.iterator();
7129
    }
7130
 
7131
    public void addToSuccess(PaymentGateway elem) {
7132
      if (this.success == null) {
7133
        this.success = new ArrayList<PaymentGateway>();
7134
      }
7135
      this.success.add(elem);
7136
    }
7137
 
7138
    public List<PaymentGateway> getSuccess() {
7139
      return this.success;
7140
    }
7141
 
7142
    public void setSuccess(List<PaymentGateway> success) {
7143
      this.success = success;
7144
    }
7145
 
7146
    public void unsetSuccess() {
7147
      this.success = null;
7148
    }
7149
 
7150
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7151
    public boolean isSetSuccess() {
7152
      return this.success != null;
7153
    }
7154
 
7155
    public void setSuccessIsSet(boolean value) {
7156
      if (!value) {
7157
        this.success = null;
7158
      }
7159
    }
7160
 
7161
    public PaymentException getPe() {
7162
      return this.pe;
7163
    }
7164
 
7165
    public void setPe(PaymentException pe) {
7166
      this.pe = pe;
7167
    }
7168
 
7169
    public void unsetPe() {
7170
      this.pe = null;
7171
    }
7172
 
7173
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
7174
    public boolean isSetPe() {
7175
      return this.pe != null;
7176
    }
7177
 
7178
    public void setPeIsSet(boolean value) {
7179
      if (!value) {
7180
        this.pe = null;
7181
      }
7182
    }
7183
 
7184
    public void setFieldValue(_Fields field, Object value) {
7185
      switch (field) {
7186
      case SUCCESS:
7187
        if (value == null) {
7188
          unsetSuccess();
7189
        } else {
7190
          setSuccess((List<PaymentGateway>)value);
7191
        }
7192
        break;
7193
 
7194
      case PE:
7195
        if (value == null) {
7196
          unsetPe();
7197
        } else {
7198
          setPe((PaymentException)value);
7199
        }
7200
        break;
7201
 
7202
      }
7203
    }
7204
 
7205
    public Object getFieldValue(_Fields field) {
7206
      switch (field) {
7207
      case SUCCESS:
7208
        return getSuccess();
7209
 
7210
      case PE:
7211
        return getPe();
7212
 
7213
      }
7214
      throw new IllegalStateException();
7215
    }
7216
 
7217
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7218
    public boolean isSet(_Fields field) {
7219
      if (field == null) {
7220
        throw new IllegalArgumentException();
7221
      }
7222
 
7223
      switch (field) {
7224
      case SUCCESS:
7225
        return isSetSuccess();
7226
      case PE:
7227
        return isSetPe();
7228
      }
7229
      throw new IllegalStateException();
7230
    }
7231
 
7232
    @Override
7233
    public boolean equals(Object that) {
7234
      if (that == null)
7235
        return false;
7236
      if (that instanceof getActivePaymentGateways_result)
7237
        return this.equals((getActivePaymentGateways_result)that);
7238
      return false;
7239
    }
7240
 
7241
    public boolean equals(getActivePaymentGateways_result that) {
7242
      if (that == null)
7243
        return false;
7244
 
7245
      boolean this_present_success = true && this.isSetSuccess();
7246
      boolean that_present_success = true && that.isSetSuccess();
7247
      if (this_present_success || that_present_success) {
7248
        if (!(this_present_success && that_present_success))
7249
          return false;
7250
        if (!this.success.equals(that.success))
7251
          return false;
7252
      }
7253
 
7254
      boolean this_present_pe = true && this.isSetPe();
7255
      boolean that_present_pe = true && that.isSetPe();
7256
      if (this_present_pe || that_present_pe) {
7257
        if (!(this_present_pe && that_present_pe))
7258
          return false;
7259
        if (!this.pe.equals(that.pe))
7260
          return false;
7261
      }
7262
 
7263
      return true;
7264
    }
7265
 
7266
    @Override
7267
    public int hashCode() {
7268
      return 0;
7269
    }
7270
 
7271
    public int compareTo(getActivePaymentGateways_result other) {
7272
      if (!getClass().equals(other.getClass())) {
7273
        return getClass().getName().compareTo(other.getClass().getName());
7274
      }
7275
 
7276
      int lastComparison = 0;
7277
      getActivePaymentGateways_result typedOther = (getActivePaymentGateways_result)other;
7278
 
7279
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7280
      if (lastComparison != 0) {
7281
        return lastComparison;
7282
      }
7283
      if (isSetSuccess()) {
7284
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7285
        if (lastComparison != 0) {
7286
          return lastComparison;
7287
        }
7288
      }
7289
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
7290
      if (lastComparison != 0) {
7291
        return lastComparison;
7292
      }
7293
      if (isSetPe()) {
7294
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7295
        if (lastComparison != 0) {
7296
          return lastComparison;
7297
        }
7298
      }
7299
      return 0;
7300
    }
7301
 
7302
    public _Fields fieldForId(int fieldId) {
7303
      return _Fields.findByThriftId(fieldId);
7304
    }
7305
 
7306
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7307
      org.apache.thrift.protocol.TField field;
7308
      iprot.readStructBegin();
7309
      while (true)
7310
      {
7311
        field = iprot.readFieldBegin();
7312
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7313
          break;
7314
        }
7315
        switch (field.id) {
7316
          case 0: // SUCCESS
7317
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7318
              {
7319
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
7320
                this.success = new ArrayList<PaymentGateway>(_list24.size);
7321
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
7322
                {
7323
                  PaymentGateway _elem26; // required
7324
                  _elem26 = new PaymentGateway();
7325
                  _elem26.read(iprot);
7326
                  this.success.add(_elem26);
7327
                }
7328
                iprot.readListEnd();
7329
              }
7330
            } else { 
7331
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7332
            }
7333
            break;
7334
          case 1: // PE
7335
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7336
              this.pe = new PaymentException();
7337
              this.pe.read(iprot);
7338
            } else { 
7339
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7340
            }
7341
            break;
7342
          default:
7343
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7344
        }
7345
        iprot.readFieldEnd();
7346
      }
7347
      iprot.readStructEnd();
7348
      validate();
7349
    }
7350
 
7351
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7352
      oprot.writeStructBegin(STRUCT_DESC);
7353
 
7354
      if (this.isSetSuccess()) {
7355
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7356
        {
7357
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7358
          for (PaymentGateway _iter27 : this.success)
7359
          {
7360
            _iter27.write(oprot);
7361
          }
7362
          oprot.writeListEnd();
7363
        }
7364
        oprot.writeFieldEnd();
7365
      } else if (this.isSetPe()) {
7366
        oprot.writeFieldBegin(PE_FIELD_DESC);
7367
        this.pe.write(oprot);
7368
        oprot.writeFieldEnd();
7369
      }
7370
      oprot.writeFieldStop();
7371
      oprot.writeStructEnd();
7372
    }
7373
 
7374
    @Override
7375
    public String toString() {
7376
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_result(");
7377
      boolean first = true;
7378
 
7379
      sb.append("success:");
7380
      if (this.success == null) {
7381
        sb.append("null");
7382
      } else {
7383
        sb.append(this.success);
7384
      }
7385
      first = false;
7386
      if (!first) sb.append(", ");
7387
      sb.append("pe:");
7388
      if (this.pe == null) {
7389
        sb.append("null");
7390
      } else {
7391
        sb.append(this.pe);
7392
      }
7393
      first = false;
7394
      sb.append(")");
7395
      return sb.toString();
7396
    }
7397
 
7398
    public void validate() throws org.apache.thrift.TException {
7399
      // check for required fields
7400
    }
7401
 
7402
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7403
      try {
7404
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7405
      } catch (org.apache.thrift.TException te) {
7406
        throw new java.io.IOException(te);
7407
      }
7408
    }
7409
 
7410
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7411
      try {
7412
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7413
      } catch (org.apache.thrift.TException te) {
7414
        throw new java.io.IOException(te);
7415
      }
7416
    }
7417
 
7418
  }
7419
 
3430 rajveer 7420
  public static class getPayment_args implements org.apache.thrift.TBase<getPayment_args, getPayment_args._Fields>, java.io.Serializable, Cloneable   {
7421
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_args");
420 ashish 7422
 
3430 rajveer 7423
    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 7424
 
3430 rajveer 7425
    private long id; // required
420 ashish 7426
 
7427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7428
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7429
      ID((short)1, "id");
7430
 
7431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7432
 
7433
      static {
7434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7435
          byName.put(field.getFieldName(), field);
7436
        }
7437
      }
7438
 
7439
      /**
7440
       * Find the _Fields constant that matches fieldId, or null if its not found.
7441
       */
7442
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7443
        switch(fieldId) {
7444
          case 1: // ID
7445
            return ID;
7446
          default:
7447
            return null;
7448
        }
420 ashish 7449
      }
7450
 
7451
      /**
7452
       * Find the _Fields constant that matches fieldId, throwing an exception
7453
       * if it is not found.
7454
       */
7455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7456
        _Fields fields = findByThriftId(fieldId);
7457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7458
        return fields;
7459
      }
7460
 
7461
      /**
7462
       * Find the _Fields constant that matches name, or null if its not found.
7463
       */
7464
      public static _Fields findByName(String name) {
7465
        return byName.get(name);
7466
      }
7467
 
7468
      private final short _thriftId;
7469
      private final String _fieldName;
7470
 
7471
      _Fields(short thriftId, String fieldName) {
7472
        _thriftId = thriftId;
7473
        _fieldName = fieldName;
7474
      }
7475
 
7476
      public short getThriftFieldId() {
7477
        return _thriftId;
7478
      }
7479
 
7480
      public String getFieldName() {
7481
        return _fieldName;
7482
      }
7483
    }
7484
 
7485
    // isset id assignments
7486
    private static final int __ID_ISSET_ID = 0;
7487
    private BitSet __isset_bit_vector = new BitSet(1);
7488
 
3430 rajveer 7489
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7490
    static {
3430 rajveer 7491
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7492
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7493
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7494
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7495
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 7496
    }
7497
 
695 rajveer 7498
    public getPayment_args() {
420 ashish 7499
    }
7500
 
695 rajveer 7501
    public getPayment_args(
420 ashish 7502
      long id)
7503
    {
7504
      this();
7505
      this.id = id;
7506
      setIdIsSet(true);
7507
    }
7508
 
7509
    /**
7510
     * Performs a deep copy on <i>other</i>.
7511
     */
695 rajveer 7512
    public getPayment_args(getPayment_args other) {
420 ashish 7513
      __isset_bit_vector.clear();
7514
      __isset_bit_vector.or(other.__isset_bit_vector);
7515
      this.id = other.id;
7516
    }
7517
 
695 rajveer 7518
    public getPayment_args deepCopy() {
7519
      return new getPayment_args(this);
420 ashish 7520
    }
7521
 
3430 rajveer 7522
    @Override
7523
    public void clear() {
7524
      setIdIsSet(false);
7525
      this.id = 0;
420 ashish 7526
    }
7527
 
7528
    public long getId() {
7529
      return this.id;
7530
    }
7531
 
3430 rajveer 7532
    public void setId(long id) {
420 ashish 7533
      this.id = id;
7534
      setIdIsSet(true);
7535
    }
7536
 
7537
    public void unsetId() {
7538
      __isset_bit_vector.clear(__ID_ISSET_ID);
7539
    }
7540
 
3430 rajveer 7541
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 7542
    public boolean isSetId() {
7543
      return __isset_bit_vector.get(__ID_ISSET_ID);
7544
    }
7545
 
7546
    public void setIdIsSet(boolean value) {
7547
      __isset_bit_vector.set(__ID_ISSET_ID, value);
7548
    }
7549
 
7550
    public void setFieldValue(_Fields field, Object value) {
7551
      switch (field) {
7552
      case ID:
7553
        if (value == null) {
7554
          unsetId();
7555
        } else {
7556
          setId((Long)value);
7557
        }
7558
        break;
7559
 
7560
      }
7561
    }
7562
 
7563
    public Object getFieldValue(_Fields field) {
7564
      switch (field) {
7565
      case ID:
3430 rajveer 7566
        return Long.valueOf(getId());
420 ashish 7567
 
7568
      }
7569
      throw new IllegalStateException();
7570
    }
7571
 
3430 rajveer 7572
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7573
    public boolean isSet(_Fields field) {
7574
      if (field == null) {
7575
        throw new IllegalArgumentException();
7576
      }
420 ashish 7577
 
7578
      switch (field) {
7579
      case ID:
7580
        return isSetId();
7581
      }
7582
      throw new IllegalStateException();
7583
    }
7584
 
7585
    @Override
7586
    public boolean equals(Object that) {
7587
      if (that == null)
7588
        return false;
695 rajveer 7589
      if (that instanceof getPayment_args)
7590
        return this.equals((getPayment_args)that);
420 ashish 7591
      return false;
7592
    }
7593
 
695 rajveer 7594
    public boolean equals(getPayment_args that) {
420 ashish 7595
      if (that == null)
7596
        return false;
7597
 
7598
      boolean this_present_id = true;
7599
      boolean that_present_id = true;
7600
      if (this_present_id || that_present_id) {
7601
        if (!(this_present_id && that_present_id))
7602
          return false;
7603
        if (this.id != that.id)
7604
          return false;
7605
      }
7606
 
7607
      return true;
7608
    }
7609
 
7610
    @Override
7611
    public int hashCode() {
7612
      return 0;
7613
    }
7614
 
695 rajveer 7615
    public int compareTo(getPayment_args other) {
420 ashish 7616
      if (!getClass().equals(other.getClass())) {
7617
        return getClass().getName().compareTo(other.getClass().getName());
7618
      }
7619
 
7620
      int lastComparison = 0;
695 rajveer 7621
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 7622
 
3430 rajveer 7623
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 7624
      if (lastComparison != 0) {
7625
        return lastComparison;
7626
      }
3430 rajveer 7627
      if (isSetId()) {
7628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
7629
        if (lastComparison != 0) {
7630
          return lastComparison;
7631
        }
420 ashish 7632
      }
7633
      return 0;
7634
    }
7635
 
3430 rajveer 7636
    public _Fields fieldForId(int fieldId) {
7637
      return _Fields.findByThriftId(fieldId);
7638
    }
7639
 
7640
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7641
      org.apache.thrift.protocol.TField field;
420 ashish 7642
      iprot.readStructBegin();
7643
      while (true)
7644
      {
7645
        field = iprot.readFieldBegin();
3430 rajveer 7646
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7647
          break;
7648
        }
3430 rajveer 7649
        switch (field.id) {
7650
          case 1: // ID
7651
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7652
              this.id = iprot.readI64();
7653
              setIdIsSet(true);
7654
            } else { 
7655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7656
            }
7657
            break;
7658
          default:
7659
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7660
        }
3430 rajveer 7661
        iprot.readFieldEnd();
420 ashish 7662
      }
7663
      iprot.readStructEnd();
7664
      validate();
7665
    }
7666
 
3430 rajveer 7667
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7668
      validate();
7669
 
7670
      oprot.writeStructBegin(STRUCT_DESC);
7671
      oprot.writeFieldBegin(ID_FIELD_DESC);
7672
      oprot.writeI64(this.id);
7673
      oprot.writeFieldEnd();
7674
      oprot.writeFieldStop();
7675
      oprot.writeStructEnd();
7676
    }
7677
 
7678
    @Override
7679
    public String toString() {
695 rajveer 7680
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 7681
      boolean first = true;
7682
 
7683
      sb.append("id:");
7684
      sb.append(this.id);
7685
      first = false;
7686
      sb.append(")");
7687
      return sb.toString();
7688
    }
7689
 
3430 rajveer 7690
    public void validate() throws org.apache.thrift.TException {
420 ashish 7691
      // check for required fields
7692
    }
7693
 
3430 rajveer 7694
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7695
      try {
7696
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7697
      } catch (org.apache.thrift.TException te) {
7698
        throw new java.io.IOException(te);
7699
      }
7700
    }
7701
 
7702
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7703
      try {
7704
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7705
        __isset_bit_vector = new BitSet(1);
7706
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7707
      } catch (org.apache.thrift.TException te) {
7708
        throw new java.io.IOException(te);
7709
      }
7710
    }
7711
 
420 ashish 7712
  }
7713
 
3430 rajveer 7714
  public static class getPayment_result implements org.apache.thrift.TBase<getPayment_result, getPayment_result._Fields>, java.io.Serializable, Cloneable   {
7715
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_result");
420 ashish 7716
 
3430 rajveer 7717
    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);
7718
    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 7719
 
3430 rajveer 7720
    private Payment success; // required
7721
    private PaymentException pe; // required
420 ashish 7722
 
7723
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7724
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7725
      SUCCESS((short)0, "success"),
7726
      PE((short)1, "pe");
7727
 
7728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7729
 
7730
      static {
7731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7732
          byName.put(field.getFieldName(), field);
7733
        }
7734
      }
7735
 
7736
      /**
7737
       * Find the _Fields constant that matches fieldId, or null if its not found.
7738
       */
7739
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7740
        switch(fieldId) {
7741
          case 0: // SUCCESS
7742
            return SUCCESS;
7743
          case 1: // PE
7744
            return PE;
7745
          default:
7746
            return null;
7747
        }
420 ashish 7748
      }
7749
 
7750
      /**
7751
       * Find the _Fields constant that matches fieldId, throwing an exception
7752
       * if it is not found.
7753
       */
7754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7755
        _Fields fields = findByThriftId(fieldId);
7756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7757
        return fields;
7758
      }
7759
 
7760
      /**
7761
       * Find the _Fields constant that matches name, or null if its not found.
7762
       */
7763
      public static _Fields findByName(String name) {
7764
        return byName.get(name);
7765
      }
7766
 
7767
      private final short _thriftId;
7768
      private final String _fieldName;
7769
 
7770
      _Fields(short thriftId, String fieldName) {
7771
        _thriftId = thriftId;
7772
        _fieldName = fieldName;
7773
      }
7774
 
7775
      public short getThriftFieldId() {
7776
        return _thriftId;
7777
      }
7778
 
7779
      public String getFieldName() {
7780
        return _fieldName;
7781
      }
7782
    }
7783
 
7784
    // isset id assignments
7785
 
3430 rajveer 7786
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7787
    static {
3430 rajveer 7788
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7789
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7790
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
7791
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7792
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7793
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7794
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 7795
    }
7796
 
695 rajveer 7797
    public getPayment_result() {
420 ashish 7798
    }
7799
 
695 rajveer 7800
    public getPayment_result(
7801
      Payment success,
420 ashish 7802
      PaymentException pe)
7803
    {
7804
      this();
7805
      this.success = success;
7806
      this.pe = pe;
7807
    }
7808
 
7809
    /**
7810
     * Performs a deep copy on <i>other</i>.
7811
     */
695 rajveer 7812
    public getPayment_result(getPayment_result other) {
420 ashish 7813
      if (other.isSetSuccess()) {
695 rajveer 7814
        this.success = new Payment(other.success);
420 ashish 7815
      }
7816
      if (other.isSetPe()) {
7817
        this.pe = new PaymentException(other.pe);
7818
      }
7819
    }
7820
 
695 rajveer 7821
    public getPayment_result deepCopy() {
7822
      return new getPayment_result(this);
420 ashish 7823
    }
7824
 
3430 rajveer 7825
    @Override
7826
    public void clear() {
7827
      this.success = null;
7828
      this.pe = null;
420 ashish 7829
    }
7830
 
695 rajveer 7831
    public Payment getSuccess() {
420 ashish 7832
      return this.success;
7833
    }
7834
 
3430 rajveer 7835
    public void setSuccess(Payment success) {
420 ashish 7836
      this.success = success;
7837
    }
7838
 
7839
    public void unsetSuccess() {
7840
      this.success = null;
7841
    }
7842
 
3430 rajveer 7843
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 7844
    public boolean isSetSuccess() {
7845
      return this.success != null;
7846
    }
7847
 
7848
    public void setSuccessIsSet(boolean value) {
7849
      if (!value) {
7850
        this.success = null;
7851
      }
7852
    }
7853
 
7854
    public PaymentException getPe() {
7855
      return this.pe;
7856
    }
7857
 
3430 rajveer 7858
    public void setPe(PaymentException pe) {
420 ashish 7859
      this.pe = pe;
7860
    }
7861
 
7862
    public void unsetPe() {
7863
      this.pe = null;
7864
    }
7865
 
3430 rajveer 7866
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 7867
    public boolean isSetPe() {
7868
      return this.pe != null;
7869
    }
7870
 
7871
    public void setPeIsSet(boolean value) {
7872
      if (!value) {
7873
        this.pe = null;
7874
      }
7875
    }
7876
 
7877
    public void setFieldValue(_Fields field, Object value) {
7878
      switch (field) {
7879
      case SUCCESS:
7880
        if (value == null) {
7881
          unsetSuccess();
7882
        } else {
695 rajveer 7883
          setSuccess((Payment)value);
420 ashish 7884
        }
7885
        break;
7886
 
7887
      case PE:
7888
        if (value == null) {
7889
          unsetPe();
7890
        } else {
7891
          setPe((PaymentException)value);
7892
        }
7893
        break;
7894
 
7895
      }
7896
    }
7897
 
7898
    public Object getFieldValue(_Fields field) {
7899
      switch (field) {
7900
      case SUCCESS:
7901
        return getSuccess();
7902
 
7903
      case PE:
7904
        return getPe();
7905
 
7906
      }
7907
      throw new IllegalStateException();
7908
    }
7909
 
3430 rajveer 7910
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7911
    public boolean isSet(_Fields field) {
7912
      if (field == null) {
7913
        throw new IllegalArgumentException();
7914
      }
420 ashish 7915
 
7916
      switch (field) {
7917
      case SUCCESS:
7918
        return isSetSuccess();
7919
      case PE:
7920
        return isSetPe();
7921
      }
7922
      throw new IllegalStateException();
7923
    }
7924
 
7925
    @Override
7926
    public boolean equals(Object that) {
7927
      if (that == null)
7928
        return false;
695 rajveer 7929
      if (that instanceof getPayment_result)
7930
        return this.equals((getPayment_result)that);
420 ashish 7931
      return false;
7932
    }
7933
 
695 rajveer 7934
    public boolean equals(getPayment_result that) {
420 ashish 7935
      if (that == null)
7936
        return false;
7937
 
7938
      boolean this_present_success = true && this.isSetSuccess();
7939
      boolean that_present_success = true && that.isSetSuccess();
7940
      if (this_present_success || that_present_success) {
7941
        if (!(this_present_success && that_present_success))
7942
          return false;
7943
        if (!this.success.equals(that.success))
7944
          return false;
7945
      }
7946
 
7947
      boolean this_present_pe = true && this.isSetPe();
7948
      boolean that_present_pe = true && that.isSetPe();
7949
      if (this_present_pe || that_present_pe) {
7950
        if (!(this_present_pe && that_present_pe))
7951
          return false;
7952
        if (!this.pe.equals(that.pe))
7953
          return false;
7954
      }
7955
 
7956
      return true;
7957
    }
7958
 
7959
    @Override
7960
    public int hashCode() {
7961
      return 0;
7962
    }
7963
 
695 rajveer 7964
    public int compareTo(getPayment_result other) {
420 ashish 7965
      if (!getClass().equals(other.getClass())) {
7966
        return getClass().getName().compareTo(other.getClass().getName());
7967
      }
7968
 
7969
      int lastComparison = 0;
695 rajveer 7970
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 7971
 
3430 rajveer 7972
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 7973
      if (lastComparison != 0) {
7974
        return lastComparison;
7975
      }
3430 rajveer 7976
      if (isSetSuccess()) {
7977
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7978
        if (lastComparison != 0) {
7979
          return lastComparison;
7980
        }
420 ashish 7981
      }
3430 rajveer 7982
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 7983
      if (lastComparison != 0) {
7984
        return lastComparison;
7985
      }
3430 rajveer 7986
      if (isSetPe()) {
7987
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7988
        if (lastComparison != 0) {
7989
          return lastComparison;
7990
        }
420 ashish 7991
      }
7992
      return 0;
7993
    }
7994
 
3430 rajveer 7995
    public _Fields fieldForId(int fieldId) {
7996
      return _Fields.findByThriftId(fieldId);
7997
    }
7998
 
7999
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8000
      org.apache.thrift.protocol.TField field;
420 ashish 8001
      iprot.readStructBegin();
8002
      while (true)
8003
      {
8004
        field = iprot.readFieldBegin();
3430 rajveer 8005
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8006
          break;
8007
        }
3430 rajveer 8008
        switch (field.id) {
8009
          case 0: // SUCCESS
8010
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8011
              this.success = new Payment();
8012
              this.success.read(iprot);
8013
            } else { 
8014
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8015
            }
8016
            break;
8017
          case 1: // PE
8018
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8019
              this.pe = new PaymentException();
8020
              this.pe.read(iprot);
8021
            } else { 
8022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8023
            }
8024
            break;
8025
          default:
8026
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8027
        }
3430 rajveer 8028
        iprot.readFieldEnd();
420 ashish 8029
      }
8030
      iprot.readStructEnd();
8031
      validate();
8032
    }
8033
 
3430 rajveer 8034
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8035
      oprot.writeStructBegin(STRUCT_DESC);
8036
 
695 rajveer 8037
      if (this.isSetSuccess()) {
8038
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8039
        this.success.write(oprot);
8040
        oprot.writeFieldEnd();
8041
      } else if (this.isSetPe()) {
420 ashish 8042
        oprot.writeFieldBegin(PE_FIELD_DESC);
8043
        this.pe.write(oprot);
8044
        oprot.writeFieldEnd();
8045
      }
8046
      oprot.writeFieldStop();
8047
      oprot.writeStructEnd();
8048
    }
8049
 
8050
    @Override
8051
    public String toString() {
695 rajveer 8052
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 8053
      boolean first = true;
8054
 
695 rajveer 8055
      sb.append("success:");
8056
      if (this.success == null) {
8057
        sb.append("null");
8058
      } else {
8059
        sb.append(this.success);
8060
      }
8061
      first = false;
8062
      if (!first) sb.append(", ");
420 ashish 8063
      sb.append("pe:");
8064
      if (this.pe == null) {
8065
        sb.append("null");
8066
      } else {
8067
        sb.append(this.pe);
8068
      }
8069
      first = false;
8070
      sb.append(")");
8071
      return sb.toString();
8072
    }
8073
 
3430 rajveer 8074
    public void validate() throws org.apache.thrift.TException {
420 ashish 8075
      // check for required fields
8076
    }
8077
 
3430 rajveer 8078
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8079
      try {
8080
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8081
      } catch (org.apache.thrift.TException te) {
8082
        throw new java.io.IOException(te);
8083
      }
8084
    }
8085
 
8086
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8087
      try {
8088
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8089
      } catch (org.apache.thrift.TException te) {
8090
        throw new java.io.IOException(te);
8091
      }
8092
    }
8093
 
420 ashish 8094
  }
8095
 
3430 rajveer 8096
  public static class getPaymentForTxnId_args implements org.apache.thrift.TBase<getPaymentForTxnId_args, getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
8097
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_args");
420 ashish 8098
 
3430 rajveer 8099
    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 8100
 
3430 rajveer 8101
    private long txnId; // required
420 ashish 8102
 
8103
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8104
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 8105
      TXN_ID((short)1, "txnId");
420 ashish 8106
 
8107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8108
 
8109
      static {
8110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8111
          byName.put(field.getFieldName(), field);
8112
        }
8113
      }
8114
 
8115
      /**
8116
       * Find the _Fields constant that matches fieldId, or null if its not found.
8117
       */
8118
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8119
        switch(fieldId) {
8120
          case 1: // TXN_ID
8121
            return TXN_ID;
8122
          default:
8123
            return null;
8124
        }
420 ashish 8125
      }
8126
 
8127
      /**
8128
       * Find the _Fields constant that matches fieldId, throwing an exception
8129
       * if it is not found.
8130
       */
8131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8132
        _Fields fields = findByThriftId(fieldId);
8133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8134
        return fields;
8135
      }
8136
 
8137
      /**
8138
       * Find the _Fields constant that matches name, or null if its not found.
8139
       */
8140
      public static _Fields findByName(String name) {
8141
        return byName.get(name);
8142
      }
8143
 
8144
      private final short _thriftId;
8145
      private final String _fieldName;
8146
 
8147
      _Fields(short thriftId, String fieldName) {
8148
        _thriftId = thriftId;
8149
        _fieldName = fieldName;
8150
      }
8151
 
8152
      public short getThriftFieldId() {
8153
        return _thriftId;
8154
      }
8155
 
8156
      public String getFieldName() {
8157
        return _fieldName;
8158
      }
8159
    }
8160
 
8161
    // isset id assignments
695 rajveer 8162
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 8163
    private BitSet __isset_bit_vector = new BitSet(1);
8164
 
3430 rajveer 8165
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8166
    static {
3430 rajveer 8167
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8168
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8169
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8170
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8171
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 8172
    }
8173
 
695 rajveer 8174
    public getPaymentForTxnId_args() {
420 ashish 8175
    }
8176
 
695 rajveer 8177
    public getPaymentForTxnId_args(
8178
      long txnId)
420 ashish 8179
    {
8180
      this();
695 rajveer 8181
      this.txnId = txnId;
8182
      setTxnIdIsSet(true);
420 ashish 8183
    }
8184
 
8185
    /**
8186
     * Performs a deep copy on <i>other</i>.
8187
     */
695 rajveer 8188
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 8189
      __isset_bit_vector.clear();
8190
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 8191
      this.txnId = other.txnId;
420 ashish 8192
    }
8193
 
695 rajveer 8194
    public getPaymentForTxnId_args deepCopy() {
8195
      return new getPaymentForTxnId_args(this);
420 ashish 8196
    }
8197
 
3430 rajveer 8198
    @Override
8199
    public void clear() {
8200
      setTxnIdIsSet(false);
8201
      this.txnId = 0;
420 ashish 8202
    }
8203
 
695 rajveer 8204
    public long getTxnId() {
8205
      return this.txnId;
420 ashish 8206
    }
8207
 
3430 rajveer 8208
    public void setTxnId(long txnId) {
695 rajveer 8209
      this.txnId = txnId;
8210
      setTxnIdIsSet(true);
420 ashish 8211
    }
8212
 
695 rajveer 8213
    public void unsetTxnId() {
8214
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 8215
    }
8216
 
3430 rajveer 8217
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 8218
    public boolean isSetTxnId() {
8219
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 8220
    }
8221
 
695 rajveer 8222
    public void setTxnIdIsSet(boolean value) {
8223
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 8224
    }
8225
 
8226
    public void setFieldValue(_Fields field, Object value) {
8227
      switch (field) {
695 rajveer 8228
      case TXN_ID:
420 ashish 8229
        if (value == null) {
695 rajveer 8230
          unsetTxnId();
420 ashish 8231
        } else {
695 rajveer 8232
          setTxnId((Long)value);
420 ashish 8233
        }
8234
        break;
8235
 
8236
      }
8237
    }
8238
 
8239
    public Object getFieldValue(_Fields field) {
8240
      switch (field) {
695 rajveer 8241
      case TXN_ID:
3430 rajveer 8242
        return Long.valueOf(getTxnId());
420 ashish 8243
 
8244
      }
8245
      throw new IllegalStateException();
8246
    }
8247
 
3430 rajveer 8248
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8249
    public boolean isSet(_Fields field) {
8250
      if (field == null) {
8251
        throw new IllegalArgumentException();
8252
      }
420 ashish 8253
 
8254
      switch (field) {
695 rajveer 8255
      case TXN_ID:
8256
        return isSetTxnId();
420 ashish 8257
      }
8258
      throw new IllegalStateException();
8259
    }
8260
 
8261
    @Override
8262
    public boolean equals(Object that) {
8263
      if (that == null)
8264
        return false;
695 rajveer 8265
      if (that instanceof getPaymentForTxnId_args)
8266
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 8267
      return false;
8268
    }
8269
 
695 rajveer 8270
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 8271
      if (that == null)
8272
        return false;
8273
 
695 rajveer 8274
      boolean this_present_txnId = true;
8275
      boolean that_present_txnId = true;
8276
      if (this_present_txnId || that_present_txnId) {
8277
        if (!(this_present_txnId && that_present_txnId))
420 ashish 8278
          return false;
695 rajveer 8279
        if (this.txnId != that.txnId)
420 ashish 8280
          return false;
8281
      }
8282
 
8283
      return true;
8284
    }
8285
 
8286
    @Override
8287
    public int hashCode() {
8288
      return 0;
8289
    }
8290
 
695 rajveer 8291
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 8292
      if (!getClass().equals(other.getClass())) {
8293
        return getClass().getName().compareTo(other.getClass().getName());
8294
      }
8295
 
8296
      int lastComparison = 0;
695 rajveer 8297
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 8298
 
3430 rajveer 8299
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
420 ashish 8300
      if (lastComparison != 0) {
8301
        return lastComparison;
8302
      }
3430 rajveer 8303
      if (isSetTxnId()) {
8304
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
8305
        if (lastComparison != 0) {
8306
          return lastComparison;
8307
        }
420 ashish 8308
      }
8309
      return 0;
8310
    }
8311
 
3430 rajveer 8312
    public _Fields fieldForId(int fieldId) {
8313
      return _Fields.findByThriftId(fieldId);
8314
    }
8315
 
8316
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8317
      org.apache.thrift.protocol.TField field;
420 ashish 8318
      iprot.readStructBegin();
8319
      while (true)
8320
      {
8321
        field = iprot.readFieldBegin();
3430 rajveer 8322
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8323
          break;
8324
        }
3430 rajveer 8325
        switch (field.id) {
8326
          case 1: // TXN_ID
8327
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8328
              this.txnId = iprot.readI64();
8329
              setTxnIdIsSet(true);
8330
            } else { 
8331
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8332
            }
8333
            break;
8334
          default:
8335
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8336
        }
3430 rajveer 8337
        iprot.readFieldEnd();
420 ashish 8338
      }
8339
      iprot.readStructEnd();
8340
      validate();
8341
    }
8342
 
3430 rajveer 8343
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8344
      validate();
8345
 
8346
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 8347
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
8348
      oprot.writeI64(this.txnId);
420 ashish 8349
      oprot.writeFieldEnd();
8350
      oprot.writeFieldStop();
8351
      oprot.writeStructEnd();
8352
    }
8353
 
8354
    @Override
8355
    public String toString() {
695 rajveer 8356
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 8357
      boolean first = true;
8358
 
695 rajveer 8359
      sb.append("txnId:");
8360
      sb.append(this.txnId);
420 ashish 8361
      first = false;
8362
      sb.append(")");
8363
      return sb.toString();
8364
    }
8365
 
3430 rajveer 8366
    public void validate() throws org.apache.thrift.TException {
420 ashish 8367
      // check for required fields
8368
    }
8369
 
3430 rajveer 8370
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8371
      try {
8372
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8373
      } catch (org.apache.thrift.TException te) {
8374
        throw new java.io.IOException(te);
8375
      }
8376
    }
8377
 
8378
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8379
      try {
8380
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8381
        __isset_bit_vector = new BitSet(1);
8382
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8383
      } catch (org.apache.thrift.TException te) {
8384
        throw new java.io.IOException(te);
8385
      }
8386
    }
8387
 
420 ashish 8388
  }
8389
 
3430 rajveer 8390
  public static class getPaymentForTxnId_result implements org.apache.thrift.TBase<getPaymentForTxnId_result, getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
8391
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_result");
420 ashish 8392
 
3430 rajveer 8393
    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);
8394
    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 8395
 
3430 rajveer 8396
    private List<Payment> success; // required
8397
    private PaymentException pe; // required
420 ashish 8398
 
8399
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8400
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 8401
      SUCCESS((short)0, "success"),
8402
      PE((short)1, "pe");
8403
 
8404
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8405
 
8406
      static {
8407
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8408
          byName.put(field.getFieldName(), field);
8409
        }
8410
      }
8411
 
8412
      /**
8413
       * Find the _Fields constant that matches fieldId, or null if its not found.
8414
       */
8415
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8416
        switch(fieldId) {
8417
          case 0: // SUCCESS
8418
            return SUCCESS;
8419
          case 1: // PE
8420
            return PE;
8421
          default:
8422
            return null;
8423
        }
420 ashish 8424
      }
8425
 
8426
      /**
8427
       * Find the _Fields constant that matches fieldId, throwing an exception
8428
       * if it is not found.
8429
       */
8430
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8431
        _Fields fields = findByThriftId(fieldId);
8432
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8433
        return fields;
8434
      }
8435
 
8436
      /**
8437
       * Find the _Fields constant that matches name, or null if its not found.
8438
       */
8439
      public static _Fields findByName(String name) {
8440
        return byName.get(name);
8441
      }
8442
 
8443
      private final short _thriftId;
8444
      private final String _fieldName;
8445
 
8446
      _Fields(short thriftId, String fieldName) {
8447
        _thriftId = thriftId;
8448
        _fieldName = fieldName;
8449
      }
8450
 
8451
      public short getThriftFieldId() {
8452
        return _thriftId;
8453
      }
8454
 
8455
      public String getFieldName() {
8456
        return _fieldName;
8457
      }
8458
    }
8459
 
8460
    // isset id assignments
8461
 
3430 rajveer 8462
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8463
    static {
3430 rajveer 8464
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8465
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8466
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8467
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
8468
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8469
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8470
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8471
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 8472
    }
8473
 
695 rajveer 8474
    public getPaymentForTxnId_result() {
420 ashish 8475
    }
8476
 
695 rajveer 8477
    public getPaymentForTxnId_result(
8478
      List<Payment> success,
420 ashish 8479
      PaymentException pe)
8480
    {
8481
      this();
8482
      this.success = success;
8483
      this.pe = pe;
8484
    }
8485
 
8486
    /**
8487
     * Performs a deep copy on <i>other</i>.
8488
     */
695 rajveer 8489
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 8490
      if (other.isSetSuccess()) {
695 rajveer 8491
        List<Payment> __this__success = new ArrayList<Payment>();
8492
        for (Payment other_element : other.success) {
8493
          __this__success.add(new Payment(other_element));
8494
        }
8495
        this.success = __this__success;
420 ashish 8496
      }
8497
      if (other.isSetPe()) {
8498
        this.pe = new PaymentException(other.pe);
8499
      }
8500
    }
8501
 
695 rajveer 8502
    public getPaymentForTxnId_result deepCopy() {
8503
      return new getPaymentForTxnId_result(this);
420 ashish 8504
    }
8505
 
3430 rajveer 8506
    @Override
8507
    public void clear() {
8508
      this.success = null;
8509
      this.pe = null;
420 ashish 8510
    }
8511
 
695 rajveer 8512
    public int getSuccessSize() {
8513
      return (this.success == null) ? 0 : this.success.size();
8514
    }
8515
 
8516
    public java.util.Iterator<Payment> getSuccessIterator() {
8517
      return (this.success == null) ? null : this.success.iterator();
8518
    }
8519
 
8520
    public void addToSuccess(Payment elem) {
8521
      if (this.success == null) {
8522
        this.success = new ArrayList<Payment>();
8523
      }
8524
      this.success.add(elem);
8525
    }
8526
 
8527
    public List<Payment> getSuccess() {
420 ashish 8528
      return this.success;
8529
    }
8530
 
3430 rajveer 8531
    public void setSuccess(List<Payment> success) {
420 ashish 8532
      this.success = success;
8533
    }
8534
 
8535
    public void unsetSuccess() {
8536
      this.success = null;
8537
    }
8538
 
3430 rajveer 8539
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 8540
    public boolean isSetSuccess() {
8541
      return this.success != null;
8542
    }
8543
 
8544
    public void setSuccessIsSet(boolean value) {
8545
      if (!value) {
8546
        this.success = null;
8547
      }
8548
    }
8549
 
8550
    public PaymentException getPe() {
8551
      return this.pe;
8552
    }
8553
 
3430 rajveer 8554
    public void setPe(PaymentException pe) {
420 ashish 8555
      this.pe = pe;
8556
    }
8557
 
8558
    public void unsetPe() {
8559
      this.pe = null;
8560
    }
8561
 
3430 rajveer 8562
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 8563
    public boolean isSetPe() {
8564
      return this.pe != null;
8565
    }
8566
 
8567
    public void setPeIsSet(boolean value) {
8568
      if (!value) {
8569
        this.pe = null;
8570
      }
8571
    }
8572
 
8573
    public void setFieldValue(_Fields field, Object value) {
8574
      switch (field) {
8575
      case SUCCESS:
8576
        if (value == null) {
8577
          unsetSuccess();
8578
        } else {
695 rajveer 8579
          setSuccess((List<Payment>)value);
420 ashish 8580
        }
8581
        break;
8582
 
8583
      case PE:
8584
        if (value == null) {
8585
          unsetPe();
8586
        } else {
8587
          setPe((PaymentException)value);
8588
        }
8589
        break;
8590
 
8591
      }
8592
    }
8593
 
8594
    public Object getFieldValue(_Fields field) {
8595
      switch (field) {
8596
      case SUCCESS:
8597
        return getSuccess();
8598
 
8599
      case PE:
8600
        return getPe();
8601
 
8602
      }
8603
      throw new IllegalStateException();
8604
    }
8605
 
3430 rajveer 8606
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8607
    public boolean isSet(_Fields field) {
8608
      if (field == null) {
8609
        throw new IllegalArgumentException();
8610
      }
420 ashish 8611
 
8612
      switch (field) {
8613
      case SUCCESS:
8614
        return isSetSuccess();
8615
      case PE:
8616
        return isSetPe();
8617
      }
8618
      throw new IllegalStateException();
8619
    }
8620
 
8621
    @Override
8622
    public boolean equals(Object that) {
8623
      if (that == null)
8624
        return false;
695 rajveer 8625
      if (that instanceof getPaymentForTxnId_result)
8626
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 8627
      return false;
8628
    }
8629
 
695 rajveer 8630
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 8631
      if (that == null)
8632
        return false;
8633
 
8634
      boolean this_present_success = true && this.isSetSuccess();
8635
      boolean that_present_success = true && that.isSetSuccess();
8636
      if (this_present_success || that_present_success) {
8637
        if (!(this_present_success && that_present_success))
8638
          return false;
8639
        if (!this.success.equals(that.success))
8640
          return false;
8641
      }
8642
 
8643
      boolean this_present_pe = true && this.isSetPe();
8644
      boolean that_present_pe = true && that.isSetPe();
8645
      if (this_present_pe || that_present_pe) {
8646
        if (!(this_present_pe && that_present_pe))
8647
          return false;
8648
        if (!this.pe.equals(that.pe))
8649
          return false;
8650
      }
8651
 
8652
      return true;
8653
    }
8654
 
8655
    @Override
8656
    public int hashCode() {
8657
      return 0;
8658
    }
8659
 
695 rajveer 8660
    public int compareTo(getPaymentForTxnId_result other) {
8661
      if (!getClass().equals(other.getClass())) {
8662
        return getClass().getName().compareTo(other.getClass().getName());
8663
      }
8664
 
8665
      int lastComparison = 0;
8666
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
8667
 
3430 rajveer 8668
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 8669
      if (lastComparison != 0) {
8670
        return lastComparison;
8671
      }
3430 rajveer 8672
      if (isSetSuccess()) {
8673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8674
        if (lastComparison != 0) {
8675
          return lastComparison;
8676
        }
695 rajveer 8677
      }
3430 rajveer 8678
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 8679
      if (lastComparison != 0) {
8680
        return lastComparison;
8681
      }
3430 rajveer 8682
      if (isSetPe()) {
8683
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
8684
        if (lastComparison != 0) {
8685
          return lastComparison;
8686
        }
695 rajveer 8687
      }
8688
      return 0;
8689
    }
8690
 
3430 rajveer 8691
    public _Fields fieldForId(int fieldId) {
8692
      return _Fields.findByThriftId(fieldId);
8693
    }
8694
 
8695
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8696
      org.apache.thrift.protocol.TField field;
420 ashish 8697
      iprot.readStructBegin();
8698
      while (true)
8699
      {
8700
        field = iprot.readFieldBegin();
3430 rajveer 8701
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8702
          break;
8703
        }
3430 rajveer 8704
        switch (field.id) {
8705
          case 0: // SUCCESS
8706
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8707
              {
4600 varun.gupt 8708
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
8709
                this.success = new ArrayList<Payment>(_list28.size);
8710
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
695 rajveer 8711
                {
4600 varun.gupt 8712
                  Payment _elem30; // required
8713
                  _elem30 = new Payment();
8714
                  _elem30.read(iprot);
8715
                  this.success.add(_elem30);
695 rajveer 8716
                }
3430 rajveer 8717
                iprot.readListEnd();
420 ashish 8718
              }
3430 rajveer 8719
            } else { 
8720
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8721
            }
8722
            break;
8723
          case 1: // PE
8724
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8725
              this.pe = new PaymentException();
8726
              this.pe.read(iprot);
8727
            } else { 
8728
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8729
            }
8730
            break;
8731
          default:
8732
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8733
        }
3430 rajveer 8734
        iprot.readFieldEnd();
420 ashish 8735
      }
8736
      iprot.readStructEnd();
8737
      validate();
8738
    }
8739
 
3430 rajveer 8740
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8741
      oprot.writeStructBegin(STRUCT_DESC);
8742
 
8743
      if (this.isSetSuccess()) {
8744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 8745
        {
3430 rajveer 8746
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4600 varun.gupt 8747
          for (Payment _iter31 : this.success)
695 rajveer 8748
          {
4600 varun.gupt 8749
            _iter31.write(oprot);
695 rajveer 8750
          }
8751
          oprot.writeListEnd();
8752
        }
420 ashish 8753
        oprot.writeFieldEnd();
8754
      } else if (this.isSetPe()) {
8755
        oprot.writeFieldBegin(PE_FIELD_DESC);
8756
        this.pe.write(oprot);
8757
        oprot.writeFieldEnd();
8758
      }
8759
      oprot.writeFieldStop();
8760
      oprot.writeStructEnd();
8761
    }
8762
 
8763
    @Override
8764
    public String toString() {
695 rajveer 8765
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 8766
      boolean first = true;
8767
 
8768
      sb.append("success:");
8769
      if (this.success == null) {
8770
        sb.append("null");
8771
      } else {
8772
        sb.append(this.success);
8773
      }
8774
      first = false;
8775
      if (!first) sb.append(", ");
8776
      sb.append("pe:");
8777
      if (this.pe == null) {
8778
        sb.append("null");
8779
      } else {
8780
        sb.append(this.pe);
8781
      }
8782
      first = false;
8783
      sb.append(")");
8784
      return sb.toString();
8785
    }
8786
 
3430 rajveer 8787
    public void validate() throws org.apache.thrift.TException {
420 ashish 8788
      // check for required fields
8789
    }
8790
 
3430 rajveer 8791
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8792
      try {
8793
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8794
      } catch (org.apache.thrift.TException te) {
8795
        throw new java.io.IOException(te);
8796
      }
8797
    }
8798
 
8799
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8800
      try {
8801
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8802
      } catch (org.apache.thrift.TException te) {
8803
        throw new java.io.IOException(te);
8804
      }
8805
    }
8806
 
420 ashish 8807
  }
8808
 
7049 anupam.sin 8809
  public static class getPaymentForRechargeTxnId_args implements org.apache.thrift.TBase<getPaymentForRechargeTxnId_args, getPaymentForRechargeTxnId_args._Fields>, java.io.Serializable, Cloneable   {
8810
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForRechargeTxnId_args");
8811
 
8812
    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);
8813
 
8814
    private long txnId; // required
8815
 
8816
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8817
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8818
      TXN_ID((short)1, "txnId");
8819
 
8820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8821
 
8822
      static {
8823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8824
          byName.put(field.getFieldName(), field);
8825
        }
8826
      }
8827
 
8828
      /**
8829
       * Find the _Fields constant that matches fieldId, or null if its not found.
8830
       */
8831
      public static _Fields findByThriftId(int fieldId) {
8832
        switch(fieldId) {
8833
          case 1: // TXN_ID
8834
            return TXN_ID;
8835
          default:
8836
            return null;
8837
        }
8838
      }
8839
 
8840
      /**
8841
       * Find the _Fields constant that matches fieldId, throwing an exception
8842
       * if it is not found.
8843
       */
8844
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8845
        _Fields fields = findByThriftId(fieldId);
8846
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8847
        return fields;
8848
      }
8849
 
8850
      /**
8851
       * Find the _Fields constant that matches name, or null if its not found.
8852
       */
8853
      public static _Fields findByName(String name) {
8854
        return byName.get(name);
8855
      }
8856
 
8857
      private final short _thriftId;
8858
      private final String _fieldName;
8859
 
8860
      _Fields(short thriftId, String fieldName) {
8861
        _thriftId = thriftId;
8862
        _fieldName = fieldName;
8863
      }
8864
 
8865
      public short getThriftFieldId() {
8866
        return _thriftId;
8867
      }
8868
 
8869
      public String getFieldName() {
8870
        return _fieldName;
8871
      }
8872
    }
8873
 
8874
    // isset id assignments
8875
    private static final int __TXNID_ISSET_ID = 0;
8876
    private BitSet __isset_bit_vector = new BitSet(1);
8877
 
8878
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8879
    static {
8880
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8881
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8882
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8883
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8884
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForRechargeTxnId_args.class, metaDataMap);
8885
    }
8886
 
8887
    public getPaymentForRechargeTxnId_args() {
8888
    }
8889
 
8890
    public getPaymentForRechargeTxnId_args(
8891
      long txnId)
8892
    {
8893
      this();
8894
      this.txnId = txnId;
8895
      setTxnIdIsSet(true);
8896
    }
8897
 
8898
    /**
8899
     * Performs a deep copy on <i>other</i>.
8900
     */
8901
    public getPaymentForRechargeTxnId_args(getPaymentForRechargeTxnId_args other) {
8902
      __isset_bit_vector.clear();
8903
      __isset_bit_vector.or(other.__isset_bit_vector);
8904
      this.txnId = other.txnId;
8905
    }
8906
 
8907
    public getPaymentForRechargeTxnId_args deepCopy() {
8908
      return new getPaymentForRechargeTxnId_args(this);
8909
    }
8910
 
8911
    @Override
8912
    public void clear() {
8913
      setTxnIdIsSet(false);
8914
      this.txnId = 0;
8915
    }
8916
 
8917
    public long getTxnId() {
8918
      return this.txnId;
8919
    }
8920
 
8921
    public void setTxnId(long txnId) {
8922
      this.txnId = txnId;
8923
      setTxnIdIsSet(true);
8924
    }
8925
 
8926
    public void unsetTxnId() {
8927
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
8928
    }
8929
 
8930
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
8931
    public boolean isSetTxnId() {
8932
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
8933
    }
8934
 
8935
    public void setTxnIdIsSet(boolean value) {
8936
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
8937
    }
8938
 
8939
    public void setFieldValue(_Fields field, Object value) {
8940
      switch (field) {
8941
      case TXN_ID:
8942
        if (value == null) {
8943
          unsetTxnId();
8944
        } else {
8945
          setTxnId((Long)value);
8946
        }
8947
        break;
8948
 
8949
      }
8950
    }
8951
 
8952
    public Object getFieldValue(_Fields field) {
8953
      switch (field) {
8954
      case TXN_ID:
8955
        return Long.valueOf(getTxnId());
8956
 
8957
      }
8958
      throw new IllegalStateException();
8959
    }
8960
 
8961
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8962
    public boolean isSet(_Fields field) {
8963
      if (field == null) {
8964
        throw new IllegalArgumentException();
8965
      }
8966
 
8967
      switch (field) {
8968
      case TXN_ID:
8969
        return isSetTxnId();
8970
      }
8971
      throw new IllegalStateException();
8972
    }
8973
 
8974
    @Override
8975
    public boolean equals(Object that) {
8976
      if (that == null)
8977
        return false;
8978
      if (that instanceof getPaymentForRechargeTxnId_args)
8979
        return this.equals((getPaymentForRechargeTxnId_args)that);
8980
      return false;
8981
    }
8982
 
8983
    public boolean equals(getPaymentForRechargeTxnId_args that) {
8984
      if (that == null)
8985
        return false;
8986
 
8987
      boolean this_present_txnId = true;
8988
      boolean that_present_txnId = true;
8989
      if (this_present_txnId || that_present_txnId) {
8990
        if (!(this_present_txnId && that_present_txnId))
8991
          return false;
8992
        if (this.txnId != that.txnId)
8993
          return false;
8994
      }
8995
 
8996
      return true;
8997
    }
8998
 
8999
    @Override
9000
    public int hashCode() {
9001
      return 0;
9002
    }
9003
 
9004
    public int compareTo(getPaymentForRechargeTxnId_args other) {
9005
      if (!getClass().equals(other.getClass())) {
9006
        return getClass().getName().compareTo(other.getClass().getName());
9007
      }
9008
 
9009
      int lastComparison = 0;
9010
      getPaymentForRechargeTxnId_args typedOther = (getPaymentForRechargeTxnId_args)other;
9011
 
9012
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
9013
      if (lastComparison != 0) {
9014
        return lastComparison;
9015
      }
9016
      if (isSetTxnId()) {
9017
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
9018
        if (lastComparison != 0) {
9019
          return lastComparison;
9020
        }
9021
      }
9022
      return 0;
9023
    }
9024
 
9025
    public _Fields fieldForId(int fieldId) {
9026
      return _Fields.findByThriftId(fieldId);
9027
    }
9028
 
9029
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9030
      org.apache.thrift.protocol.TField field;
9031
      iprot.readStructBegin();
9032
      while (true)
9033
      {
9034
        field = iprot.readFieldBegin();
9035
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9036
          break;
9037
        }
9038
        switch (field.id) {
9039
          case 1: // TXN_ID
9040
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9041
              this.txnId = iprot.readI64();
9042
              setTxnIdIsSet(true);
9043
            } else { 
9044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9045
            }
9046
            break;
9047
          default:
9048
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9049
        }
9050
        iprot.readFieldEnd();
9051
      }
9052
      iprot.readStructEnd();
9053
      validate();
9054
    }
9055
 
9056
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9057
      validate();
9058
 
9059
      oprot.writeStructBegin(STRUCT_DESC);
9060
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
9061
      oprot.writeI64(this.txnId);
9062
      oprot.writeFieldEnd();
9063
      oprot.writeFieldStop();
9064
      oprot.writeStructEnd();
9065
    }
9066
 
9067
    @Override
9068
    public String toString() {
9069
      StringBuilder sb = new StringBuilder("getPaymentForRechargeTxnId_args(");
9070
      boolean first = true;
9071
 
9072
      sb.append("txnId:");
9073
      sb.append(this.txnId);
9074
      first = false;
9075
      sb.append(")");
9076
      return sb.toString();
9077
    }
9078
 
9079
    public void validate() throws org.apache.thrift.TException {
9080
      // check for required fields
9081
    }
9082
 
9083
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9084
      try {
9085
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9086
      } catch (org.apache.thrift.TException te) {
9087
        throw new java.io.IOException(te);
9088
      }
9089
    }
9090
 
9091
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9092
      try {
9093
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9094
        __isset_bit_vector = new BitSet(1);
9095
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9096
      } catch (org.apache.thrift.TException te) {
9097
        throw new java.io.IOException(te);
9098
      }
9099
    }
9100
 
9101
  }
9102
 
9103
  public static class getPaymentForRechargeTxnId_result implements org.apache.thrift.TBase<getPaymentForRechargeTxnId_result, getPaymentForRechargeTxnId_result._Fields>, java.io.Serializable, Cloneable   {
9104
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForRechargeTxnId_result");
9105
 
9106
    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);
9107
    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);
9108
 
9109
    private List<Payment> success; // required
9110
    private PaymentException pe; // required
9111
 
9112
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9113
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9114
      SUCCESS((short)0, "success"),
9115
      PE((short)1, "pe");
9116
 
9117
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9118
 
9119
      static {
9120
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9121
          byName.put(field.getFieldName(), field);
9122
        }
9123
      }
9124
 
9125
      /**
9126
       * Find the _Fields constant that matches fieldId, or null if its not found.
9127
       */
9128
      public static _Fields findByThriftId(int fieldId) {
9129
        switch(fieldId) {
9130
          case 0: // SUCCESS
9131
            return SUCCESS;
9132
          case 1: // PE
9133
            return PE;
9134
          default:
9135
            return null;
9136
        }
9137
      }
9138
 
9139
      /**
9140
       * Find the _Fields constant that matches fieldId, throwing an exception
9141
       * if it is not found.
9142
       */
9143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9144
        _Fields fields = findByThriftId(fieldId);
9145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9146
        return fields;
9147
      }
9148
 
9149
      /**
9150
       * Find the _Fields constant that matches name, or null if its not found.
9151
       */
9152
      public static _Fields findByName(String name) {
9153
        return byName.get(name);
9154
      }
9155
 
9156
      private final short _thriftId;
9157
      private final String _fieldName;
9158
 
9159
      _Fields(short thriftId, String fieldName) {
9160
        _thriftId = thriftId;
9161
        _fieldName = fieldName;
9162
      }
9163
 
9164
      public short getThriftFieldId() {
9165
        return _thriftId;
9166
      }
9167
 
9168
      public String getFieldName() {
9169
        return _fieldName;
9170
      }
9171
    }
9172
 
9173
    // isset id assignments
9174
 
9175
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9176
    static {
9177
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9178
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9179
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9180
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
9181
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9182
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9183
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9184
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForRechargeTxnId_result.class, metaDataMap);
9185
    }
9186
 
9187
    public getPaymentForRechargeTxnId_result() {
9188
    }
9189
 
9190
    public getPaymentForRechargeTxnId_result(
9191
      List<Payment> success,
9192
      PaymentException pe)
9193
    {
9194
      this();
9195
      this.success = success;
9196
      this.pe = pe;
9197
    }
9198
 
9199
    /**
9200
     * Performs a deep copy on <i>other</i>.
9201
     */
9202
    public getPaymentForRechargeTxnId_result(getPaymentForRechargeTxnId_result other) {
9203
      if (other.isSetSuccess()) {
9204
        List<Payment> __this__success = new ArrayList<Payment>();
9205
        for (Payment other_element : other.success) {
9206
          __this__success.add(new Payment(other_element));
9207
        }
9208
        this.success = __this__success;
9209
      }
9210
      if (other.isSetPe()) {
9211
        this.pe = new PaymentException(other.pe);
9212
      }
9213
    }
9214
 
9215
    public getPaymentForRechargeTxnId_result deepCopy() {
9216
      return new getPaymentForRechargeTxnId_result(this);
9217
    }
9218
 
9219
    @Override
9220
    public void clear() {
9221
      this.success = null;
9222
      this.pe = null;
9223
    }
9224
 
9225
    public int getSuccessSize() {
9226
      return (this.success == null) ? 0 : this.success.size();
9227
    }
9228
 
9229
    public java.util.Iterator<Payment> getSuccessIterator() {
9230
      return (this.success == null) ? null : this.success.iterator();
9231
    }
9232
 
9233
    public void addToSuccess(Payment elem) {
9234
      if (this.success == null) {
9235
        this.success = new ArrayList<Payment>();
9236
      }
9237
      this.success.add(elem);
9238
    }
9239
 
9240
    public List<Payment> getSuccess() {
9241
      return this.success;
9242
    }
9243
 
9244
    public void setSuccess(List<Payment> success) {
9245
      this.success = success;
9246
    }
9247
 
9248
    public void unsetSuccess() {
9249
      this.success = null;
9250
    }
9251
 
9252
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9253
    public boolean isSetSuccess() {
9254
      return this.success != null;
9255
    }
9256
 
9257
    public void setSuccessIsSet(boolean value) {
9258
      if (!value) {
9259
        this.success = null;
9260
      }
9261
    }
9262
 
9263
    public PaymentException getPe() {
9264
      return this.pe;
9265
    }
9266
 
9267
    public void setPe(PaymentException pe) {
9268
      this.pe = pe;
9269
    }
9270
 
9271
    public void unsetPe() {
9272
      this.pe = null;
9273
    }
9274
 
9275
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
9276
    public boolean isSetPe() {
9277
      return this.pe != null;
9278
    }
9279
 
9280
    public void setPeIsSet(boolean value) {
9281
      if (!value) {
9282
        this.pe = null;
9283
      }
9284
    }
9285
 
9286
    public void setFieldValue(_Fields field, Object value) {
9287
      switch (field) {
9288
      case SUCCESS:
9289
        if (value == null) {
9290
          unsetSuccess();
9291
        } else {
9292
          setSuccess((List<Payment>)value);
9293
        }
9294
        break;
9295
 
9296
      case PE:
9297
        if (value == null) {
9298
          unsetPe();
9299
        } else {
9300
          setPe((PaymentException)value);
9301
        }
9302
        break;
9303
 
9304
      }
9305
    }
9306
 
9307
    public Object getFieldValue(_Fields field) {
9308
      switch (field) {
9309
      case SUCCESS:
9310
        return getSuccess();
9311
 
9312
      case PE:
9313
        return getPe();
9314
 
9315
      }
9316
      throw new IllegalStateException();
9317
    }
9318
 
9319
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9320
    public boolean isSet(_Fields field) {
9321
      if (field == null) {
9322
        throw new IllegalArgumentException();
9323
      }
9324
 
9325
      switch (field) {
9326
      case SUCCESS:
9327
        return isSetSuccess();
9328
      case PE:
9329
        return isSetPe();
9330
      }
9331
      throw new IllegalStateException();
9332
    }
9333
 
9334
    @Override
9335
    public boolean equals(Object that) {
9336
      if (that == null)
9337
        return false;
9338
      if (that instanceof getPaymentForRechargeTxnId_result)
9339
        return this.equals((getPaymentForRechargeTxnId_result)that);
9340
      return false;
9341
    }
9342
 
9343
    public boolean equals(getPaymentForRechargeTxnId_result that) {
9344
      if (that == null)
9345
        return false;
9346
 
9347
      boolean this_present_success = true && this.isSetSuccess();
9348
      boolean that_present_success = true && that.isSetSuccess();
9349
      if (this_present_success || that_present_success) {
9350
        if (!(this_present_success && that_present_success))
9351
          return false;
9352
        if (!this.success.equals(that.success))
9353
          return false;
9354
      }
9355
 
9356
      boolean this_present_pe = true && this.isSetPe();
9357
      boolean that_present_pe = true && that.isSetPe();
9358
      if (this_present_pe || that_present_pe) {
9359
        if (!(this_present_pe && that_present_pe))
9360
          return false;
9361
        if (!this.pe.equals(that.pe))
9362
          return false;
9363
      }
9364
 
9365
      return true;
9366
    }
9367
 
9368
    @Override
9369
    public int hashCode() {
9370
      return 0;
9371
    }
9372
 
9373
    public int compareTo(getPaymentForRechargeTxnId_result other) {
9374
      if (!getClass().equals(other.getClass())) {
9375
        return getClass().getName().compareTo(other.getClass().getName());
9376
      }
9377
 
9378
      int lastComparison = 0;
9379
      getPaymentForRechargeTxnId_result typedOther = (getPaymentForRechargeTxnId_result)other;
9380
 
9381
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9382
      if (lastComparison != 0) {
9383
        return lastComparison;
9384
      }
9385
      if (isSetSuccess()) {
9386
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9387
        if (lastComparison != 0) {
9388
          return lastComparison;
9389
        }
9390
      }
9391
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
9392
      if (lastComparison != 0) {
9393
        return lastComparison;
9394
      }
9395
      if (isSetPe()) {
9396
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
9397
        if (lastComparison != 0) {
9398
          return lastComparison;
9399
        }
9400
      }
9401
      return 0;
9402
    }
9403
 
9404
    public _Fields fieldForId(int fieldId) {
9405
      return _Fields.findByThriftId(fieldId);
9406
    }
9407
 
9408
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9409
      org.apache.thrift.protocol.TField field;
9410
      iprot.readStructBegin();
9411
      while (true)
9412
      {
9413
        field = iprot.readFieldBegin();
9414
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9415
          break;
9416
        }
9417
        switch (field.id) {
9418
          case 0: // SUCCESS
9419
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9420
              {
9421
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
9422
                this.success = new ArrayList<Payment>(_list32.size);
9423
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
9424
                {
9425
                  Payment _elem34; // required
9426
                  _elem34 = new Payment();
9427
                  _elem34.read(iprot);
9428
                  this.success.add(_elem34);
9429
                }
9430
                iprot.readListEnd();
9431
              }
9432
            } else { 
9433
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9434
            }
9435
            break;
9436
          case 1: // PE
9437
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9438
              this.pe = new PaymentException();
9439
              this.pe.read(iprot);
9440
            } else { 
9441
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9442
            }
9443
            break;
9444
          default:
9445
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9446
        }
9447
        iprot.readFieldEnd();
9448
      }
9449
      iprot.readStructEnd();
9450
      validate();
9451
    }
9452
 
9453
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9454
      oprot.writeStructBegin(STRUCT_DESC);
9455
 
9456
      if (this.isSetSuccess()) {
9457
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9458
        {
9459
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
9460
          for (Payment _iter35 : this.success)
9461
          {
9462
            _iter35.write(oprot);
9463
          }
9464
          oprot.writeListEnd();
9465
        }
9466
        oprot.writeFieldEnd();
9467
      } else if (this.isSetPe()) {
9468
        oprot.writeFieldBegin(PE_FIELD_DESC);
9469
        this.pe.write(oprot);
9470
        oprot.writeFieldEnd();
9471
      }
9472
      oprot.writeFieldStop();
9473
      oprot.writeStructEnd();
9474
    }
9475
 
9476
    @Override
9477
    public String toString() {
9478
      StringBuilder sb = new StringBuilder("getPaymentForRechargeTxnId_result(");
9479
      boolean first = true;
9480
 
9481
      sb.append("success:");
9482
      if (this.success == null) {
9483
        sb.append("null");
9484
      } else {
9485
        sb.append(this.success);
9486
      }
9487
      first = false;
9488
      if (!first) sb.append(", ");
9489
      sb.append("pe:");
9490
      if (this.pe == null) {
9491
        sb.append("null");
9492
      } else {
9493
        sb.append(this.pe);
9494
      }
9495
      first = false;
9496
      sb.append(")");
9497
      return sb.toString();
9498
    }
9499
 
9500
    public void validate() throws org.apache.thrift.TException {
9501
      // check for required fields
9502
    }
9503
 
9504
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9505
      try {
9506
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9507
      } catch (org.apache.thrift.TException te) {
9508
        throw new java.io.IOException(te);
9509
      }
9510
    }
9511
 
9512
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9513
      try {
9514
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9515
      } catch (org.apache.thrift.TException te) {
9516
        throw new java.io.IOException(te);
9517
      }
9518
    }
9519
 
9520
  }
9521
 
4600 varun.gupt 9522
  public static class getSuccessfulPaymentForTxnId_args implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_args, getSuccessfulPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
9523
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_args");
9524
 
9525
    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);
9526
 
9527
    private long txnId; // required
9528
 
9529
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9530
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9531
      TXN_ID((short)1, "txnId");
9532
 
9533
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9534
 
9535
      static {
9536
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9537
          byName.put(field.getFieldName(), field);
9538
        }
9539
      }
9540
 
9541
      /**
9542
       * Find the _Fields constant that matches fieldId, or null if its not found.
9543
       */
9544
      public static _Fields findByThriftId(int fieldId) {
9545
        switch(fieldId) {
9546
          case 1: // TXN_ID
9547
            return TXN_ID;
9548
          default:
9549
            return null;
9550
        }
9551
      }
9552
 
9553
      /**
9554
       * Find the _Fields constant that matches fieldId, throwing an exception
9555
       * if it is not found.
9556
       */
9557
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9558
        _Fields fields = findByThriftId(fieldId);
9559
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9560
        return fields;
9561
      }
9562
 
9563
      /**
9564
       * Find the _Fields constant that matches name, or null if its not found.
9565
       */
9566
      public static _Fields findByName(String name) {
9567
        return byName.get(name);
9568
      }
9569
 
9570
      private final short _thriftId;
9571
      private final String _fieldName;
9572
 
9573
      _Fields(short thriftId, String fieldName) {
9574
        _thriftId = thriftId;
9575
        _fieldName = fieldName;
9576
      }
9577
 
9578
      public short getThriftFieldId() {
9579
        return _thriftId;
9580
      }
9581
 
9582
      public String getFieldName() {
9583
        return _fieldName;
9584
      }
9585
    }
9586
 
9587
    // isset id assignments
9588
    private static final int __TXNID_ISSET_ID = 0;
9589
    private BitSet __isset_bit_vector = new BitSet(1);
9590
 
9591
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9592
    static {
9593
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9594
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9595
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9596
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9597
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_args.class, metaDataMap);
9598
    }
9599
 
9600
    public getSuccessfulPaymentForTxnId_args() {
9601
    }
9602
 
9603
    public getSuccessfulPaymentForTxnId_args(
9604
      long txnId)
9605
    {
9606
      this();
9607
      this.txnId = txnId;
9608
      setTxnIdIsSet(true);
9609
    }
9610
 
9611
    /**
9612
     * Performs a deep copy on <i>other</i>.
9613
     */
9614
    public getSuccessfulPaymentForTxnId_args(getSuccessfulPaymentForTxnId_args other) {
9615
      __isset_bit_vector.clear();
9616
      __isset_bit_vector.or(other.__isset_bit_vector);
9617
      this.txnId = other.txnId;
9618
    }
9619
 
9620
    public getSuccessfulPaymentForTxnId_args deepCopy() {
9621
      return new getSuccessfulPaymentForTxnId_args(this);
9622
    }
9623
 
9624
    @Override
9625
    public void clear() {
9626
      setTxnIdIsSet(false);
9627
      this.txnId = 0;
9628
    }
9629
 
9630
    public long getTxnId() {
9631
      return this.txnId;
9632
    }
9633
 
9634
    public void setTxnId(long txnId) {
9635
      this.txnId = txnId;
9636
      setTxnIdIsSet(true);
9637
    }
9638
 
9639
    public void unsetTxnId() {
9640
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
9641
    }
9642
 
9643
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
9644
    public boolean isSetTxnId() {
9645
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
9646
    }
9647
 
9648
    public void setTxnIdIsSet(boolean value) {
9649
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
9650
    }
9651
 
9652
    public void setFieldValue(_Fields field, Object value) {
9653
      switch (field) {
9654
      case TXN_ID:
9655
        if (value == null) {
9656
          unsetTxnId();
9657
        } else {
9658
          setTxnId((Long)value);
9659
        }
9660
        break;
9661
 
9662
      }
9663
    }
9664
 
9665
    public Object getFieldValue(_Fields field) {
9666
      switch (field) {
9667
      case TXN_ID:
9668
        return Long.valueOf(getTxnId());
9669
 
9670
      }
9671
      throw new IllegalStateException();
9672
    }
9673
 
9674
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9675
    public boolean isSet(_Fields field) {
9676
      if (field == null) {
9677
        throw new IllegalArgumentException();
9678
      }
9679
 
9680
      switch (field) {
9681
      case TXN_ID:
9682
        return isSetTxnId();
9683
      }
9684
      throw new IllegalStateException();
9685
    }
9686
 
9687
    @Override
9688
    public boolean equals(Object that) {
9689
      if (that == null)
9690
        return false;
9691
      if (that instanceof getSuccessfulPaymentForTxnId_args)
9692
        return this.equals((getSuccessfulPaymentForTxnId_args)that);
9693
      return false;
9694
    }
9695
 
9696
    public boolean equals(getSuccessfulPaymentForTxnId_args that) {
9697
      if (that == null)
9698
        return false;
9699
 
9700
      boolean this_present_txnId = true;
9701
      boolean that_present_txnId = true;
9702
      if (this_present_txnId || that_present_txnId) {
9703
        if (!(this_present_txnId && that_present_txnId))
9704
          return false;
9705
        if (this.txnId != that.txnId)
9706
          return false;
9707
      }
9708
 
9709
      return true;
9710
    }
9711
 
9712
    @Override
9713
    public int hashCode() {
9714
      return 0;
9715
    }
9716
 
9717
    public int compareTo(getSuccessfulPaymentForTxnId_args other) {
9718
      if (!getClass().equals(other.getClass())) {
9719
        return getClass().getName().compareTo(other.getClass().getName());
9720
      }
9721
 
9722
      int lastComparison = 0;
9723
      getSuccessfulPaymentForTxnId_args typedOther = (getSuccessfulPaymentForTxnId_args)other;
9724
 
9725
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
9726
      if (lastComparison != 0) {
9727
        return lastComparison;
9728
      }
9729
      if (isSetTxnId()) {
9730
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
9731
        if (lastComparison != 0) {
9732
          return lastComparison;
9733
        }
9734
      }
9735
      return 0;
9736
    }
9737
 
9738
    public _Fields fieldForId(int fieldId) {
9739
      return _Fields.findByThriftId(fieldId);
9740
    }
9741
 
9742
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9743
      org.apache.thrift.protocol.TField field;
9744
      iprot.readStructBegin();
9745
      while (true)
9746
      {
9747
        field = iprot.readFieldBegin();
9748
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9749
          break;
9750
        }
9751
        switch (field.id) {
9752
          case 1: // TXN_ID
9753
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9754
              this.txnId = iprot.readI64();
9755
              setTxnIdIsSet(true);
9756
            } else { 
9757
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9758
            }
9759
            break;
9760
          default:
9761
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9762
        }
9763
        iprot.readFieldEnd();
9764
      }
9765
      iprot.readStructEnd();
9766
      validate();
9767
    }
9768
 
9769
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9770
      validate();
9771
 
9772
      oprot.writeStructBegin(STRUCT_DESC);
9773
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
9774
      oprot.writeI64(this.txnId);
9775
      oprot.writeFieldEnd();
9776
      oprot.writeFieldStop();
9777
      oprot.writeStructEnd();
9778
    }
9779
 
9780
    @Override
9781
    public String toString() {
9782
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_args(");
9783
      boolean first = true;
9784
 
9785
      sb.append("txnId:");
9786
      sb.append(this.txnId);
9787
      first = false;
9788
      sb.append(")");
9789
      return sb.toString();
9790
    }
9791
 
9792
    public void validate() throws org.apache.thrift.TException {
9793
      // check for required fields
9794
    }
9795
 
9796
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9797
      try {
9798
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9799
      } catch (org.apache.thrift.TException te) {
9800
        throw new java.io.IOException(te);
9801
      }
9802
    }
9803
 
9804
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9805
      try {
9806
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9807
        __isset_bit_vector = new BitSet(1);
9808
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9809
      } catch (org.apache.thrift.TException te) {
9810
        throw new java.io.IOException(te);
9811
      }
9812
    }
9813
 
9814
  }
9815
 
9816
  public static class getSuccessfulPaymentForTxnId_result implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_result, getSuccessfulPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
9817
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_result");
9818
 
9819
    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);
9820
    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);
9821
 
9822
    private Payment success; // required
9823
    private PaymentException pe; // required
9824
 
9825
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9826
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9827
      SUCCESS((short)0, "success"),
9828
      PE((short)1, "pe");
9829
 
9830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9831
 
9832
      static {
9833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9834
          byName.put(field.getFieldName(), field);
9835
        }
9836
      }
9837
 
9838
      /**
9839
       * Find the _Fields constant that matches fieldId, or null if its not found.
9840
       */
9841
      public static _Fields findByThriftId(int fieldId) {
9842
        switch(fieldId) {
9843
          case 0: // SUCCESS
9844
            return SUCCESS;
9845
          case 1: // PE
9846
            return PE;
9847
          default:
9848
            return null;
9849
        }
9850
      }
9851
 
9852
      /**
9853
       * Find the _Fields constant that matches fieldId, throwing an exception
9854
       * if it is not found.
9855
       */
9856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9857
        _Fields fields = findByThriftId(fieldId);
9858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9859
        return fields;
9860
      }
9861
 
9862
      /**
9863
       * Find the _Fields constant that matches name, or null if its not found.
9864
       */
9865
      public static _Fields findByName(String name) {
9866
        return byName.get(name);
9867
      }
9868
 
9869
      private final short _thriftId;
9870
      private final String _fieldName;
9871
 
9872
      _Fields(short thriftId, String fieldName) {
9873
        _thriftId = thriftId;
9874
        _fieldName = fieldName;
9875
      }
9876
 
9877
      public short getThriftFieldId() {
9878
        return _thriftId;
9879
      }
9880
 
9881
      public String getFieldName() {
9882
        return _fieldName;
9883
      }
9884
    }
9885
 
9886
    // isset id assignments
9887
 
9888
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9889
    static {
9890
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9891
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9892
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
9893
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9894
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9895
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9896
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_result.class, metaDataMap);
9897
    }
9898
 
9899
    public getSuccessfulPaymentForTxnId_result() {
9900
    }
9901
 
9902
    public getSuccessfulPaymentForTxnId_result(
9903
      Payment success,
9904
      PaymentException pe)
9905
    {
9906
      this();
9907
      this.success = success;
9908
      this.pe = pe;
9909
    }
9910
 
9911
    /**
9912
     * Performs a deep copy on <i>other</i>.
9913
     */
9914
    public getSuccessfulPaymentForTxnId_result(getSuccessfulPaymentForTxnId_result other) {
9915
      if (other.isSetSuccess()) {
9916
        this.success = new Payment(other.success);
9917
      }
9918
      if (other.isSetPe()) {
9919
        this.pe = new PaymentException(other.pe);
9920
      }
9921
    }
9922
 
9923
    public getSuccessfulPaymentForTxnId_result deepCopy() {
9924
      return new getSuccessfulPaymentForTxnId_result(this);
9925
    }
9926
 
9927
    @Override
9928
    public void clear() {
9929
      this.success = null;
9930
      this.pe = null;
9931
    }
9932
 
9933
    public Payment getSuccess() {
9934
      return this.success;
9935
    }
9936
 
9937
    public void setSuccess(Payment success) {
9938
      this.success = success;
9939
    }
9940
 
9941
    public void unsetSuccess() {
9942
      this.success = null;
9943
    }
9944
 
9945
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9946
    public boolean isSetSuccess() {
9947
      return this.success != null;
9948
    }
9949
 
9950
    public void setSuccessIsSet(boolean value) {
9951
      if (!value) {
9952
        this.success = null;
9953
      }
9954
    }
9955
 
9956
    public PaymentException getPe() {
9957
      return this.pe;
9958
    }
9959
 
9960
    public void setPe(PaymentException pe) {
9961
      this.pe = pe;
9962
    }
9963
 
9964
    public void unsetPe() {
9965
      this.pe = null;
9966
    }
9967
 
9968
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
9969
    public boolean isSetPe() {
9970
      return this.pe != null;
9971
    }
9972
 
9973
    public void setPeIsSet(boolean value) {
9974
      if (!value) {
9975
        this.pe = null;
9976
      }
9977
    }
9978
 
9979
    public void setFieldValue(_Fields field, Object value) {
9980
      switch (field) {
9981
      case SUCCESS:
9982
        if (value == null) {
9983
          unsetSuccess();
9984
        } else {
9985
          setSuccess((Payment)value);
9986
        }
9987
        break;
9988
 
9989
      case PE:
9990
        if (value == null) {
9991
          unsetPe();
9992
        } else {
9993
          setPe((PaymentException)value);
9994
        }
9995
        break;
9996
 
9997
      }
9998
    }
9999
 
10000
    public Object getFieldValue(_Fields field) {
10001
      switch (field) {
10002
      case SUCCESS:
10003
        return getSuccess();
10004
 
10005
      case PE:
10006
        return getPe();
10007
 
10008
      }
10009
      throw new IllegalStateException();
10010
    }
10011
 
10012
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10013
    public boolean isSet(_Fields field) {
10014
      if (field == null) {
10015
        throw new IllegalArgumentException();
10016
      }
10017
 
10018
      switch (field) {
10019
      case SUCCESS:
10020
        return isSetSuccess();
10021
      case PE:
10022
        return isSetPe();
10023
      }
10024
      throw new IllegalStateException();
10025
    }
10026
 
10027
    @Override
10028
    public boolean equals(Object that) {
10029
      if (that == null)
10030
        return false;
10031
      if (that instanceof getSuccessfulPaymentForTxnId_result)
10032
        return this.equals((getSuccessfulPaymentForTxnId_result)that);
10033
      return false;
10034
    }
10035
 
10036
    public boolean equals(getSuccessfulPaymentForTxnId_result that) {
10037
      if (that == null)
10038
        return false;
10039
 
10040
      boolean this_present_success = true && this.isSetSuccess();
10041
      boolean that_present_success = true && that.isSetSuccess();
10042
      if (this_present_success || that_present_success) {
10043
        if (!(this_present_success && that_present_success))
10044
          return false;
10045
        if (!this.success.equals(that.success))
10046
          return false;
10047
      }
10048
 
10049
      boolean this_present_pe = true && this.isSetPe();
10050
      boolean that_present_pe = true && that.isSetPe();
10051
      if (this_present_pe || that_present_pe) {
10052
        if (!(this_present_pe && that_present_pe))
10053
          return false;
10054
        if (!this.pe.equals(that.pe))
10055
          return false;
10056
      }
10057
 
10058
      return true;
10059
    }
10060
 
10061
    @Override
10062
    public int hashCode() {
10063
      return 0;
10064
    }
10065
 
10066
    public int compareTo(getSuccessfulPaymentForTxnId_result other) {
10067
      if (!getClass().equals(other.getClass())) {
10068
        return getClass().getName().compareTo(other.getClass().getName());
10069
      }
10070
 
10071
      int lastComparison = 0;
10072
      getSuccessfulPaymentForTxnId_result typedOther = (getSuccessfulPaymentForTxnId_result)other;
10073
 
10074
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10075
      if (lastComparison != 0) {
10076
        return lastComparison;
10077
      }
10078
      if (isSetSuccess()) {
10079
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10080
        if (lastComparison != 0) {
10081
          return lastComparison;
10082
        }
10083
      }
10084
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
10085
      if (lastComparison != 0) {
10086
        return lastComparison;
10087
      }
10088
      if (isSetPe()) {
10089
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
10090
        if (lastComparison != 0) {
10091
          return lastComparison;
10092
        }
10093
      }
10094
      return 0;
10095
    }
10096
 
10097
    public _Fields fieldForId(int fieldId) {
10098
      return _Fields.findByThriftId(fieldId);
10099
    }
10100
 
10101
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10102
      org.apache.thrift.protocol.TField field;
10103
      iprot.readStructBegin();
10104
      while (true)
10105
      {
10106
        field = iprot.readFieldBegin();
10107
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10108
          break;
10109
        }
10110
        switch (field.id) {
10111
          case 0: // SUCCESS
10112
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10113
              this.success = new Payment();
10114
              this.success.read(iprot);
10115
            } else { 
10116
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10117
            }
10118
            break;
10119
          case 1: // PE
10120
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10121
              this.pe = new PaymentException();
10122
              this.pe.read(iprot);
10123
            } else { 
10124
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10125
            }
10126
            break;
10127
          default:
10128
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10129
        }
10130
        iprot.readFieldEnd();
10131
      }
10132
      iprot.readStructEnd();
10133
      validate();
10134
    }
10135
 
10136
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10137
      oprot.writeStructBegin(STRUCT_DESC);
10138
 
10139
      if (this.isSetSuccess()) {
10140
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10141
        this.success.write(oprot);
10142
        oprot.writeFieldEnd();
10143
      } else if (this.isSetPe()) {
10144
        oprot.writeFieldBegin(PE_FIELD_DESC);
10145
        this.pe.write(oprot);
10146
        oprot.writeFieldEnd();
10147
      }
10148
      oprot.writeFieldStop();
10149
      oprot.writeStructEnd();
10150
    }
10151
 
10152
    @Override
10153
    public String toString() {
10154
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_result(");
10155
      boolean first = true;
10156
 
10157
      sb.append("success:");
10158
      if (this.success == null) {
10159
        sb.append("null");
10160
      } else {
10161
        sb.append(this.success);
10162
      }
10163
      first = false;
10164
      if (!first) sb.append(", ");
10165
      sb.append("pe:");
10166
      if (this.pe == null) {
10167
        sb.append("null");
10168
      } else {
10169
        sb.append(this.pe);
10170
      }
10171
      first = false;
10172
      sb.append(")");
10173
      return sb.toString();
10174
    }
10175
 
10176
    public void validate() throws org.apache.thrift.TException {
10177
      // check for required fields
10178
    }
10179
 
10180
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10181
      try {
10182
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10183
      } catch (org.apache.thrift.TException te) {
10184
        throw new java.io.IOException(te);
10185
      }
10186
    }
10187
 
10188
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10189
      try {
10190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10191
      } catch (org.apache.thrift.TException te) {
10192
        throw new java.io.IOException(te);
10193
      }
10194
    }
10195
 
10196
  }
10197
 
3430 rajveer 10198
  public static class updatePaymentDetails_args implements org.apache.thrift.TBase<updatePaymentDetails_args, updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable   {
10199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_args");
420 ashish 10200
 
3430 rajveer 10201
    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);
10202
    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);
10203
    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);
10204
    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);
10205
    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);
10206
    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);
10207
    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);
10208
    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);
10209
    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);
10210
    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);
10211
    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);
10212
    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 10213
 
3430 rajveer 10214
    private long id; // required
10215
    private String gatewayPaymentId; // required
10216
    private String sessionId; // required
10217
    private String gatewayTxnStatus; // required
10218
    private String description; // required
10219
    private String gatewayTxnId; // required
10220
    private String authCode; // required
10221
    private String referenceCode; // required
10222
    private String errorCode; // required
10223
    private PaymentStatus status; // required
10224
    private String gatewayTxnDate; // required
10225
    private List<Attribute> attributes; // required
420 ashish 10226
 
10227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10228
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 10229
      ID((short)1, "id"),
695 rajveer 10230
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
10231
      SESSION_ID((short)3, "sessionId"),
10232
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
10233
      DESCRIPTION((short)5, "description"),
10234
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
10235
      AUTH_CODE((short)7, "authCode"),
10236
      REFERENCE_CODE((short)8, "referenceCode"),
10237
      ERROR_CODE((short)9, "errorCode"),
10238
      /**
10239
       * 
10240
       * @see PaymentStatus
10241
       */
10242
      STATUS((short)10, "status"),
1119 rajveer 10243
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
10244
      ATTRIBUTES((short)12, "attributes");
420 ashish 10245
 
10246
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10247
 
10248
      static {
10249
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10250
          byName.put(field.getFieldName(), field);
10251
        }
10252
      }
10253
 
10254
      /**
10255
       * Find the _Fields constant that matches fieldId, or null if its not found.
10256
       */
10257
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10258
        switch(fieldId) {
10259
          case 1: // ID
10260
            return ID;
10261
          case 2: // GATEWAY_PAYMENT_ID
10262
            return GATEWAY_PAYMENT_ID;
10263
          case 3: // SESSION_ID
10264
            return SESSION_ID;
10265
          case 4: // GATEWAY_TXN_STATUS
10266
            return GATEWAY_TXN_STATUS;
10267
          case 5: // DESCRIPTION
10268
            return DESCRIPTION;
10269
          case 6: // GATEWAY_TXN_ID
10270
            return GATEWAY_TXN_ID;
10271
          case 7: // AUTH_CODE
10272
            return AUTH_CODE;
10273
          case 8: // REFERENCE_CODE
10274
            return REFERENCE_CODE;
10275
          case 9: // ERROR_CODE
10276
            return ERROR_CODE;
10277
          case 10: // STATUS
10278
            return STATUS;
10279
          case 11: // GATEWAY_TXN_DATE
10280
            return GATEWAY_TXN_DATE;
10281
          case 12: // ATTRIBUTES
10282
            return ATTRIBUTES;
10283
          default:
10284
            return null;
10285
        }
420 ashish 10286
      }
10287
 
10288
      /**
10289
       * Find the _Fields constant that matches fieldId, throwing an exception
10290
       * if it is not found.
10291
       */
10292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10293
        _Fields fields = findByThriftId(fieldId);
10294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10295
        return fields;
10296
      }
10297
 
10298
      /**
10299
       * Find the _Fields constant that matches name, or null if its not found.
10300
       */
10301
      public static _Fields findByName(String name) {
10302
        return byName.get(name);
10303
      }
10304
 
10305
      private final short _thriftId;
10306
      private final String _fieldName;
10307
 
10308
      _Fields(short thriftId, String fieldName) {
10309
        _thriftId = thriftId;
10310
        _fieldName = fieldName;
10311
      }
10312
 
10313
      public short getThriftFieldId() {
10314
        return _thriftId;
10315
      }
10316
 
10317
      public String getFieldName() {
10318
        return _fieldName;
10319
      }
10320
    }
10321
 
10322
    // isset id assignments
10323
    private static final int __ID_ISSET_ID = 0;
10324
    private BitSet __isset_bit_vector = new BitSet(1);
10325
 
3430 rajveer 10326
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 10327
    static {
3430 rajveer 10328
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10329
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10330
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10331
      tmpMap.put(_Fields.GATEWAY_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10332
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10333
      tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10334
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10335
      tmpMap.put(_Fields.GATEWAY_TXN_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10336
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10337
      tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10339
      tmpMap.put(_Fields.GATEWAY_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10341
      tmpMap.put(_Fields.AUTH_CODE, new org.apache.thrift.meta_data.FieldMetaData("authCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10342
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10343
      tmpMap.put(_Fields.REFERENCE_CODE, new org.apache.thrift.meta_data.FieldMetaData("referenceCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10344
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10345
      tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10346
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10347
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10348
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
10349
      tmpMap.put(_Fields.GATEWAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10350
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10351
      tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10352
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10353
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
10354
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10355
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 10356
    }
10357
 
695 rajveer 10358
    public updatePaymentDetails_args() {
420 ashish 10359
    }
10360
 
695 rajveer 10361
    public updatePaymentDetails_args(
420 ashish 10362
      long id,
695 rajveer 10363
      String gatewayPaymentId,
10364
      String sessionId,
10365
      String gatewayTxnStatus,
10366
      String description,
10367
      String gatewayTxnId,
10368
      String authCode,
10369
      String referenceCode,
10370
      String errorCode,
10371
      PaymentStatus status,
1119 rajveer 10372
      String gatewayTxnDate,
695 rajveer 10373
      List<Attribute> attributes)
420 ashish 10374
    {
10375
      this();
10376
      this.id = id;
10377
      setIdIsSet(true);
695 rajveer 10378
      this.gatewayPaymentId = gatewayPaymentId;
10379
      this.sessionId = sessionId;
10380
      this.gatewayTxnStatus = gatewayTxnStatus;
10381
      this.description = description;
10382
      this.gatewayTxnId = gatewayTxnId;
10383
      this.authCode = authCode;
10384
      this.referenceCode = referenceCode;
10385
      this.errorCode = errorCode;
10386
      this.status = status;
1119 rajveer 10387
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 10388
      this.attributes = attributes;
420 ashish 10389
    }
10390
 
10391
    /**
10392
     * Performs a deep copy on <i>other</i>.
10393
     */
695 rajveer 10394
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 10395
      __isset_bit_vector.clear();
10396
      __isset_bit_vector.or(other.__isset_bit_vector);
10397
      this.id = other.id;
695 rajveer 10398
      if (other.isSetGatewayPaymentId()) {
10399
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 10400
      }
695 rajveer 10401
      if (other.isSetSessionId()) {
10402
        this.sessionId = other.sessionId;
420 ashish 10403
      }
695 rajveer 10404
      if (other.isSetGatewayTxnStatus()) {
10405
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 10406
      }
695 rajveer 10407
      if (other.isSetDescription()) {
10408
        this.description = other.description;
420 ashish 10409
      }
695 rajveer 10410
      if (other.isSetGatewayTxnId()) {
10411
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 10412
      }
695 rajveer 10413
      if (other.isSetAuthCode()) {
10414
        this.authCode = other.authCode;
420 ashish 10415
      }
695 rajveer 10416
      if (other.isSetReferenceCode()) {
10417
        this.referenceCode = other.referenceCode;
420 ashish 10418
      }
695 rajveer 10419
      if (other.isSetErrorCode()) {
10420
        this.errorCode = other.errorCode;
10421
      }
10422
      if (other.isSetStatus()) {
10423
        this.status = other.status;
10424
      }
1119 rajveer 10425
      if (other.isSetGatewayTxnDate()) {
10426
        this.gatewayTxnDate = other.gatewayTxnDate;
10427
      }
695 rajveer 10428
      if (other.isSetAttributes()) {
10429
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
10430
        for (Attribute other_element : other.attributes) {
10431
          __this__attributes.add(new Attribute(other_element));
10432
        }
10433
        this.attributes = __this__attributes;
10434
      }
420 ashish 10435
    }
10436
 
695 rajveer 10437
    public updatePaymentDetails_args deepCopy() {
10438
      return new updatePaymentDetails_args(this);
420 ashish 10439
    }
10440
 
3430 rajveer 10441
    @Override
10442
    public void clear() {
10443
      setIdIsSet(false);
10444
      this.id = 0;
10445
      this.gatewayPaymentId = null;
10446
      this.sessionId = null;
10447
      this.gatewayTxnStatus = null;
10448
      this.description = null;
10449
      this.gatewayTxnId = null;
10450
      this.authCode = null;
10451
      this.referenceCode = null;
10452
      this.errorCode = null;
10453
      this.status = null;
10454
      this.gatewayTxnDate = null;
10455
      this.attributes = null;
420 ashish 10456
    }
10457
 
10458
    public long getId() {
10459
      return this.id;
10460
    }
10461
 
3430 rajveer 10462
    public void setId(long id) {
420 ashish 10463
      this.id = id;
10464
      setIdIsSet(true);
10465
    }
10466
 
10467
    public void unsetId() {
10468
      __isset_bit_vector.clear(__ID_ISSET_ID);
10469
    }
10470
 
3430 rajveer 10471
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 10472
    public boolean isSetId() {
10473
      return __isset_bit_vector.get(__ID_ISSET_ID);
10474
    }
10475
 
10476
    public void setIdIsSet(boolean value) {
10477
      __isset_bit_vector.set(__ID_ISSET_ID, value);
10478
    }
10479
 
695 rajveer 10480
    public String getGatewayPaymentId() {
10481
      return this.gatewayPaymentId;
420 ashish 10482
    }
10483
 
3430 rajveer 10484
    public void setGatewayPaymentId(String gatewayPaymentId) {
695 rajveer 10485
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 10486
    }
10487
 
695 rajveer 10488
    public void unsetGatewayPaymentId() {
10489
      this.gatewayPaymentId = null;
420 ashish 10490
    }
10491
 
3430 rajveer 10492
    /** Returns true if field gatewayPaymentId is set (has been assigned a value) and false otherwise */
695 rajveer 10493
    public boolean isSetGatewayPaymentId() {
10494
      return this.gatewayPaymentId != null;
420 ashish 10495
    }
10496
 
695 rajveer 10497
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 10498
      if (!value) {
695 rajveer 10499
        this.gatewayPaymentId = null;
420 ashish 10500
      }
10501
    }
10502
 
695 rajveer 10503
    public String getSessionId() {
10504
      return this.sessionId;
420 ashish 10505
    }
10506
 
3430 rajveer 10507
    public void setSessionId(String sessionId) {
695 rajveer 10508
      this.sessionId = sessionId;
420 ashish 10509
    }
10510
 
695 rajveer 10511
    public void unsetSessionId() {
10512
      this.sessionId = null;
420 ashish 10513
    }
10514
 
3430 rajveer 10515
    /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
695 rajveer 10516
    public boolean isSetSessionId() {
10517
      return this.sessionId != null;
420 ashish 10518
    }
10519
 
695 rajveer 10520
    public void setSessionIdIsSet(boolean value) {
420 ashish 10521
      if (!value) {
695 rajveer 10522
        this.sessionId = null;
420 ashish 10523
      }
10524
    }
10525
 
695 rajveer 10526
    public String getGatewayTxnStatus() {
10527
      return this.gatewayTxnStatus;
420 ashish 10528
    }
10529
 
3430 rajveer 10530
    public void setGatewayTxnStatus(String gatewayTxnStatus) {
695 rajveer 10531
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 10532
    }
10533
 
695 rajveer 10534
    public void unsetGatewayTxnStatus() {
10535
      this.gatewayTxnStatus = null;
420 ashish 10536
    }
10537
 
3430 rajveer 10538
    /** Returns true if field gatewayTxnStatus is set (has been assigned a value) and false otherwise */
695 rajveer 10539
    public boolean isSetGatewayTxnStatus() {
10540
      return this.gatewayTxnStatus != null;
420 ashish 10541
    }
10542
 
695 rajveer 10543
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 10544
      if (!value) {
695 rajveer 10545
        this.gatewayTxnStatus = null;
420 ashish 10546
      }
10547
    }
10548
 
695 rajveer 10549
    public String getDescription() {
10550
      return this.description;
420 ashish 10551
    }
10552
 
3430 rajveer 10553
    public void setDescription(String description) {
695 rajveer 10554
      this.description = description;
420 ashish 10555
    }
10556
 
695 rajveer 10557
    public void unsetDescription() {
10558
      this.description = null;
420 ashish 10559
    }
10560
 
3430 rajveer 10561
    /** Returns true if field description is set (has been assigned a value) and false otherwise */
695 rajveer 10562
    public boolean isSetDescription() {
10563
      return this.description != null;
420 ashish 10564
    }
10565
 
695 rajveer 10566
    public void setDescriptionIsSet(boolean value) {
420 ashish 10567
      if (!value) {
695 rajveer 10568
        this.description = null;
420 ashish 10569
      }
10570
    }
10571
 
695 rajveer 10572
    public String getGatewayTxnId() {
10573
      return this.gatewayTxnId;
420 ashish 10574
    }
10575
 
3430 rajveer 10576
    public void setGatewayTxnId(String gatewayTxnId) {
695 rajveer 10577
      this.gatewayTxnId = gatewayTxnId;
420 ashish 10578
    }
10579
 
695 rajveer 10580
    public void unsetGatewayTxnId() {
10581
      this.gatewayTxnId = null;
420 ashish 10582
    }
10583
 
3430 rajveer 10584
    /** Returns true if field gatewayTxnId is set (has been assigned a value) and false otherwise */
695 rajveer 10585
    public boolean isSetGatewayTxnId() {
10586
      return this.gatewayTxnId != null;
420 ashish 10587
    }
10588
 
695 rajveer 10589
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 10590
      if (!value) {
695 rajveer 10591
        this.gatewayTxnId = null;
420 ashish 10592
      }
10593
    }
10594
 
695 rajveer 10595
    public String getAuthCode() {
10596
      return this.authCode;
420 ashish 10597
    }
10598
 
3430 rajveer 10599
    public void setAuthCode(String authCode) {
695 rajveer 10600
      this.authCode = authCode;
420 ashish 10601
    }
10602
 
695 rajveer 10603
    public void unsetAuthCode() {
10604
      this.authCode = null;
420 ashish 10605
    }
10606
 
3430 rajveer 10607
    /** Returns true if field authCode is set (has been assigned a value) and false otherwise */
695 rajveer 10608
    public boolean isSetAuthCode() {
10609
      return this.authCode != null;
420 ashish 10610
    }
10611
 
695 rajveer 10612
    public void setAuthCodeIsSet(boolean value) {
420 ashish 10613
      if (!value) {
695 rajveer 10614
        this.authCode = null;
420 ashish 10615
      }
10616
    }
10617
 
695 rajveer 10618
    public String getReferenceCode() {
10619
      return this.referenceCode;
420 ashish 10620
    }
10621
 
3430 rajveer 10622
    public void setReferenceCode(String referenceCode) {
695 rajveer 10623
      this.referenceCode = referenceCode;
420 ashish 10624
    }
10625
 
695 rajveer 10626
    public void unsetReferenceCode() {
10627
      this.referenceCode = null;
420 ashish 10628
    }
10629
 
3430 rajveer 10630
    /** Returns true if field referenceCode is set (has been assigned a value) and false otherwise */
695 rajveer 10631
    public boolean isSetReferenceCode() {
10632
      return this.referenceCode != null;
420 ashish 10633
    }
10634
 
695 rajveer 10635
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 10636
      if (!value) {
695 rajveer 10637
        this.referenceCode = null;
420 ashish 10638
      }
10639
    }
10640
 
695 rajveer 10641
    public String getErrorCode() {
10642
      return this.errorCode;
10643
    }
10644
 
3430 rajveer 10645
    public void setErrorCode(String errorCode) {
695 rajveer 10646
      this.errorCode = errorCode;
10647
    }
10648
 
10649
    public void unsetErrorCode() {
10650
      this.errorCode = null;
10651
    }
10652
 
3430 rajveer 10653
    /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
695 rajveer 10654
    public boolean isSetErrorCode() {
10655
      return this.errorCode != null;
10656
    }
10657
 
10658
    public void setErrorCodeIsSet(boolean value) {
10659
      if (!value) {
10660
        this.errorCode = null;
10661
      }
10662
    }
10663
 
10664
    /**
10665
     * 
10666
     * @see PaymentStatus
10667
     */
10668
    public PaymentStatus getStatus() {
10669
      return this.status;
10670
    }
10671
 
10672
    /**
10673
     * 
10674
     * @see PaymentStatus
10675
     */
3430 rajveer 10676
    public void setStatus(PaymentStatus status) {
695 rajveer 10677
      this.status = status;
10678
    }
10679
 
10680
    public void unsetStatus() {
10681
      this.status = null;
10682
    }
10683
 
3430 rajveer 10684
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
695 rajveer 10685
    public boolean isSetStatus() {
10686
      return this.status != null;
10687
    }
10688
 
10689
    public void setStatusIsSet(boolean value) {
10690
      if (!value) {
10691
        this.status = null;
10692
      }
10693
    }
10694
 
1119 rajveer 10695
    public String getGatewayTxnDate() {
10696
      return this.gatewayTxnDate;
10697
    }
10698
 
3430 rajveer 10699
    public void setGatewayTxnDate(String gatewayTxnDate) {
1119 rajveer 10700
      this.gatewayTxnDate = gatewayTxnDate;
10701
    }
10702
 
10703
    public void unsetGatewayTxnDate() {
10704
      this.gatewayTxnDate = null;
10705
    }
10706
 
3430 rajveer 10707
    /** Returns true if field gatewayTxnDate is set (has been assigned a value) and false otherwise */
1119 rajveer 10708
    public boolean isSetGatewayTxnDate() {
10709
      return this.gatewayTxnDate != null;
10710
    }
10711
 
10712
    public void setGatewayTxnDateIsSet(boolean value) {
10713
      if (!value) {
10714
        this.gatewayTxnDate = null;
10715
      }
10716
    }
10717
 
695 rajveer 10718
    public int getAttributesSize() {
10719
      return (this.attributes == null) ? 0 : this.attributes.size();
10720
    }
10721
 
10722
    public java.util.Iterator<Attribute> getAttributesIterator() {
10723
      return (this.attributes == null) ? null : this.attributes.iterator();
10724
    }
10725
 
10726
    public void addToAttributes(Attribute elem) {
10727
      if (this.attributes == null) {
10728
        this.attributes = new ArrayList<Attribute>();
10729
      }
10730
      this.attributes.add(elem);
10731
    }
10732
 
10733
    public List<Attribute> getAttributes() {
10734
      return this.attributes;
10735
    }
10736
 
3430 rajveer 10737
    public void setAttributes(List<Attribute> attributes) {
695 rajveer 10738
      this.attributes = attributes;
10739
    }
10740
 
10741
    public void unsetAttributes() {
10742
      this.attributes = null;
10743
    }
10744
 
3430 rajveer 10745
    /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
695 rajveer 10746
    public boolean isSetAttributes() {
10747
      return this.attributes != null;
10748
    }
10749
 
10750
    public void setAttributesIsSet(boolean value) {
10751
      if (!value) {
10752
        this.attributes = null;
10753
      }
10754
    }
10755
 
420 ashish 10756
    public void setFieldValue(_Fields field, Object value) {
10757
      switch (field) {
10758
      case ID:
10759
        if (value == null) {
10760
          unsetId();
10761
        } else {
10762
          setId((Long)value);
10763
        }
10764
        break;
10765
 
695 rajveer 10766
      case GATEWAY_PAYMENT_ID:
420 ashish 10767
        if (value == null) {
695 rajveer 10768
          unsetGatewayPaymentId();
420 ashish 10769
        } else {
695 rajveer 10770
          setGatewayPaymentId((String)value);
420 ashish 10771
        }
10772
        break;
10773
 
695 rajveer 10774
      case SESSION_ID:
420 ashish 10775
        if (value == null) {
695 rajveer 10776
          unsetSessionId();
420 ashish 10777
        } else {
695 rajveer 10778
          setSessionId((String)value);
420 ashish 10779
        }
10780
        break;
10781
 
695 rajveer 10782
      case GATEWAY_TXN_STATUS:
420 ashish 10783
        if (value == null) {
695 rajveer 10784
          unsetGatewayTxnStatus();
420 ashish 10785
        } else {
695 rajveer 10786
          setGatewayTxnStatus((String)value);
420 ashish 10787
        }
10788
        break;
10789
 
695 rajveer 10790
      case DESCRIPTION:
420 ashish 10791
        if (value == null) {
695 rajveer 10792
          unsetDescription();
420 ashish 10793
        } else {
695 rajveer 10794
          setDescription((String)value);
420 ashish 10795
        }
10796
        break;
10797
 
695 rajveer 10798
      case GATEWAY_TXN_ID:
420 ashish 10799
        if (value == null) {
695 rajveer 10800
          unsetGatewayTxnId();
420 ashish 10801
        } else {
695 rajveer 10802
          setGatewayTxnId((String)value);
420 ashish 10803
        }
10804
        break;
10805
 
10806
      case AUTH_CODE:
10807
        if (value == null) {
695 rajveer 10808
          unsetAuthCode();
420 ashish 10809
        } else {
695 rajveer 10810
          setAuthCode((String)value);
420 ashish 10811
        }
10812
        break;
10813
 
695 rajveer 10814
      case REFERENCE_CODE:
420 ashish 10815
        if (value == null) {
695 rajveer 10816
          unsetReferenceCode();
420 ashish 10817
        } else {
695 rajveer 10818
          setReferenceCode((String)value);
420 ashish 10819
        }
10820
        break;
10821
 
695 rajveer 10822
      case ERROR_CODE:
10823
        if (value == null) {
10824
          unsetErrorCode();
10825
        } else {
10826
          setErrorCode((String)value);
10827
        }
10828
        break;
10829
 
10830
      case STATUS:
10831
        if (value == null) {
10832
          unsetStatus();
10833
        } else {
10834
          setStatus((PaymentStatus)value);
10835
        }
10836
        break;
10837
 
1119 rajveer 10838
      case GATEWAY_TXN_DATE:
10839
        if (value == null) {
10840
          unsetGatewayTxnDate();
10841
        } else {
10842
          setGatewayTxnDate((String)value);
10843
        }
10844
        break;
10845
 
695 rajveer 10846
      case ATTRIBUTES:
10847
        if (value == null) {
10848
          unsetAttributes();
10849
        } else {
10850
          setAttributes((List<Attribute>)value);
10851
        }
10852
        break;
10853
 
420 ashish 10854
      }
10855
    }
10856
 
10857
    public Object getFieldValue(_Fields field) {
10858
      switch (field) {
10859
      case ID:
3430 rajveer 10860
        return Long.valueOf(getId());
420 ashish 10861
 
695 rajveer 10862
      case GATEWAY_PAYMENT_ID:
10863
        return getGatewayPaymentId();
420 ashish 10864
 
695 rajveer 10865
      case SESSION_ID:
10866
        return getSessionId();
420 ashish 10867
 
695 rajveer 10868
      case GATEWAY_TXN_STATUS:
10869
        return getGatewayTxnStatus();
420 ashish 10870
 
695 rajveer 10871
      case DESCRIPTION:
10872
        return getDescription();
420 ashish 10873
 
695 rajveer 10874
      case GATEWAY_TXN_ID:
10875
        return getGatewayTxnId();
420 ashish 10876
 
10877
      case AUTH_CODE:
695 rajveer 10878
        return getAuthCode();
420 ashish 10879
 
695 rajveer 10880
      case REFERENCE_CODE:
10881
        return getReferenceCode();
420 ashish 10882
 
695 rajveer 10883
      case ERROR_CODE:
10884
        return getErrorCode();
10885
 
10886
      case STATUS:
10887
        return getStatus();
10888
 
1119 rajveer 10889
      case GATEWAY_TXN_DATE:
10890
        return getGatewayTxnDate();
10891
 
695 rajveer 10892
      case ATTRIBUTES:
10893
        return getAttributes();
10894
 
420 ashish 10895
      }
10896
      throw new IllegalStateException();
10897
    }
10898
 
3430 rajveer 10899
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10900
    public boolean isSet(_Fields field) {
10901
      if (field == null) {
10902
        throw new IllegalArgumentException();
10903
      }
420 ashish 10904
 
10905
      switch (field) {
10906
      case ID:
10907
        return isSetId();
695 rajveer 10908
      case GATEWAY_PAYMENT_ID:
10909
        return isSetGatewayPaymentId();
420 ashish 10910
      case SESSION_ID:
695 rajveer 10911
        return isSetSessionId();
10912
      case GATEWAY_TXN_STATUS:
10913
        return isSetGatewayTxnStatus();
10914
      case DESCRIPTION:
10915
        return isSetDescription();
10916
      case GATEWAY_TXN_ID:
10917
        return isSetGatewayTxnId();
420 ashish 10918
      case AUTH_CODE:
695 rajveer 10919
        return isSetAuthCode();
10920
      case REFERENCE_CODE:
10921
        return isSetReferenceCode();
10922
      case ERROR_CODE:
10923
        return isSetErrorCode();
10924
      case STATUS:
10925
        return isSetStatus();
1119 rajveer 10926
      case GATEWAY_TXN_DATE:
10927
        return isSetGatewayTxnDate();
695 rajveer 10928
      case ATTRIBUTES:
10929
        return isSetAttributes();
420 ashish 10930
      }
10931
      throw new IllegalStateException();
10932
    }
10933
 
10934
    @Override
10935
    public boolean equals(Object that) {
10936
      if (that == null)
10937
        return false;
695 rajveer 10938
      if (that instanceof updatePaymentDetails_args)
10939
        return this.equals((updatePaymentDetails_args)that);
420 ashish 10940
      return false;
10941
    }
10942
 
695 rajveer 10943
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 10944
      if (that == null)
10945
        return false;
10946
 
10947
      boolean this_present_id = true;
10948
      boolean that_present_id = true;
10949
      if (this_present_id || that_present_id) {
10950
        if (!(this_present_id && that_present_id))
10951
          return false;
10952
        if (this.id != that.id)
10953
          return false;
10954
      }
10955
 
695 rajveer 10956
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
10957
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
10958
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
10959
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 10960
          return false;
695 rajveer 10961
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 10962
          return false;
10963
      }
10964
 
695 rajveer 10965
      boolean this_present_sessionId = true && this.isSetSessionId();
10966
      boolean that_present_sessionId = true && that.isSetSessionId();
10967
      if (this_present_sessionId || that_present_sessionId) {
10968
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 10969
          return false;
695 rajveer 10970
        if (!this.sessionId.equals(that.sessionId))
420 ashish 10971
          return false;
10972
      }
10973
 
695 rajveer 10974
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
10975
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
10976
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
10977
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 10978
          return false;
695 rajveer 10979
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 10980
          return false;
10981
      }
10982
 
695 rajveer 10983
      boolean this_present_description = true && this.isSetDescription();
10984
      boolean that_present_description = true && that.isSetDescription();
10985
      if (this_present_description || that_present_description) {
10986
        if (!(this_present_description && that_present_description))
420 ashish 10987
          return false;
695 rajveer 10988
        if (!this.description.equals(that.description))
420 ashish 10989
          return false;
10990
      }
10991
 
695 rajveer 10992
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
10993
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
10994
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
10995
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 10996
          return false;
695 rajveer 10997
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 10998
          return false;
10999
      }
11000
 
695 rajveer 11001
      boolean this_present_authCode = true && this.isSetAuthCode();
11002
      boolean that_present_authCode = true && that.isSetAuthCode();
11003
      if (this_present_authCode || that_present_authCode) {
11004
        if (!(this_present_authCode && that_present_authCode))
420 ashish 11005
          return false;
695 rajveer 11006
        if (!this.authCode.equals(that.authCode))
420 ashish 11007
          return false;
11008
      }
11009
 
695 rajveer 11010
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
11011
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
11012
      if (this_present_referenceCode || that_present_referenceCode) {
11013
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 11014
          return false;
695 rajveer 11015
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 11016
          return false;
11017
      }
11018
 
695 rajveer 11019
      boolean this_present_errorCode = true && this.isSetErrorCode();
11020
      boolean that_present_errorCode = true && that.isSetErrorCode();
11021
      if (this_present_errorCode || that_present_errorCode) {
11022
        if (!(this_present_errorCode && that_present_errorCode))
11023
          return false;
11024
        if (!this.errorCode.equals(that.errorCode))
11025
          return false;
11026
      }
11027
 
11028
      boolean this_present_status = true && this.isSetStatus();
11029
      boolean that_present_status = true && that.isSetStatus();
11030
      if (this_present_status || that_present_status) {
11031
        if (!(this_present_status && that_present_status))
11032
          return false;
11033
        if (!this.status.equals(that.status))
11034
          return false;
11035
      }
11036
 
1119 rajveer 11037
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
11038
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
11039
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
11040
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
11041
          return false;
11042
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
11043
          return false;
11044
      }
11045
 
695 rajveer 11046
      boolean this_present_attributes = true && this.isSetAttributes();
11047
      boolean that_present_attributes = true && that.isSetAttributes();
11048
      if (this_present_attributes || that_present_attributes) {
11049
        if (!(this_present_attributes && that_present_attributes))
11050
          return false;
11051
        if (!this.attributes.equals(that.attributes))
11052
          return false;
11053
      }
11054
 
420 ashish 11055
      return true;
11056
    }
11057
 
11058
    @Override
11059
    public int hashCode() {
11060
      return 0;
11061
    }
11062
 
695 rajveer 11063
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 11064
      if (!getClass().equals(other.getClass())) {
11065
        return getClass().getName().compareTo(other.getClass().getName());
11066
      }
11067
 
11068
      int lastComparison = 0;
695 rajveer 11069
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 11070
 
3430 rajveer 11071
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 11072
      if (lastComparison != 0) {
11073
        return lastComparison;
11074
      }
3430 rajveer 11075
      if (isSetId()) {
11076
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
11077
        if (lastComparison != 0) {
11078
          return lastComparison;
11079
        }
420 ashish 11080
      }
3430 rajveer 11081
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(typedOther.isSetGatewayPaymentId());
420 ashish 11082
      if (lastComparison != 0) {
11083
        return lastComparison;
11084
      }
3430 rajveer 11085
      if (isSetGatewayPaymentId()) {
11086
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayPaymentId, typedOther.gatewayPaymentId);
11087
        if (lastComparison != 0) {
11088
          return lastComparison;
11089
        }
420 ashish 11090
      }
3430 rajveer 11091
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId());
420 ashish 11092
      if (lastComparison != 0) {
11093
        return lastComparison;
11094
      }
3430 rajveer 11095
      if (isSetSessionId()) {
11096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId);
11097
        if (lastComparison != 0) {
11098
          return lastComparison;
11099
        }
420 ashish 11100
      }
3430 rajveer 11101
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(typedOther.isSetGatewayTxnStatus());
420 ashish 11102
      if (lastComparison != 0) {
11103
        return lastComparison;
11104
      }
3430 rajveer 11105
      if (isSetGatewayTxnStatus()) {
11106
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnStatus, typedOther.gatewayTxnStatus);
11107
        if (lastComparison != 0) {
11108
          return lastComparison;
11109
        }
420 ashish 11110
      }
3430 rajveer 11111
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
420 ashish 11112
      if (lastComparison != 0) {
11113
        return lastComparison;
11114
      }
3430 rajveer 11115
      if (isSetDescription()) {
11116
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
11117
        if (lastComparison != 0) {
11118
          return lastComparison;
11119
        }
420 ashish 11120
      }
3430 rajveer 11121
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(typedOther.isSetGatewayTxnId());
420 ashish 11122
      if (lastComparison != 0) {
11123
        return lastComparison;
11124
      }
3430 rajveer 11125
      if (isSetGatewayTxnId()) {
11126
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnId, typedOther.gatewayTxnId);
11127
        if (lastComparison != 0) {
11128
          return lastComparison;
11129
        }
420 ashish 11130
      }
3430 rajveer 11131
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(typedOther.isSetAuthCode());
420 ashish 11132
      if (lastComparison != 0) {
11133
        return lastComparison;
11134
      }
3430 rajveer 11135
      if (isSetAuthCode()) {
11136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authCode, typedOther.authCode);
11137
        if (lastComparison != 0) {
11138
          return lastComparison;
11139
        }
420 ashish 11140
      }
3430 rajveer 11141
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(typedOther.isSetReferenceCode());
420 ashish 11142
      if (lastComparison != 0) {
11143
        return lastComparison;
11144
      }
3430 rajveer 11145
      if (isSetReferenceCode()) {
11146
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenceCode, typedOther.referenceCode);
11147
        if (lastComparison != 0) {
11148
          return lastComparison;
11149
        }
420 ashish 11150
      }
3430 rajveer 11151
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode());
695 rajveer 11152
      if (lastComparison != 0) {
11153
        return lastComparison;
11154
      }
3430 rajveer 11155
      if (isSetErrorCode()) {
11156
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode);
11157
        if (lastComparison != 0) {
11158
          return lastComparison;
11159
        }
695 rajveer 11160
      }
3430 rajveer 11161
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
695 rajveer 11162
      if (lastComparison != 0) {
11163
        return lastComparison;
11164
      }
3430 rajveer 11165
      if (isSetStatus()) {
11166
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
11167
        if (lastComparison != 0) {
11168
          return lastComparison;
11169
        }
695 rajveer 11170
      }
3430 rajveer 11171
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(typedOther.isSetGatewayTxnDate());
1119 rajveer 11172
      if (lastComparison != 0) {
11173
        return lastComparison;
11174
      }
3430 rajveer 11175
      if (isSetGatewayTxnDate()) {
11176
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnDate, typedOther.gatewayTxnDate);
11177
        if (lastComparison != 0) {
11178
          return lastComparison;
11179
        }
1119 rajveer 11180
      }
3430 rajveer 11181
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
695 rajveer 11182
      if (lastComparison != 0) {
11183
        return lastComparison;
11184
      }
3430 rajveer 11185
      if (isSetAttributes()) {
11186
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
11187
        if (lastComparison != 0) {
11188
          return lastComparison;
11189
        }
695 rajveer 11190
      }
420 ashish 11191
      return 0;
11192
    }
11193
 
3430 rajveer 11194
    public _Fields fieldForId(int fieldId) {
11195
      return _Fields.findByThriftId(fieldId);
11196
    }
11197
 
11198
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11199
      org.apache.thrift.protocol.TField field;
420 ashish 11200
      iprot.readStructBegin();
11201
      while (true)
11202
      {
11203
        field = iprot.readFieldBegin();
3430 rajveer 11204
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 11205
          break;
11206
        }
3430 rajveer 11207
        switch (field.id) {
11208
          case 1: // ID
11209
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11210
              this.id = iprot.readI64();
11211
              setIdIsSet(true);
11212
            } else { 
11213
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11214
            }
11215
            break;
11216
          case 2: // GATEWAY_PAYMENT_ID
11217
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11218
              this.gatewayPaymentId = iprot.readString();
11219
            } else { 
11220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11221
            }
11222
            break;
11223
          case 3: // SESSION_ID
11224
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11225
              this.sessionId = iprot.readString();
11226
            } else { 
11227
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11228
            }
11229
            break;
11230
          case 4: // GATEWAY_TXN_STATUS
11231
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11232
              this.gatewayTxnStatus = iprot.readString();
11233
            } else { 
11234
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11235
            }
11236
            break;
11237
          case 5: // DESCRIPTION
11238
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11239
              this.description = iprot.readString();
11240
            } else { 
11241
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11242
            }
11243
            break;
11244
          case 6: // GATEWAY_TXN_ID
11245
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11246
              this.gatewayTxnId = iprot.readString();
11247
            } else { 
11248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11249
            }
11250
            break;
11251
          case 7: // AUTH_CODE
11252
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11253
              this.authCode = iprot.readString();
11254
            } else { 
11255
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11256
            }
11257
            break;
11258
          case 8: // REFERENCE_CODE
11259
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11260
              this.referenceCode = iprot.readString();
11261
            } else { 
11262
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11263
            }
11264
            break;
11265
          case 9: // ERROR_CODE
11266
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11267
              this.errorCode = iprot.readString();
11268
            } else { 
11269
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11270
            }
11271
            break;
11272
          case 10: // STATUS
11273
            if (field.type == org.apache.thrift.protocol.TType.I32) {
11274
              this.status = PaymentStatus.findByValue(iprot.readI32());
11275
            } else { 
11276
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11277
            }
11278
            break;
11279
          case 11: // GATEWAY_TXN_DATE
11280
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11281
              this.gatewayTxnDate = iprot.readString();
11282
            } else { 
11283
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11284
            }
11285
            break;
11286
          case 12: // ATTRIBUTES
11287
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11288
              {
7049 anupam.sin 11289
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
11290
                this.attributes = new ArrayList<Attribute>(_list36.size);
11291
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
695 rajveer 11292
                {
7049 anupam.sin 11293
                  Attribute _elem38; // required
11294
                  _elem38 = new Attribute();
11295
                  _elem38.read(iprot);
11296
                  this.attributes.add(_elem38);
695 rajveer 11297
                }
3430 rajveer 11298
                iprot.readListEnd();
695 rajveer 11299
              }
3430 rajveer 11300
            } else { 
11301
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11302
            }
11303
            break;
11304
          default:
11305
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 11306
        }
3430 rajveer 11307
        iprot.readFieldEnd();
420 ashish 11308
      }
11309
      iprot.readStructEnd();
11310
      validate();
11311
    }
11312
 
3430 rajveer 11313
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 11314
      validate();
11315
 
11316
      oprot.writeStructBegin(STRUCT_DESC);
11317
      oprot.writeFieldBegin(ID_FIELD_DESC);
11318
      oprot.writeI64(this.id);
11319
      oprot.writeFieldEnd();
695 rajveer 11320
      if (this.gatewayPaymentId != null) {
11321
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
11322
        oprot.writeString(this.gatewayPaymentId);
420 ashish 11323
        oprot.writeFieldEnd();
11324
      }
695 rajveer 11325
      if (this.sessionId != null) {
11326
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
11327
        oprot.writeString(this.sessionId);
420 ashish 11328
        oprot.writeFieldEnd();
11329
      }
695 rajveer 11330
      if (this.gatewayTxnStatus != null) {
11331
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
11332
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 11333
        oprot.writeFieldEnd();
11334
      }
695 rajveer 11335
      if (this.description != null) {
11336
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11337
        oprot.writeString(this.description);
420 ashish 11338
        oprot.writeFieldEnd();
11339
      }
695 rajveer 11340
      if (this.gatewayTxnId != null) {
11341
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
11342
        oprot.writeString(this.gatewayTxnId);
420 ashish 11343
        oprot.writeFieldEnd();
11344
      }
695 rajveer 11345
      if (this.authCode != null) {
420 ashish 11346
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 11347
        oprot.writeString(this.authCode);
420 ashish 11348
        oprot.writeFieldEnd();
11349
      }
695 rajveer 11350
      if (this.referenceCode != null) {
11351
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
11352
        oprot.writeString(this.referenceCode);
420 ashish 11353
        oprot.writeFieldEnd();
11354
      }
695 rajveer 11355
      if (this.errorCode != null) {
11356
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
11357
        oprot.writeString(this.errorCode);
11358
        oprot.writeFieldEnd();
11359
      }
11360
      if (this.status != null) {
11361
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11362
        oprot.writeI32(this.status.getValue());
11363
        oprot.writeFieldEnd();
11364
      }
1119 rajveer 11365
      if (this.gatewayTxnDate != null) {
11366
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
11367
        oprot.writeString(this.gatewayTxnDate);
11368
        oprot.writeFieldEnd();
11369
      }
695 rajveer 11370
      if (this.attributes != null) {
11371
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
11372
        {
3430 rajveer 11373
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
7049 anupam.sin 11374
          for (Attribute _iter39 : this.attributes)
695 rajveer 11375
          {
7049 anupam.sin 11376
            _iter39.write(oprot);
695 rajveer 11377
          }
11378
          oprot.writeListEnd();
11379
        }
11380
        oprot.writeFieldEnd();
11381
      }
420 ashish 11382
      oprot.writeFieldStop();
11383
      oprot.writeStructEnd();
11384
    }
11385
 
11386
    @Override
11387
    public String toString() {
695 rajveer 11388
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 11389
      boolean first = true;
11390
 
11391
      sb.append("id:");
11392
      sb.append(this.id);
11393
      first = false;
11394
      if (!first) sb.append(", ");
695 rajveer 11395
      sb.append("gatewayPaymentId:");
11396
      if (this.gatewayPaymentId == null) {
420 ashish 11397
        sb.append("null");
11398
      } else {
695 rajveer 11399
        sb.append(this.gatewayPaymentId);
420 ashish 11400
      }
11401
      first = false;
11402
      if (!first) sb.append(", ");
695 rajveer 11403
      sb.append("sessionId:");
11404
      if (this.sessionId == null) {
420 ashish 11405
        sb.append("null");
11406
      } else {
695 rajveer 11407
        sb.append(this.sessionId);
420 ashish 11408
      }
11409
      first = false;
11410
      if (!first) sb.append(", ");
695 rajveer 11411
      sb.append("gatewayTxnStatus:");
11412
      if (this.gatewayTxnStatus == null) {
420 ashish 11413
        sb.append("null");
11414
      } else {
695 rajveer 11415
        sb.append(this.gatewayTxnStatus);
420 ashish 11416
      }
11417
      first = false;
11418
      if (!first) sb.append(", ");
695 rajveer 11419
      sb.append("description:");
11420
      if (this.description == null) {
420 ashish 11421
        sb.append("null");
11422
      } else {
695 rajveer 11423
        sb.append(this.description);
420 ashish 11424
      }
11425
      first = false;
11426
      if (!first) sb.append(", ");
695 rajveer 11427
      sb.append("gatewayTxnId:");
11428
      if (this.gatewayTxnId == null) {
420 ashish 11429
        sb.append("null");
11430
      } else {
695 rajveer 11431
        sb.append(this.gatewayTxnId);
420 ashish 11432
      }
11433
      first = false;
11434
      if (!first) sb.append(", ");
695 rajveer 11435
      sb.append("authCode:");
11436
      if (this.authCode == null) {
420 ashish 11437
        sb.append("null");
11438
      } else {
695 rajveer 11439
        sb.append(this.authCode);
420 ashish 11440
      }
11441
      first = false;
11442
      if (!first) sb.append(", ");
695 rajveer 11443
      sb.append("referenceCode:");
11444
      if (this.referenceCode == null) {
420 ashish 11445
        sb.append("null");
11446
      } else {
695 rajveer 11447
        sb.append(this.referenceCode);
420 ashish 11448
      }
11449
      first = false;
695 rajveer 11450
      if (!first) sb.append(", ");
11451
      sb.append("errorCode:");
11452
      if (this.errorCode == null) {
11453
        sb.append("null");
11454
      } else {
11455
        sb.append(this.errorCode);
11456
      }
11457
      first = false;
11458
      if (!first) sb.append(", ");
11459
      sb.append("status:");
11460
      if (this.status == null) {
11461
        sb.append("null");
11462
      } else {
11463
        sb.append(this.status);
11464
      }
11465
      first = false;
11466
      if (!first) sb.append(", ");
1119 rajveer 11467
      sb.append("gatewayTxnDate:");
11468
      if (this.gatewayTxnDate == null) {
11469
        sb.append("null");
11470
      } else {
11471
        sb.append(this.gatewayTxnDate);
11472
      }
11473
      first = false;
11474
      if (!first) sb.append(", ");
695 rajveer 11475
      sb.append("attributes:");
11476
      if (this.attributes == null) {
11477
        sb.append("null");
11478
      } else {
11479
        sb.append(this.attributes);
11480
      }
11481
      first = false;
420 ashish 11482
      sb.append(")");
11483
      return sb.toString();
11484
    }
11485
 
3430 rajveer 11486
    public void validate() throws org.apache.thrift.TException {
420 ashish 11487
      // check for required fields
11488
    }
11489
 
3430 rajveer 11490
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11491
      try {
11492
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11493
      } catch (org.apache.thrift.TException te) {
11494
        throw new java.io.IOException(te);
11495
      }
11496
    }
11497
 
11498
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11499
      try {
11500
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11501
        __isset_bit_vector = new BitSet(1);
11502
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11503
      } catch (org.apache.thrift.TException te) {
11504
        throw new java.io.IOException(te);
11505
      }
11506
    }
11507
 
420 ashish 11508
  }
11509
 
3430 rajveer 11510
  public static class updatePaymentDetails_result implements org.apache.thrift.TBase<updatePaymentDetails_result, updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable   {
11511
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_result");
420 ashish 11512
 
3430 rajveer 11513
    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);
11514
    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 11515
 
3430 rajveer 11516
    private boolean success; // required
11517
    private PaymentException pe; // required
420 ashish 11518
 
11519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11520
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 11521
      SUCCESS((short)0, "success"),
420 ashish 11522
      PE((short)1, "pe");
11523
 
11524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11525
 
11526
      static {
11527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11528
          byName.put(field.getFieldName(), field);
11529
        }
11530
      }
11531
 
11532
      /**
11533
       * Find the _Fields constant that matches fieldId, or null if its not found.
11534
       */
11535
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11536
        switch(fieldId) {
11537
          case 0: // SUCCESS
11538
            return SUCCESS;
11539
          case 1: // PE
11540
            return PE;
11541
          default:
11542
            return null;
11543
        }
420 ashish 11544
      }
11545
 
11546
      /**
11547
       * Find the _Fields constant that matches fieldId, throwing an exception
11548
       * if it is not found.
11549
       */
11550
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11551
        _Fields fields = findByThriftId(fieldId);
11552
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11553
        return fields;
11554
      }
11555
 
11556
      /**
11557
       * Find the _Fields constant that matches name, or null if its not found.
11558
       */
11559
      public static _Fields findByName(String name) {
11560
        return byName.get(name);
11561
      }
11562
 
11563
      private final short _thriftId;
11564
      private final String _fieldName;
11565
 
11566
      _Fields(short thriftId, String fieldName) {
11567
        _thriftId = thriftId;
11568
        _fieldName = fieldName;
11569
      }
11570
 
11571
      public short getThriftFieldId() {
11572
        return _thriftId;
11573
      }
11574
 
11575
      public String getFieldName() {
11576
        return _fieldName;
11577
      }
11578
    }
11579
 
11580
    // isset id assignments
695 rajveer 11581
    private static final int __SUCCESS_ISSET_ID = 0;
11582
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 11583
 
3430 rajveer 11584
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 11585
    static {
3430 rajveer 11586
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11587
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11588
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
11589
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11590
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11591
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11592
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 11593
    }
11594
 
695 rajveer 11595
    public updatePaymentDetails_result() {
420 ashish 11596
    }
11597
 
695 rajveer 11598
    public updatePaymentDetails_result(
11599
      boolean success,
420 ashish 11600
      PaymentException pe)
11601
    {
11602
      this();
695 rajveer 11603
      this.success = success;
11604
      setSuccessIsSet(true);
420 ashish 11605
      this.pe = pe;
11606
    }
11607
 
11608
    /**
11609
     * Performs a deep copy on <i>other</i>.
11610
     */
695 rajveer 11611
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
11612
      __isset_bit_vector.clear();
11613
      __isset_bit_vector.or(other.__isset_bit_vector);
11614
      this.success = other.success;
420 ashish 11615
      if (other.isSetPe()) {
11616
        this.pe = new PaymentException(other.pe);
11617
      }
11618
    }
11619
 
695 rajveer 11620
    public updatePaymentDetails_result deepCopy() {
11621
      return new updatePaymentDetails_result(this);
420 ashish 11622
    }
11623
 
3430 rajveer 11624
    @Override
11625
    public void clear() {
11626
      setSuccessIsSet(false);
11627
      this.success = false;
11628
      this.pe = null;
420 ashish 11629
    }
11630
 
695 rajveer 11631
    public boolean isSuccess() {
11632
      return this.success;
11633
    }
11634
 
3430 rajveer 11635
    public void setSuccess(boolean success) {
695 rajveer 11636
      this.success = success;
11637
      setSuccessIsSet(true);
11638
    }
11639
 
11640
    public void unsetSuccess() {
11641
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11642
    }
11643
 
3430 rajveer 11644
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
695 rajveer 11645
    public boolean isSetSuccess() {
11646
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11647
    }
11648
 
11649
    public void setSuccessIsSet(boolean value) {
11650
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11651
    }
11652
 
420 ashish 11653
    public PaymentException getPe() {
11654
      return this.pe;
11655
    }
11656
 
3430 rajveer 11657
    public void setPe(PaymentException pe) {
420 ashish 11658
      this.pe = pe;
11659
    }
11660
 
11661
    public void unsetPe() {
11662
      this.pe = null;
11663
    }
11664
 
3430 rajveer 11665
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 11666
    public boolean isSetPe() {
11667
      return this.pe != null;
11668
    }
11669
 
11670
    public void setPeIsSet(boolean value) {
11671
      if (!value) {
11672
        this.pe = null;
11673
      }
11674
    }
11675
 
11676
    public void setFieldValue(_Fields field, Object value) {
11677
      switch (field) {
695 rajveer 11678
      case SUCCESS:
11679
        if (value == null) {
11680
          unsetSuccess();
11681
        } else {
11682
          setSuccess((Boolean)value);
11683
        }
11684
        break;
11685
 
420 ashish 11686
      case PE:
11687
        if (value == null) {
11688
          unsetPe();
11689
        } else {
11690
          setPe((PaymentException)value);
11691
        }
11692
        break;
11693
 
11694
      }
11695
    }
11696
 
11697
    public Object getFieldValue(_Fields field) {
11698
      switch (field) {
695 rajveer 11699
      case SUCCESS:
3430 rajveer 11700
        return Boolean.valueOf(isSuccess());
695 rajveer 11701
 
420 ashish 11702
      case PE:
11703
        return getPe();
11704
 
11705
      }
11706
      throw new IllegalStateException();
11707
    }
11708
 
3430 rajveer 11709
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11710
    public boolean isSet(_Fields field) {
11711
      if (field == null) {
11712
        throw new IllegalArgumentException();
11713
      }
420 ashish 11714
 
11715
      switch (field) {
695 rajveer 11716
      case SUCCESS:
11717
        return isSetSuccess();
420 ashish 11718
      case PE:
11719
        return isSetPe();
11720
      }
11721
      throw new IllegalStateException();
11722
    }
11723
 
11724
    @Override
11725
    public boolean equals(Object that) {
11726
      if (that == null)
11727
        return false;
695 rajveer 11728
      if (that instanceof updatePaymentDetails_result)
11729
        return this.equals((updatePaymentDetails_result)that);
420 ashish 11730
      return false;
11731
    }
11732
 
695 rajveer 11733
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 11734
      if (that == null)
11735
        return false;
11736
 
695 rajveer 11737
      boolean this_present_success = true;
11738
      boolean that_present_success = true;
11739
      if (this_present_success || that_present_success) {
11740
        if (!(this_present_success && that_present_success))
11741
          return false;
11742
        if (this.success != that.success)
11743
          return false;
11744
      }
11745
 
420 ashish 11746
      boolean this_present_pe = true && this.isSetPe();
11747
      boolean that_present_pe = true && that.isSetPe();
11748
      if (this_present_pe || that_present_pe) {
11749
        if (!(this_present_pe && that_present_pe))
11750
          return false;
11751
        if (!this.pe.equals(that.pe))
11752
          return false;
11753
      }
11754
 
11755
      return true;
11756
    }
11757
 
11758
    @Override
11759
    public int hashCode() {
11760
      return 0;
11761
    }
11762
 
695 rajveer 11763
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 11764
      if (!getClass().equals(other.getClass())) {
11765
        return getClass().getName().compareTo(other.getClass().getName());
11766
      }
11767
 
11768
      int lastComparison = 0;
695 rajveer 11769
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 11770
 
3430 rajveer 11771
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 11772
      if (lastComparison != 0) {
11773
        return lastComparison;
11774
      }
3430 rajveer 11775
      if (isSetSuccess()) {
11776
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11777
        if (lastComparison != 0) {
11778
          return lastComparison;
11779
        }
695 rajveer 11780
      }
3430 rajveer 11781
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 11782
      if (lastComparison != 0) {
11783
        return lastComparison;
11784
      }
3430 rajveer 11785
      if (isSetPe()) {
11786
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
11787
        if (lastComparison != 0) {
11788
          return lastComparison;
11789
        }
420 ashish 11790
      }
11791
      return 0;
11792
    }
11793
 
3430 rajveer 11794
    public _Fields fieldForId(int fieldId) {
11795
      return _Fields.findByThriftId(fieldId);
11796
    }
11797
 
11798
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11799
      org.apache.thrift.protocol.TField field;
420 ashish 11800
      iprot.readStructBegin();
11801
      while (true)
11802
      {
11803
        field = iprot.readFieldBegin();
3430 rajveer 11804
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 11805
          break;
11806
        }
3430 rajveer 11807
        switch (field.id) {
11808
          case 0: // SUCCESS
11809
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
11810
              this.success = iprot.readBool();
11811
              setSuccessIsSet(true);
11812
            } else { 
11813
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11814
            }
11815
            break;
11816
          case 1: // PE
11817
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11818
              this.pe = new PaymentException();
11819
              this.pe.read(iprot);
11820
            } else { 
11821
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11822
            }
11823
            break;
11824
          default:
11825
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 11826
        }
3430 rajveer 11827
        iprot.readFieldEnd();
420 ashish 11828
      }
11829
      iprot.readStructEnd();
11830
      validate();
11831
    }
11832
 
3430 rajveer 11833
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 11834
      oprot.writeStructBegin(STRUCT_DESC);
11835
 
695 rajveer 11836
      if (this.isSetSuccess()) {
11837
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11838
        oprot.writeBool(this.success);
11839
        oprot.writeFieldEnd();
11840
      } else if (this.isSetPe()) {
420 ashish 11841
        oprot.writeFieldBegin(PE_FIELD_DESC);
11842
        this.pe.write(oprot);
11843
        oprot.writeFieldEnd();
11844
      }
11845
      oprot.writeFieldStop();
11846
      oprot.writeStructEnd();
11847
    }
11848
 
11849
    @Override
11850
    public String toString() {
695 rajveer 11851
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 11852
      boolean first = true;
11853
 
695 rajveer 11854
      sb.append("success:");
11855
      sb.append(this.success);
11856
      first = false;
11857
      if (!first) sb.append(", ");
420 ashish 11858
      sb.append("pe:");
11859
      if (this.pe == null) {
11860
        sb.append("null");
11861
      } else {
11862
        sb.append(this.pe);
11863
      }
11864
      first = false;
11865
      sb.append(")");
11866
      return sb.toString();
11867
    }
11868
 
3430 rajveer 11869
    public void validate() throws org.apache.thrift.TException {
420 ashish 11870
      // check for required fields
11871
    }
11872
 
3430 rajveer 11873
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11874
      try {
11875
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11876
      } catch (org.apache.thrift.TException te) {
11877
        throw new java.io.IOException(te);
11878
      }
11879
    }
11880
 
11881
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11882
      try {
11883
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11884
      } catch (org.apache.thrift.TException te) {
11885
        throw new java.io.IOException(te);
11886
      }
11887
    }
11888
 
420 ashish 11889
  }
11890
 
3430 rajveer 11891
  public static class getSuccessfulPaymentsAmountRange_args implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_args, getSuccessfulPaymentsAmountRange_args._Fields>, java.io.Serializable, Cloneable   {
11892
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_args");
1629 ankur.sing 11893
 
11894
 
11895
 
11896
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11897
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 11898
;
11899
 
11900
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11901
 
11902
      static {
11903
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11904
          byName.put(field.getFieldName(), field);
11905
        }
11906
      }
11907
 
11908
      /**
11909
       * Find the _Fields constant that matches fieldId, or null if its not found.
11910
       */
11911
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11912
        switch(fieldId) {
11913
          default:
11914
            return null;
11915
        }
1629 ankur.sing 11916
      }
11917
 
11918
      /**
11919
       * Find the _Fields constant that matches fieldId, throwing an exception
11920
       * if it is not found.
11921
       */
11922
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11923
        _Fields fields = findByThriftId(fieldId);
11924
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11925
        return fields;
11926
      }
11927
 
11928
      /**
11929
       * Find the _Fields constant that matches name, or null if its not found.
11930
       */
11931
      public static _Fields findByName(String name) {
11932
        return byName.get(name);
11933
      }
11934
 
11935
      private final short _thriftId;
11936
      private final String _fieldName;
11937
 
11938
      _Fields(short thriftId, String fieldName) {
11939
        _thriftId = thriftId;
11940
        _fieldName = fieldName;
11941
      }
11942
 
11943
      public short getThriftFieldId() {
11944
        return _thriftId;
11945
      }
11946
 
11947
      public String getFieldName() {
11948
        return _fieldName;
11949
      }
11950
    }
3430 rajveer 11951
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 11952
    static {
3430 rajveer 11953
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11954
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11955
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_args.class, metaDataMap);
1629 ankur.sing 11956
    }
11957
 
1731 ankur.sing 11958
    public getSuccessfulPaymentsAmountRange_args() {
1629 ankur.sing 11959
    }
11960
 
11961
    /**
11962
     * Performs a deep copy on <i>other</i>.
11963
     */
1731 ankur.sing 11964
    public getSuccessfulPaymentsAmountRange_args(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 11965
    }
11966
 
1731 ankur.sing 11967
    public getSuccessfulPaymentsAmountRange_args deepCopy() {
11968
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 11969
    }
11970
 
3430 rajveer 11971
    @Override
11972
    public void clear() {
1629 ankur.sing 11973
    }
11974
 
11975
    public void setFieldValue(_Fields field, Object value) {
11976
      switch (field) {
11977
      }
11978
    }
11979
 
11980
    public Object getFieldValue(_Fields field) {
11981
      switch (field) {
11982
      }
11983
      throw new IllegalStateException();
11984
    }
11985
 
3430 rajveer 11986
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11987
    public boolean isSet(_Fields field) {
11988
      if (field == null) {
11989
        throw new IllegalArgumentException();
11990
      }
1629 ankur.sing 11991
 
11992
      switch (field) {
11993
      }
11994
      throw new IllegalStateException();
11995
    }
11996
 
11997
    @Override
11998
    public boolean equals(Object that) {
11999
      if (that == null)
12000
        return false;
1731 ankur.sing 12001
      if (that instanceof getSuccessfulPaymentsAmountRange_args)
12002
        return this.equals((getSuccessfulPaymentsAmountRange_args)that);
1629 ankur.sing 12003
      return false;
12004
    }
12005
 
1731 ankur.sing 12006
    public boolean equals(getSuccessfulPaymentsAmountRange_args that) {
1629 ankur.sing 12007
      if (that == null)
12008
        return false;
12009
 
12010
      return true;
12011
    }
12012
 
12013
    @Override
12014
    public int hashCode() {
12015
      return 0;
12016
    }
12017
 
1731 ankur.sing 12018
    public int compareTo(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 12019
      if (!getClass().equals(other.getClass())) {
12020
        return getClass().getName().compareTo(other.getClass().getName());
12021
      }
12022
 
12023
      int lastComparison = 0;
1731 ankur.sing 12024
      getSuccessfulPaymentsAmountRange_args typedOther = (getSuccessfulPaymentsAmountRange_args)other;
1629 ankur.sing 12025
 
12026
      return 0;
12027
    }
12028
 
3430 rajveer 12029
    public _Fields fieldForId(int fieldId) {
12030
      return _Fields.findByThriftId(fieldId);
12031
    }
12032
 
12033
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12034
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 12035
      iprot.readStructBegin();
12036
      while (true)
12037
      {
12038
        field = iprot.readFieldBegin();
3430 rajveer 12039
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 12040
          break;
12041
        }
3430 rajveer 12042
        switch (field.id) {
12043
          default:
12044
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 12045
        }
3430 rajveer 12046
        iprot.readFieldEnd();
1629 ankur.sing 12047
      }
12048
      iprot.readStructEnd();
12049
      validate();
12050
    }
12051
 
3430 rajveer 12052
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 12053
      validate();
12054
 
12055
      oprot.writeStructBegin(STRUCT_DESC);
12056
      oprot.writeFieldStop();
12057
      oprot.writeStructEnd();
12058
    }
12059
 
12060
    @Override
12061
    public String toString() {
1731 ankur.sing 12062
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_args(");
1629 ankur.sing 12063
      boolean first = true;
12064
 
12065
      sb.append(")");
12066
      return sb.toString();
12067
    }
12068
 
3430 rajveer 12069
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 12070
      // check for required fields
12071
    }
12072
 
3430 rajveer 12073
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12074
      try {
12075
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12076
      } catch (org.apache.thrift.TException te) {
12077
        throw new java.io.IOException(te);
12078
      }
12079
    }
12080
 
12081
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12082
      try {
12083
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12084
      } catch (org.apache.thrift.TException te) {
12085
        throw new java.io.IOException(te);
12086
      }
12087
    }
12088
 
1629 ankur.sing 12089
  }
12090
 
3430 rajveer 12091
  public static class getSuccessfulPaymentsAmountRange_result implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_result, getSuccessfulPaymentsAmountRange_result._Fields>, java.io.Serializable, Cloneable   {
12092
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_result");
1629 ankur.sing 12093
 
3430 rajveer 12094
    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 12095
 
3430 rajveer 12096
    private List<Double> success; // required
1629 ankur.sing 12097
 
12098
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12099
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 12100
      SUCCESS((short)0, "success");
12101
 
12102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12103
 
12104
      static {
12105
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12106
          byName.put(field.getFieldName(), field);
12107
        }
12108
      }
12109
 
12110
      /**
12111
       * Find the _Fields constant that matches fieldId, or null if its not found.
12112
       */
12113
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12114
        switch(fieldId) {
12115
          case 0: // SUCCESS
12116
            return SUCCESS;
12117
          default:
12118
            return null;
12119
        }
1629 ankur.sing 12120
      }
12121
 
12122
      /**
12123
       * Find the _Fields constant that matches fieldId, throwing an exception
12124
       * if it is not found.
12125
       */
12126
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12127
        _Fields fields = findByThriftId(fieldId);
12128
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12129
        return fields;
12130
      }
12131
 
12132
      /**
12133
       * Find the _Fields constant that matches name, or null if its not found.
12134
       */
12135
      public static _Fields findByName(String name) {
12136
        return byName.get(name);
12137
      }
12138
 
12139
      private final short _thriftId;
12140
      private final String _fieldName;
12141
 
12142
      _Fields(short thriftId, String fieldName) {
12143
        _thriftId = thriftId;
12144
        _fieldName = fieldName;
12145
      }
12146
 
12147
      public short getThriftFieldId() {
12148
        return _thriftId;
12149
      }
12150
 
12151
      public String getFieldName() {
12152
        return _fieldName;
12153
      }
12154
    }
12155
 
12156
    // isset id assignments
12157
 
3430 rajveer 12158
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 12159
    static {
3430 rajveer 12160
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12161
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12162
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12163
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
12164
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12165
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_result.class, metaDataMap);
1629 ankur.sing 12166
    }
12167
 
1731 ankur.sing 12168
    public getSuccessfulPaymentsAmountRange_result() {
1629 ankur.sing 12169
    }
12170
 
1731 ankur.sing 12171
    public getSuccessfulPaymentsAmountRange_result(
12172
      List<Double> success)
1629 ankur.sing 12173
    {
12174
      this();
12175
      this.success = success;
12176
    }
12177
 
12178
    /**
12179
     * Performs a deep copy on <i>other</i>.
12180
     */
1731 ankur.sing 12181
    public getSuccessfulPaymentsAmountRange_result(getSuccessfulPaymentsAmountRange_result other) {
12182
      if (other.isSetSuccess()) {
12183
        List<Double> __this__success = new ArrayList<Double>();
12184
        for (Double other_element : other.success) {
12185
          __this__success.add(other_element);
1629 ankur.sing 12186
        }
1731 ankur.sing 12187
        this.success = __this__success;
1629 ankur.sing 12188
      }
12189
    }
12190
 
1731 ankur.sing 12191
    public getSuccessfulPaymentsAmountRange_result deepCopy() {
12192
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 12193
    }
12194
 
3430 rajveer 12195
    @Override
12196
    public void clear() {
12197
      this.success = null;
1629 ankur.sing 12198
    }
12199
 
1731 ankur.sing 12200
    public int getSuccessSize() {
12201
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 12202
    }
12203
 
1731 ankur.sing 12204
    public java.util.Iterator<Double> getSuccessIterator() {
12205
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 12206
    }
12207
 
1731 ankur.sing 12208
    public void addToSuccess(double elem) {
12209
      if (this.success == null) {
12210
        this.success = new ArrayList<Double>();
1629 ankur.sing 12211
      }
1731 ankur.sing 12212
      this.success.add(elem);
1629 ankur.sing 12213
    }
12214
 
1731 ankur.sing 12215
    public List<Double> getSuccess() {
1629 ankur.sing 12216
      return this.success;
12217
    }
12218
 
3430 rajveer 12219
    public void setSuccess(List<Double> success) {
1629 ankur.sing 12220
      this.success = success;
12221
    }
12222
 
12223
    public void unsetSuccess() {
1731 ankur.sing 12224
      this.success = null;
1629 ankur.sing 12225
    }
12226
 
3430 rajveer 12227
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1629 ankur.sing 12228
    public boolean isSetSuccess() {
1731 ankur.sing 12229
      return this.success != null;
1629 ankur.sing 12230
    }
12231
 
12232
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 12233
      if (!value) {
12234
        this.success = null;
12235
      }
1629 ankur.sing 12236
    }
12237
 
12238
    public void setFieldValue(_Fields field, Object value) {
12239
      switch (field) {
12240
      case SUCCESS:
12241
        if (value == null) {
12242
          unsetSuccess();
12243
        } else {
1731 ankur.sing 12244
          setSuccess((List<Double>)value);
1629 ankur.sing 12245
        }
12246
        break;
12247
 
12248
      }
12249
    }
12250
 
12251
    public Object getFieldValue(_Fields field) {
12252
      switch (field) {
12253
      case SUCCESS:
1731 ankur.sing 12254
        return getSuccess();
1629 ankur.sing 12255
 
12256
      }
12257
      throw new IllegalStateException();
12258
    }
12259
 
3430 rajveer 12260
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12261
    public boolean isSet(_Fields field) {
12262
      if (field == null) {
12263
        throw new IllegalArgumentException();
12264
      }
1629 ankur.sing 12265
 
12266
      switch (field) {
12267
      case SUCCESS:
12268
        return isSetSuccess();
12269
      }
12270
      throw new IllegalStateException();
12271
    }
12272
 
12273
    @Override
12274
    public boolean equals(Object that) {
12275
      if (that == null)
12276
        return false;
1731 ankur.sing 12277
      if (that instanceof getSuccessfulPaymentsAmountRange_result)
12278
        return this.equals((getSuccessfulPaymentsAmountRange_result)that);
1629 ankur.sing 12279
      return false;
12280
    }
12281
 
1731 ankur.sing 12282
    public boolean equals(getSuccessfulPaymentsAmountRange_result that) {
1629 ankur.sing 12283
      if (that == null)
12284
        return false;
12285
 
1731 ankur.sing 12286
      boolean this_present_success = true && this.isSetSuccess();
12287
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 12288
      if (this_present_success || that_present_success) {
12289
        if (!(this_present_success && that_present_success))
12290
          return false;
1731 ankur.sing 12291
        if (!this.success.equals(that.success))
1629 ankur.sing 12292
          return false;
12293
      }
12294
 
12295
      return true;
12296
    }
12297
 
12298
    @Override
12299
    public int hashCode() {
12300
      return 0;
12301
    }
12302
 
1731 ankur.sing 12303
    public int compareTo(getSuccessfulPaymentsAmountRange_result other) {
1629 ankur.sing 12304
      if (!getClass().equals(other.getClass())) {
12305
        return getClass().getName().compareTo(other.getClass().getName());
12306
      }
12307
 
12308
      int lastComparison = 0;
1731 ankur.sing 12309
      getSuccessfulPaymentsAmountRange_result typedOther = (getSuccessfulPaymentsAmountRange_result)other;
1629 ankur.sing 12310
 
3430 rajveer 12311
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1629 ankur.sing 12312
      if (lastComparison != 0) {
12313
        return lastComparison;
12314
      }
3430 rajveer 12315
      if (isSetSuccess()) {
12316
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12317
        if (lastComparison != 0) {
12318
          return lastComparison;
12319
        }
1629 ankur.sing 12320
      }
12321
      return 0;
12322
    }
12323
 
3430 rajveer 12324
    public _Fields fieldForId(int fieldId) {
12325
      return _Fields.findByThriftId(fieldId);
12326
    }
12327
 
12328
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12329
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 12330
      iprot.readStructBegin();
12331
      while (true)
12332
      {
12333
        field = iprot.readFieldBegin();
3430 rajveer 12334
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 12335
          break;
12336
        }
3430 rajveer 12337
        switch (field.id) {
12338
          case 0: // SUCCESS
12339
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12340
              {
7049 anupam.sin 12341
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
12342
                this.success = new ArrayList<Double>(_list40.size);
12343
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
1731 ankur.sing 12344
                {
7049 anupam.sin 12345
                  double _elem42; // required
12346
                  _elem42 = iprot.readDouble();
12347
                  this.success.add(_elem42);
1731 ankur.sing 12348
                }
3430 rajveer 12349
                iprot.readListEnd();
1629 ankur.sing 12350
              }
3430 rajveer 12351
            } else { 
12352
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12353
            }
12354
            break;
12355
          default:
12356
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 12357
        }
3430 rajveer 12358
        iprot.readFieldEnd();
1629 ankur.sing 12359
      }
12360
      iprot.readStructEnd();
12361
      validate();
12362
    }
12363
 
3430 rajveer 12364
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 12365
      oprot.writeStructBegin(STRUCT_DESC);
12366
 
12367
      if (this.isSetSuccess()) {
12368
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 12369
        {
3430 rajveer 12370
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
7049 anupam.sin 12371
          for (double _iter43 : this.success)
1731 ankur.sing 12372
          {
7049 anupam.sin 12373
            oprot.writeDouble(_iter43);
1731 ankur.sing 12374
          }
12375
          oprot.writeListEnd();
12376
        }
1629 ankur.sing 12377
        oprot.writeFieldEnd();
12378
      }
12379
      oprot.writeFieldStop();
12380
      oprot.writeStructEnd();
12381
    }
12382
 
12383
    @Override
12384
    public String toString() {
1731 ankur.sing 12385
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_result(");
1629 ankur.sing 12386
      boolean first = true;
12387
 
12388
      sb.append("success:");
1731 ankur.sing 12389
      if (this.success == null) {
12390
        sb.append("null");
12391
      } else {
12392
        sb.append(this.success);
12393
      }
1629 ankur.sing 12394
      first = false;
12395
      sb.append(")");
12396
      return sb.toString();
12397
    }
12398
 
3430 rajveer 12399
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 12400
      // check for required fields
12401
    }
12402
 
3430 rajveer 12403
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12404
      try {
12405
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12406
      } catch (org.apache.thrift.TException te) {
12407
        throw new java.io.IOException(te);
12408
      }
12409
    }
12410
 
12411
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12412
      try {
12413
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12414
      } catch (org.apache.thrift.TException te) {
12415
        throw new java.io.IOException(te);
12416
      }
12417
    }
12418
 
1629 ankur.sing 12419
  }
12420
 
3430 rajveer 12421
  public static class initializeHdfcPayment_args implements org.apache.thrift.TBase<initializeHdfcPayment_args, initializeHdfcPayment_args._Fields>, java.io.Serializable, Cloneable   {
12422
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_args");
2462 chandransh 12423
 
3430 rajveer 12424
    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 12425
 
3430 rajveer 12426
    private long merchantPaymentId; // required
2462 chandransh 12427
 
12428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12429
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 12430
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
12431
 
12432
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12433
 
12434
      static {
12435
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12436
          byName.put(field.getFieldName(), field);
12437
        }
12438
      }
12439
 
12440
      /**
12441
       * Find the _Fields constant that matches fieldId, or null if its not found.
12442
       */
12443
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12444
        switch(fieldId) {
12445
          case 1: // MERCHANT_PAYMENT_ID
12446
            return MERCHANT_PAYMENT_ID;
12447
          default:
12448
            return null;
12449
        }
2462 chandransh 12450
      }
12451
 
12452
      /**
12453
       * Find the _Fields constant that matches fieldId, throwing an exception
12454
       * if it is not found.
12455
       */
12456
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12457
        _Fields fields = findByThriftId(fieldId);
12458
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12459
        return fields;
12460
      }
12461
 
12462
      /**
12463
       * Find the _Fields constant that matches name, or null if its not found.
12464
       */
12465
      public static _Fields findByName(String name) {
12466
        return byName.get(name);
12467
      }
12468
 
12469
      private final short _thriftId;
12470
      private final String _fieldName;
12471
 
12472
      _Fields(short thriftId, String fieldName) {
12473
        _thriftId = thriftId;
12474
        _fieldName = fieldName;
12475
      }
12476
 
12477
      public short getThriftFieldId() {
12478
        return _thriftId;
12479
      }
12480
 
12481
      public String getFieldName() {
12482
        return _fieldName;
12483
      }
12484
    }
12485
 
12486
    // isset id assignments
12487
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
12488
    private BitSet __isset_bit_vector = new BitSet(1);
12489
 
3430 rajveer 12490
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 12491
    static {
3430 rajveer 12492
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12493
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12494
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12495
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12496
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_args.class, metaDataMap);
2462 chandransh 12497
    }
12498
 
3010 chandransh 12499
    public initializeHdfcPayment_args() {
2462 chandransh 12500
    }
12501
 
3010 chandransh 12502
    public initializeHdfcPayment_args(
2462 chandransh 12503
      long merchantPaymentId)
12504
    {
12505
      this();
12506
      this.merchantPaymentId = merchantPaymentId;
12507
      setMerchantPaymentIdIsSet(true);
12508
    }
12509
 
12510
    /**
12511
     * Performs a deep copy on <i>other</i>.
12512
     */
3010 chandransh 12513
    public initializeHdfcPayment_args(initializeHdfcPayment_args other) {
2462 chandransh 12514
      __isset_bit_vector.clear();
12515
      __isset_bit_vector.or(other.__isset_bit_vector);
12516
      this.merchantPaymentId = other.merchantPaymentId;
12517
    }
12518
 
3010 chandransh 12519
    public initializeHdfcPayment_args deepCopy() {
12520
      return new initializeHdfcPayment_args(this);
2462 chandransh 12521
    }
12522
 
3430 rajveer 12523
    @Override
12524
    public void clear() {
12525
      setMerchantPaymentIdIsSet(false);
12526
      this.merchantPaymentId = 0;
2462 chandransh 12527
    }
12528
 
12529
    public long getMerchantPaymentId() {
12530
      return this.merchantPaymentId;
12531
    }
12532
 
3430 rajveer 12533
    public void setMerchantPaymentId(long merchantPaymentId) {
2462 chandransh 12534
      this.merchantPaymentId = merchantPaymentId;
12535
      setMerchantPaymentIdIsSet(true);
12536
    }
12537
 
12538
    public void unsetMerchantPaymentId() {
12539
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
12540
    }
12541
 
3430 rajveer 12542
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
2462 chandransh 12543
    public boolean isSetMerchantPaymentId() {
12544
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
12545
    }
12546
 
12547
    public void setMerchantPaymentIdIsSet(boolean value) {
12548
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
12549
    }
12550
 
12551
    public void setFieldValue(_Fields field, Object value) {
12552
      switch (field) {
12553
      case MERCHANT_PAYMENT_ID:
12554
        if (value == null) {
12555
          unsetMerchantPaymentId();
12556
        } else {
12557
          setMerchantPaymentId((Long)value);
12558
        }
12559
        break;
12560
 
12561
      }
12562
    }
12563
 
12564
    public Object getFieldValue(_Fields field) {
12565
      switch (field) {
12566
      case MERCHANT_PAYMENT_ID:
3430 rajveer 12567
        return Long.valueOf(getMerchantPaymentId());
2462 chandransh 12568
 
12569
      }
12570
      throw new IllegalStateException();
12571
    }
12572
 
3430 rajveer 12573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12574
    public boolean isSet(_Fields field) {
12575
      if (field == null) {
12576
        throw new IllegalArgumentException();
12577
      }
2462 chandransh 12578
 
12579
      switch (field) {
12580
      case MERCHANT_PAYMENT_ID:
12581
        return isSetMerchantPaymentId();
12582
      }
12583
      throw new IllegalStateException();
12584
    }
12585
 
12586
    @Override
12587
    public boolean equals(Object that) {
12588
      if (that == null)
12589
        return false;
3010 chandransh 12590
      if (that instanceof initializeHdfcPayment_args)
12591
        return this.equals((initializeHdfcPayment_args)that);
2462 chandransh 12592
      return false;
12593
    }
12594
 
3010 chandransh 12595
    public boolean equals(initializeHdfcPayment_args that) {
2462 chandransh 12596
      if (that == null)
12597
        return false;
12598
 
12599
      boolean this_present_merchantPaymentId = true;
12600
      boolean that_present_merchantPaymentId = true;
12601
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
12602
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
12603
          return false;
12604
        if (this.merchantPaymentId != that.merchantPaymentId)
12605
          return false;
12606
      }
12607
 
12608
      return true;
12609
    }
12610
 
12611
    @Override
12612
    public int hashCode() {
12613
      return 0;
12614
    }
12615
 
3010 chandransh 12616
    public int compareTo(initializeHdfcPayment_args other) {
2462 chandransh 12617
      if (!getClass().equals(other.getClass())) {
12618
        return getClass().getName().compareTo(other.getClass().getName());
12619
      }
12620
 
12621
      int lastComparison = 0;
3010 chandransh 12622
      initializeHdfcPayment_args typedOther = (initializeHdfcPayment_args)other;
2462 chandransh 12623
 
3430 rajveer 12624
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
2462 chandransh 12625
      if (lastComparison != 0) {
12626
        return lastComparison;
12627
      }
3430 rajveer 12628
      if (isSetMerchantPaymentId()) {
12629
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
12630
        if (lastComparison != 0) {
12631
          return lastComparison;
12632
        }
2462 chandransh 12633
      }
12634
      return 0;
12635
    }
12636
 
3430 rajveer 12637
    public _Fields fieldForId(int fieldId) {
12638
      return _Fields.findByThriftId(fieldId);
12639
    }
12640
 
12641
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12642
      org.apache.thrift.protocol.TField field;
2462 chandransh 12643
      iprot.readStructBegin();
12644
      while (true)
12645
      {
12646
        field = iprot.readFieldBegin();
3430 rajveer 12647
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 12648
          break;
12649
        }
3430 rajveer 12650
        switch (field.id) {
12651
          case 1: // MERCHANT_PAYMENT_ID
12652
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12653
              this.merchantPaymentId = iprot.readI64();
12654
              setMerchantPaymentIdIsSet(true);
12655
            } else { 
12656
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12657
            }
12658
            break;
12659
          default:
12660
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 12661
        }
3430 rajveer 12662
        iprot.readFieldEnd();
2462 chandransh 12663
      }
12664
      iprot.readStructEnd();
12665
      validate();
12666
    }
12667
 
3430 rajveer 12668
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 12669
      validate();
12670
 
12671
      oprot.writeStructBegin(STRUCT_DESC);
12672
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
12673
      oprot.writeI64(this.merchantPaymentId);
12674
      oprot.writeFieldEnd();
12675
      oprot.writeFieldStop();
12676
      oprot.writeStructEnd();
12677
    }
12678
 
12679
    @Override
12680
    public String toString() {
3010 chandransh 12681
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_args(");
2462 chandransh 12682
      boolean first = true;
12683
 
12684
      sb.append("merchantPaymentId:");
12685
      sb.append(this.merchantPaymentId);
12686
      first = false;
12687
      sb.append(")");
12688
      return sb.toString();
12689
    }
12690
 
3430 rajveer 12691
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 12692
      // check for required fields
12693
    }
12694
 
3430 rajveer 12695
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12696
      try {
12697
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12698
      } catch (org.apache.thrift.TException te) {
12699
        throw new java.io.IOException(te);
12700
      }
12701
    }
12702
 
12703
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12704
      try {
12705
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12706
      } catch (org.apache.thrift.TException te) {
12707
        throw new java.io.IOException(te);
12708
      }
12709
    }
12710
 
2462 chandransh 12711
  }
12712
 
3430 rajveer 12713
  public static class initializeHdfcPayment_result implements org.apache.thrift.TBase<initializeHdfcPayment_result, initializeHdfcPayment_result._Fields>, java.io.Serializable, Cloneable   {
12714
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_result");
2462 chandransh 12715
 
3430 rajveer 12716
    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);
12717
    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 12718
 
3430 rajveer 12719
    private String success; // required
12720
    private PaymentException pe; // required
2462 chandransh 12721
 
12722
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12723
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 12724
      SUCCESS((short)0, "success"),
12725
      PE((short)1, "pe");
12726
 
12727
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12728
 
12729
      static {
12730
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12731
          byName.put(field.getFieldName(), field);
12732
        }
12733
      }
12734
 
12735
      /**
12736
       * Find the _Fields constant that matches fieldId, or null if its not found.
12737
       */
12738
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12739
        switch(fieldId) {
12740
          case 0: // SUCCESS
12741
            return SUCCESS;
12742
          case 1: // PE
12743
            return PE;
12744
          default:
12745
            return null;
12746
        }
2462 chandransh 12747
      }
12748
 
12749
      /**
12750
       * Find the _Fields constant that matches fieldId, throwing an exception
12751
       * if it is not found.
12752
       */
12753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12754
        _Fields fields = findByThriftId(fieldId);
12755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12756
        return fields;
12757
      }
12758
 
12759
      /**
12760
       * Find the _Fields constant that matches name, or null if its not found.
12761
       */
12762
      public static _Fields findByName(String name) {
12763
        return byName.get(name);
12764
      }
12765
 
12766
      private final short _thriftId;
12767
      private final String _fieldName;
12768
 
12769
      _Fields(short thriftId, String fieldName) {
12770
        _thriftId = thriftId;
12771
        _fieldName = fieldName;
12772
      }
12773
 
12774
      public short getThriftFieldId() {
12775
        return _thriftId;
12776
      }
12777
 
12778
      public String getFieldName() {
12779
        return _fieldName;
12780
      }
12781
    }
12782
 
12783
    // isset id assignments
12784
 
3430 rajveer 12785
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 12786
    static {
3430 rajveer 12787
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12788
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12789
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12790
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12791
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12792
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12793
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_result.class, metaDataMap);
2462 chandransh 12794
    }
12795
 
3010 chandransh 12796
    public initializeHdfcPayment_result() {
2462 chandransh 12797
    }
12798
 
3010 chandransh 12799
    public initializeHdfcPayment_result(
12800
      String success,
2462 chandransh 12801
      PaymentException pe)
12802
    {
12803
      this();
12804
      this.success = success;
12805
      this.pe = pe;
12806
    }
12807
 
12808
    /**
12809
     * Performs a deep copy on <i>other</i>.
12810
     */
3010 chandransh 12811
    public initializeHdfcPayment_result(initializeHdfcPayment_result other) {
2462 chandransh 12812
      if (other.isSetSuccess()) {
3010 chandransh 12813
        this.success = other.success;
2462 chandransh 12814
      }
12815
      if (other.isSetPe()) {
12816
        this.pe = new PaymentException(other.pe);
12817
      }
12818
    }
12819
 
3010 chandransh 12820
    public initializeHdfcPayment_result deepCopy() {
12821
      return new initializeHdfcPayment_result(this);
2462 chandransh 12822
    }
12823
 
3430 rajveer 12824
    @Override
12825
    public void clear() {
12826
      this.success = null;
12827
      this.pe = null;
2462 chandransh 12828
    }
12829
 
3010 chandransh 12830
    public String getSuccess() {
2462 chandransh 12831
      return this.success;
12832
    }
12833
 
3430 rajveer 12834
    public void setSuccess(String success) {
2462 chandransh 12835
      this.success = success;
12836
    }
12837
 
12838
    public void unsetSuccess() {
12839
      this.success = null;
12840
    }
12841
 
3430 rajveer 12842
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 12843
    public boolean isSetSuccess() {
12844
      return this.success != null;
12845
    }
12846
 
12847
    public void setSuccessIsSet(boolean value) {
12848
      if (!value) {
12849
        this.success = null;
12850
      }
12851
    }
12852
 
12853
    public PaymentException getPe() {
12854
      return this.pe;
12855
    }
12856
 
3430 rajveer 12857
    public void setPe(PaymentException pe) {
2462 chandransh 12858
      this.pe = pe;
12859
    }
12860
 
12861
    public void unsetPe() {
12862
      this.pe = null;
12863
    }
12864
 
3430 rajveer 12865
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 12866
    public boolean isSetPe() {
12867
      return this.pe != null;
12868
    }
12869
 
12870
    public void setPeIsSet(boolean value) {
12871
      if (!value) {
12872
        this.pe = null;
12873
      }
12874
    }
12875
 
12876
    public void setFieldValue(_Fields field, Object value) {
12877
      switch (field) {
12878
      case SUCCESS:
12879
        if (value == null) {
12880
          unsetSuccess();
12881
        } else {
3010 chandransh 12882
          setSuccess((String)value);
2462 chandransh 12883
        }
12884
        break;
12885
 
12886
      case PE:
12887
        if (value == null) {
12888
          unsetPe();
12889
        } else {
12890
          setPe((PaymentException)value);
12891
        }
12892
        break;
12893
 
12894
      }
12895
    }
12896
 
12897
    public Object getFieldValue(_Fields field) {
12898
      switch (field) {
12899
      case SUCCESS:
12900
        return getSuccess();
12901
 
12902
      case PE:
12903
        return getPe();
12904
 
12905
      }
12906
      throw new IllegalStateException();
12907
    }
12908
 
3430 rajveer 12909
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12910
    public boolean isSet(_Fields field) {
12911
      if (field == null) {
12912
        throw new IllegalArgumentException();
12913
      }
2462 chandransh 12914
 
12915
      switch (field) {
12916
      case SUCCESS:
12917
        return isSetSuccess();
12918
      case PE:
12919
        return isSetPe();
12920
      }
12921
      throw new IllegalStateException();
12922
    }
12923
 
12924
    @Override
12925
    public boolean equals(Object that) {
12926
      if (that == null)
12927
        return false;
3010 chandransh 12928
      if (that instanceof initializeHdfcPayment_result)
12929
        return this.equals((initializeHdfcPayment_result)that);
2462 chandransh 12930
      return false;
12931
    }
12932
 
3010 chandransh 12933
    public boolean equals(initializeHdfcPayment_result that) {
2462 chandransh 12934
      if (that == null)
12935
        return false;
12936
 
12937
      boolean this_present_success = true && this.isSetSuccess();
12938
      boolean that_present_success = true && that.isSetSuccess();
12939
      if (this_present_success || that_present_success) {
12940
        if (!(this_present_success && that_present_success))
12941
          return false;
12942
        if (!this.success.equals(that.success))
12943
          return false;
12944
      }
12945
 
12946
      boolean this_present_pe = true && this.isSetPe();
12947
      boolean that_present_pe = true && that.isSetPe();
12948
      if (this_present_pe || that_present_pe) {
12949
        if (!(this_present_pe && that_present_pe))
12950
          return false;
12951
        if (!this.pe.equals(that.pe))
12952
          return false;
12953
      }
12954
 
12955
      return true;
12956
    }
12957
 
12958
    @Override
12959
    public int hashCode() {
12960
      return 0;
12961
    }
12962
 
3010 chandransh 12963
    public int compareTo(initializeHdfcPayment_result other) {
12964
      if (!getClass().equals(other.getClass())) {
12965
        return getClass().getName().compareTo(other.getClass().getName());
12966
      }
12967
 
12968
      int lastComparison = 0;
12969
      initializeHdfcPayment_result typedOther = (initializeHdfcPayment_result)other;
12970
 
3430 rajveer 12971
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3010 chandransh 12972
      if (lastComparison != 0) {
12973
        return lastComparison;
12974
      }
3430 rajveer 12975
      if (isSetSuccess()) {
12976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12977
        if (lastComparison != 0) {
12978
          return lastComparison;
12979
        }
3010 chandransh 12980
      }
3430 rajveer 12981
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
3010 chandransh 12982
      if (lastComparison != 0) {
12983
        return lastComparison;
12984
      }
3430 rajveer 12985
      if (isSetPe()) {
12986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
12987
        if (lastComparison != 0) {
12988
          return lastComparison;
12989
        }
3010 chandransh 12990
      }
12991
      return 0;
12992
    }
12993
 
3430 rajveer 12994
    public _Fields fieldForId(int fieldId) {
12995
      return _Fields.findByThriftId(fieldId);
12996
    }
12997
 
12998
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12999
      org.apache.thrift.protocol.TField field;
2462 chandransh 13000
      iprot.readStructBegin();
13001
      while (true)
13002
      {
13003
        field = iprot.readFieldBegin();
3430 rajveer 13004
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 13005
          break;
13006
        }
3430 rajveer 13007
        switch (field.id) {
13008
          case 0: // SUCCESS
13009
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13010
              this.success = iprot.readString();
13011
            } else { 
13012
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13013
            }
13014
            break;
13015
          case 1: // PE
13016
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13017
              this.pe = new PaymentException();
13018
              this.pe.read(iprot);
13019
            } else { 
13020
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13021
            }
13022
            break;
13023
          default:
13024
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 13025
        }
3430 rajveer 13026
        iprot.readFieldEnd();
2462 chandransh 13027
      }
13028
      iprot.readStructEnd();
13029
      validate();
13030
    }
13031
 
3430 rajveer 13032
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 13033
      oprot.writeStructBegin(STRUCT_DESC);
13034
 
13035
      if (this.isSetSuccess()) {
13036
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 13037
        oprot.writeString(this.success);
2462 chandransh 13038
        oprot.writeFieldEnd();
13039
      } else if (this.isSetPe()) {
13040
        oprot.writeFieldBegin(PE_FIELD_DESC);
13041
        this.pe.write(oprot);
13042
        oprot.writeFieldEnd();
13043
      }
13044
      oprot.writeFieldStop();
13045
      oprot.writeStructEnd();
13046
    }
13047
 
13048
    @Override
13049
    public String toString() {
3010 chandransh 13050
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_result(");
2462 chandransh 13051
      boolean first = true;
13052
 
13053
      sb.append("success:");
13054
      if (this.success == null) {
13055
        sb.append("null");
13056
      } else {
13057
        sb.append(this.success);
13058
      }
13059
      first = false;
13060
      if (!first) sb.append(", ");
13061
      sb.append("pe:");
13062
      if (this.pe == null) {
13063
        sb.append("null");
13064
      } else {
13065
        sb.append(this.pe);
13066
      }
13067
      first = false;
13068
      sb.append(")");
13069
      return sb.toString();
13070
    }
13071
 
3430 rajveer 13072
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 13073
      // check for required fields
13074
    }
13075
 
3430 rajveer 13076
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13077
      try {
13078
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13079
      } catch (org.apache.thrift.TException te) {
13080
        throw new java.io.IOException(te);
13081
      }
13082
    }
13083
 
13084
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13085
      try {
13086
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13087
      } catch (org.apache.thrift.TException te) {
13088
        throw new java.io.IOException(te);
13089
      }
13090
    }
13091
 
2462 chandransh 13092
  }
13093
 
6050 anupam.sin 13094
  public static class doHdfcPaymentForDigitalOrder_args implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_args, doHdfcPaymentForDigitalOrder_args._Fields>, java.io.Serializable, Cloneable   {
13095
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_args");
13096
 
13097
    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);
13098
    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 13099
    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 13100
 
13101
    private long merchantPaymentId; // required
13102
    private long rechargeOrderId; // required
6228 anupam.sin 13103
    private String phone; // required
6050 anupam.sin 13104
 
13105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13106
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13107
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId"),
6228 anupam.sin 13108
      RECHARGE_ORDER_ID((short)2, "rechargeOrderId"),
13109
      PHONE((short)-1, "phone");
6050 anupam.sin 13110
 
13111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13112
 
13113
      static {
13114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13115
          byName.put(field.getFieldName(), field);
13116
        }
13117
      }
13118
 
13119
      /**
13120
       * Find the _Fields constant that matches fieldId, or null if its not found.
13121
       */
13122
      public static _Fields findByThriftId(int fieldId) {
13123
        switch(fieldId) {
13124
          case 1: // MERCHANT_PAYMENT_ID
13125
            return MERCHANT_PAYMENT_ID;
13126
          case 2: // RECHARGE_ORDER_ID
13127
            return RECHARGE_ORDER_ID;
6228 anupam.sin 13128
          case -1: // PHONE
13129
            return PHONE;
6050 anupam.sin 13130
          default:
13131
            return null;
13132
        }
13133
      }
13134
 
13135
      /**
13136
       * Find the _Fields constant that matches fieldId, throwing an exception
13137
       * if it is not found.
13138
       */
13139
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13140
        _Fields fields = findByThriftId(fieldId);
13141
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13142
        return fields;
13143
      }
13144
 
13145
      /**
13146
       * Find the _Fields constant that matches name, or null if its not found.
13147
       */
13148
      public static _Fields findByName(String name) {
13149
        return byName.get(name);
13150
      }
13151
 
13152
      private final short _thriftId;
13153
      private final String _fieldName;
13154
 
13155
      _Fields(short thriftId, String fieldName) {
13156
        _thriftId = thriftId;
13157
        _fieldName = fieldName;
13158
      }
13159
 
13160
      public short getThriftFieldId() {
13161
        return _thriftId;
13162
      }
13163
 
13164
      public String getFieldName() {
13165
        return _fieldName;
13166
      }
13167
    }
13168
 
13169
    // isset id assignments
13170
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
13171
    private static final int __RECHARGEORDERID_ISSET_ID = 1;
13172
    private BitSet __isset_bit_vector = new BitSet(2);
13173
 
13174
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13175
    static {
13176
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13177
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13178
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13179
      tmpMap.put(_Fields.RECHARGE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("rechargeOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13180
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6228 anupam.sin 13181
      tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13182
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6050 anupam.sin 13183
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13184
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_args.class, metaDataMap);
13185
    }
13186
 
13187
    public doHdfcPaymentForDigitalOrder_args() {
13188
    }
13189
 
13190
    public doHdfcPaymentForDigitalOrder_args(
13191
      long merchantPaymentId,
6228 anupam.sin 13192
      long rechargeOrderId,
13193
      String phone)
6050 anupam.sin 13194
    {
13195
      this();
13196
      this.merchantPaymentId = merchantPaymentId;
13197
      setMerchantPaymentIdIsSet(true);
13198
      this.rechargeOrderId = rechargeOrderId;
13199
      setRechargeOrderIdIsSet(true);
6228 anupam.sin 13200
      this.phone = phone;
6050 anupam.sin 13201
    }
13202
 
13203
    /**
13204
     * Performs a deep copy on <i>other</i>.
13205
     */
13206
    public doHdfcPaymentForDigitalOrder_args(doHdfcPaymentForDigitalOrder_args other) {
13207
      __isset_bit_vector.clear();
13208
      __isset_bit_vector.or(other.__isset_bit_vector);
13209
      this.merchantPaymentId = other.merchantPaymentId;
13210
      this.rechargeOrderId = other.rechargeOrderId;
6228 anupam.sin 13211
      if (other.isSetPhone()) {
13212
        this.phone = other.phone;
13213
      }
6050 anupam.sin 13214
    }
13215
 
13216
    public doHdfcPaymentForDigitalOrder_args deepCopy() {
13217
      return new doHdfcPaymentForDigitalOrder_args(this);
13218
    }
13219
 
13220
    @Override
13221
    public void clear() {
13222
      setMerchantPaymentIdIsSet(false);
13223
      this.merchantPaymentId = 0;
13224
      setRechargeOrderIdIsSet(false);
13225
      this.rechargeOrderId = 0;
6228 anupam.sin 13226
      this.phone = null;
6050 anupam.sin 13227
    }
13228
 
13229
    public long getMerchantPaymentId() {
13230
      return this.merchantPaymentId;
13231
    }
13232
 
13233
    public void setMerchantPaymentId(long merchantPaymentId) {
13234
      this.merchantPaymentId = merchantPaymentId;
13235
      setMerchantPaymentIdIsSet(true);
13236
    }
13237
 
13238
    public void unsetMerchantPaymentId() {
13239
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
13240
    }
13241
 
13242
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
13243
    public boolean isSetMerchantPaymentId() {
13244
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
13245
    }
13246
 
13247
    public void setMerchantPaymentIdIsSet(boolean value) {
13248
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
13249
    }
13250
 
13251
    public long getRechargeOrderId() {
13252
      return this.rechargeOrderId;
13253
    }
13254
 
13255
    public void setRechargeOrderId(long rechargeOrderId) {
13256
      this.rechargeOrderId = rechargeOrderId;
13257
      setRechargeOrderIdIsSet(true);
13258
    }
13259
 
13260
    public void unsetRechargeOrderId() {
13261
      __isset_bit_vector.clear(__RECHARGEORDERID_ISSET_ID);
13262
    }
13263
 
13264
    /** Returns true if field rechargeOrderId is set (has been assigned a value) and false otherwise */
13265
    public boolean isSetRechargeOrderId() {
13266
      return __isset_bit_vector.get(__RECHARGEORDERID_ISSET_ID);
13267
    }
13268
 
13269
    public void setRechargeOrderIdIsSet(boolean value) {
13270
      __isset_bit_vector.set(__RECHARGEORDERID_ISSET_ID, value);
13271
    }
13272
 
6228 anupam.sin 13273
    public String getPhone() {
13274
      return this.phone;
13275
    }
13276
 
13277
    public void setPhone(String phone) {
13278
      this.phone = phone;
13279
    }
13280
 
13281
    public void unsetPhone() {
13282
      this.phone = null;
13283
    }
13284
 
13285
    /** Returns true if field phone is set (has been assigned a value) and false otherwise */
13286
    public boolean isSetPhone() {
13287
      return this.phone != null;
13288
    }
13289
 
13290
    public void setPhoneIsSet(boolean value) {
13291
      if (!value) {
13292
        this.phone = null;
13293
      }
13294
    }
13295
 
6050 anupam.sin 13296
    public void setFieldValue(_Fields field, Object value) {
13297
      switch (field) {
13298
      case MERCHANT_PAYMENT_ID:
13299
        if (value == null) {
13300
          unsetMerchantPaymentId();
13301
        } else {
13302
          setMerchantPaymentId((Long)value);
13303
        }
13304
        break;
13305
 
13306
      case RECHARGE_ORDER_ID:
13307
        if (value == null) {
13308
          unsetRechargeOrderId();
13309
        } else {
13310
          setRechargeOrderId((Long)value);
13311
        }
13312
        break;
13313
 
6228 anupam.sin 13314
      case PHONE:
13315
        if (value == null) {
13316
          unsetPhone();
13317
        } else {
13318
          setPhone((String)value);
13319
        }
13320
        break;
13321
 
6050 anupam.sin 13322
      }
13323
    }
13324
 
13325
    public Object getFieldValue(_Fields field) {
13326
      switch (field) {
13327
      case MERCHANT_PAYMENT_ID:
13328
        return Long.valueOf(getMerchantPaymentId());
13329
 
13330
      case RECHARGE_ORDER_ID:
13331
        return Long.valueOf(getRechargeOrderId());
13332
 
6228 anupam.sin 13333
      case PHONE:
13334
        return getPhone();
13335
 
6050 anupam.sin 13336
      }
13337
      throw new IllegalStateException();
13338
    }
13339
 
13340
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13341
    public boolean isSet(_Fields field) {
13342
      if (field == null) {
13343
        throw new IllegalArgumentException();
13344
      }
13345
 
13346
      switch (field) {
13347
      case MERCHANT_PAYMENT_ID:
13348
        return isSetMerchantPaymentId();
13349
      case RECHARGE_ORDER_ID:
13350
        return isSetRechargeOrderId();
6228 anupam.sin 13351
      case PHONE:
13352
        return isSetPhone();
6050 anupam.sin 13353
      }
13354
      throw new IllegalStateException();
13355
    }
13356
 
13357
    @Override
13358
    public boolean equals(Object that) {
13359
      if (that == null)
13360
        return false;
13361
      if (that instanceof doHdfcPaymentForDigitalOrder_args)
13362
        return this.equals((doHdfcPaymentForDigitalOrder_args)that);
13363
      return false;
13364
    }
13365
 
13366
    public boolean equals(doHdfcPaymentForDigitalOrder_args that) {
13367
      if (that == null)
13368
        return false;
13369
 
13370
      boolean this_present_merchantPaymentId = true;
13371
      boolean that_present_merchantPaymentId = true;
13372
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
13373
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
13374
          return false;
13375
        if (this.merchantPaymentId != that.merchantPaymentId)
13376
          return false;
13377
      }
13378
 
13379
      boolean this_present_rechargeOrderId = true;
13380
      boolean that_present_rechargeOrderId = true;
13381
      if (this_present_rechargeOrderId || that_present_rechargeOrderId) {
13382
        if (!(this_present_rechargeOrderId && that_present_rechargeOrderId))
13383
          return false;
13384
        if (this.rechargeOrderId != that.rechargeOrderId)
13385
          return false;
13386
      }
13387
 
6228 anupam.sin 13388
      boolean this_present_phone = true && this.isSetPhone();
13389
      boolean that_present_phone = true && that.isSetPhone();
13390
      if (this_present_phone || that_present_phone) {
13391
        if (!(this_present_phone && that_present_phone))
13392
          return false;
13393
        if (!this.phone.equals(that.phone))
13394
          return false;
13395
      }
13396
 
6050 anupam.sin 13397
      return true;
13398
    }
13399
 
13400
    @Override
13401
    public int hashCode() {
13402
      return 0;
13403
    }
13404
 
13405
    public int compareTo(doHdfcPaymentForDigitalOrder_args other) {
13406
      if (!getClass().equals(other.getClass())) {
13407
        return getClass().getName().compareTo(other.getClass().getName());
13408
      }
13409
 
13410
      int lastComparison = 0;
13411
      doHdfcPaymentForDigitalOrder_args typedOther = (doHdfcPaymentForDigitalOrder_args)other;
13412
 
13413
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
13414
      if (lastComparison != 0) {
13415
        return lastComparison;
13416
      }
13417
      if (isSetMerchantPaymentId()) {
13418
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
13419
        if (lastComparison != 0) {
13420
          return lastComparison;
13421
        }
13422
      }
13423
      lastComparison = Boolean.valueOf(isSetRechargeOrderId()).compareTo(typedOther.isSetRechargeOrderId());
13424
      if (lastComparison != 0) {
13425
        return lastComparison;
13426
      }
13427
      if (isSetRechargeOrderId()) {
13428
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeOrderId, typedOther.rechargeOrderId);
13429
        if (lastComparison != 0) {
13430
          return lastComparison;
13431
        }
13432
      }
6228 anupam.sin 13433
      lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
13434
      if (lastComparison != 0) {
13435
        return lastComparison;
13436
      }
13437
      if (isSetPhone()) {
13438
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
13439
        if (lastComparison != 0) {
13440
          return lastComparison;
13441
        }
13442
      }
6050 anupam.sin 13443
      return 0;
13444
    }
13445
 
13446
    public _Fields fieldForId(int fieldId) {
13447
      return _Fields.findByThriftId(fieldId);
13448
    }
13449
 
13450
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13451
      org.apache.thrift.protocol.TField field;
13452
      iprot.readStructBegin();
13453
      while (true)
13454
      {
13455
        field = iprot.readFieldBegin();
13456
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13457
          break;
13458
        }
13459
        switch (field.id) {
13460
          case 1: // MERCHANT_PAYMENT_ID
13461
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13462
              this.merchantPaymentId = iprot.readI64();
13463
              setMerchantPaymentIdIsSet(true);
13464
            } else { 
13465
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13466
            }
13467
            break;
13468
          case 2: // RECHARGE_ORDER_ID
13469
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13470
              this.rechargeOrderId = iprot.readI64();
13471
              setRechargeOrderIdIsSet(true);
13472
            } else { 
13473
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13474
            }
13475
            break;
6228 anupam.sin 13476
          case -1: // PHONE
13477
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13478
              this.phone = iprot.readString();
13479
            } else { 
13480
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13481
            }
13482
            break;
6050 anupam.sin 13483
          default:
13484
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13485
        }
13486
        iprot.readFieldEnd();
13487
      }
13488
      iprot.readStructEnd();
13489
      validate();
13490
    }
13491
 
13492
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13493
      validate();
13494
 
13495
      oprot.writeStructBegin(STRUCT_DESC);
6228 anupam.sin 13496
      if (this.phone != null) {
13497
        oprot.writeFieldBegin(PHONE_FIELD_DESC);
13498
        oprot.writeString(this.phone);
13499
        oprot.writeFieldEnd();
13500
      }
6050 anupam.sin 13501
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
13502
      oprot.writeI64(this.merchantPaymentId);
13503
      oprot.writeFieldEnd();
13504
      oprot.writeFieldBegin(RECHARGE_ORDER_ID_FIELD_DESC);
13505
      oprot.writeI64(this.rechargeOrderId);
13506
      oprot.writeFieldEnd();
13507
      oprot.writeFieldStop();
13508
      oprot.writeStructEnd();
13509
    }
13510
 
13511
    @Override
13512
    public String toString() {
13513
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_args(");
13514
      boolean first = true;
13515
 
13516
      sb.append("merchantPaymentId:");
13517
      sb.append(this.merchantPaymentId);
13518
      first = false;
13519
      if (!first) sb.append(", ");
13520
      sb.append("rechargeOrderId:");
13521
      sb.append(this.rechargeOrderId);
13522
      first = false;
6228 anupam.sin 13523
      if (!first) sb.append(", ");
13524
      sb.append("phone:");
13525
      if (this.phone == null) {
13526
        sb.append("null");
13527
      } else {
13528
        sb.append(this.phone);
13529
      }
13530
      first = false;
6050 anupam.sin 13531
      sb.append(")");
13532
      return sb.toString();
13533
    }
13534
 
13535
    public void validate() throws org.apache.thrift.TException {
13536
      // check for required fields
13537
    }
13538
 
13539
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13540
      try {
13541
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13542
      } catch (org.apache.thrift.TException te) {
13543
        throw new java.io.IOException(te);
13544
      }
13545
    }
13546
 
13547
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13548
      try {
13549
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13550
      } catch (org.apache.thrift.TException te) {
13551
        throw new java.io.IOException(te);
13552
      }
13553
    }
13554
 
13555
  }
13556
 
13557
  public static class doHdfcPaymentForDigitalOrder_result implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_result, doHdfcPaymentForDigitalOrder_result._Fields>, java.io.Serializable, Cloneable   {
13558
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_result");
13559
 
13560
    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);
13561
    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);
13562
 
13563
    private String success; // required
13564
    private PaymentException pe; // required
13565
 
13566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13567
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13568
      SUCCESS((short)0, "success"),
13569
      PE((short)1, "pe");
13570
 
13571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13572
 
13573
      static {
13574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13575
          byName.put(field.getFieldName(), field);
13576
        }
13577
      }
13578
 
13579
      /**
13580
       * Find the _Fields constant that matches fieldId, or null if its not found.
13581
       */
13582
      public static _Fields findByThriftId(int fieldId) {
13583
        switch(fieldId) {
13584
          case 0: // SUCCESS
13585
            return SUCCESS;
13586
          case 1: // PE
13587
            return PE;
13588
          default:
13589
            return null;
13590
        }
13591
      }
13592
 
13593
      /**
13594
       * Find the _Fields constant that matches fieldId, throwing an exception
13595
       * if it is not found.
13596
       */
13597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13598
        _Fields fields = findByThriftId(fieldId);
13599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13600
        return fields;
13601
      }
13602
 
13603
      /**
13604
       * Find the _Fields constant that matches name, or null if its not found.
13605
       */
13606
      public static _Fields findByName(String name) {
13607
        return byName.get(name);
13608
      }
13609
 
13610
      private final short _thriftId;
13611
      private final String _fieldName;
13612
 
13613
      _Fields(short thriftId, String fieldName) {
13614
        _thriftId = thriftId;
13615
        _fieldName = fieldName;
13616
      }
13617
 
13618
      public short getThriftFieldId() {
13619
        return _thriftId;
13620
      }
13621
 
13622
      public String getFieldName() {
13623
        return _fieldName;
13624
      }
13625
    }
13626
 
13627
    // isset id assignments
13628
 
13629
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13630
    static {
13631
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13632
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13633
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
13634
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13635
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13636
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13637
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_result.class, metaDataMap);
13638
    }
13639
 
13640
    public doHdfcPaymentForDigitalOrder_result() {
13641
    }
13642
 
13643
    public doHdfcPaymentForDigitalOrder_result(
13644
      String success,
13645
      PaymentException pe)
13646
    {
13647
      this();
13648
      this.success = success;
13649
      this.pe = pe;
13650
    }
13651
 
13652
    /**
13653
     * Performs a deep copy on <i>other</i>.
13654
     */
13655
    public doHdfcPaymentForDigitalOrder_result(doHdfcPaymentForDigitalOrder_result other) {
13656
      if (other.isSetSuccess()) {
13657
        this.success = other.success;
13658
      }
13659
      if (other.isSetPe()) {
13660
        this.pe = new PaymentException(other.pe);
13661
      }
13662
    }
13663
 
13664
    public doHdfcPaymentForDigitalOrder_result deepCopy() {
13665
      return new doHdfcPaymentForDigitalOrder_result(this);
13666
    }
13667
 
13668
    @Override
13669
    public void clear() {
13670
      this.success = null;
13671
      this.pe = null;
13672
    }
13673
 
13674
    public String getSuccess() {
13675
      return this.success;
13676
    }
13677
 
13678
    public void setSuccess(String success) {
13679
      this.success = success;
13680
    }
13681
 
13682
    public void unsetSuccess() {
13683
      this.success = null;
13684
    }
13685
 
13686
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13687
    public boolean isSetSuccess() {
13688
      return this.success != null;
13689
    }
13690
 
13691
    public void setSuccessIsSet(boolean value) {
13692
      if (!value) {
13693
        this.success = null;
13694
      }
13695
    }
13696
 
13697
    public PaymentException getPe() {
13698
      return this.pe;
13699
    }
13700
 
13701
    public void setPe(PaymentException pe) {
13702
      this.pe = pe;
13703
    }
13704
 
13705
    public void unsetPe() {
13706
      this.pe = null;
13707
    }
13708
 
13709
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
13710
    public boolean isSetPe() {
13711
      return this.pe != null;
13712
    }
13713
 
13714
    public void setPeIsSet(boolean value) {
13715
      if (!value) {
13716
        this.pe = null;
13717
      }
13718
    }
13719
 
13720
    public void setFieldValue(_Fields field, Object value) {
13721
      switch (field) {
13722
      case SUCCESS:
13723
        if (value == null) {
13724
          unsetSuccess();
13725
        } else {
13726
          setSuccess((String)value);
13727
        }
13728
        break;
13729
 
13730
      case PE:
13731
        if (value == null) {
13732
          unsetPe();
13733
        } else {
13734
          setPe((PaymentException)value);
13735
        }
13736
        break;
13737
 
13738
      }
13739
    }
13740
 
13741
    public Object getFieldValue(_Fields field) {
13742
      switch (field) {
13743
      case SUCCESS:
13744
        return getSuccess();
13745
 
13746
      case PE:
13747
        return getPe();
13748
 
13749
      }
13750
      throw new IllegalStateException();
13751
    }
13752
 
13753
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13754
    public boolean isSet(_Fields field) {
13755
      if (field == null) {
13756
        throw new IllegalArgumentException();
13757
      }
13758
 
13759
      switch (field) {
13760
      case SUCCESS:
13761
        return isSetSuccess();
13762
      case PE:
13763
        return isSetPe();
13764
      }
13765
      throw new IllegalStateException();
13766
    }
13767
 
13768
    @Override
13769
    public boolean equals(Object that) {
13770
      if (that == null)
13771
        return false;
13772
      if (that instanceof doHdfcPaymentForDigitalOrder_result)
13773
        return this.equals((doHdfcPaymentForDigitalOrder_result)that);
13774
      return false;
13775
    }
13776
 
13777
    public boolean equals(doHdfcPaymentForDigitalOrder_result that) {
13778
      if (that == null)
13779
        return false;
13780
 
13781
      boolean this_present_success = true && this.isSetSuccess();
13782
      boolean that_present_success = true && that.isSetSuccess();
13783
      if (this_present_success || that_present_success) {
13784
        if (!(this_present_success && that_present_success))
13785
          return false;
13786
        if (!this.success.equals(that.success))
13787
          return false;
13788
      }
13789
 
13790
      boolean this_present_pe = true && this.isSetPe();
13791
      boolean that_present_pe = true && that.isSetPe();
13792
      if (this_present_pe || that_present_pe) {
13793
        if (!(this_present_pe && that_present_pe))
13794
          return false;
13795
        if (!this.pe.equals(that.pe))
13796
          return false;
13797
      }
13798
 
13799
      return true;
13800
    }
13801
 
13802
    @Override
13803
    public int hashCode() {
13804
      return 0;
13805
    }
13806
 
13807
    public int compareTo(doHdfcPaymentForDigitalOrder_result other) {
13808
      if (!getClass().equals(other.getClass())) {
13809
        return getClass().getName().compareTo(other.getClass().getName());
13810
      }
13811
 
13812
      int lastComparison = 0;
13813
      doHdfcPaymentForDigitalOrder_result typedOther = (doHdfcPaymentForDigitalOrder_result)other;
13814
 
13815
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13816
      if (lastComparison != 0) {
13817
        return lastComparison;
13818
      }
13819
      if (isSetSuccess()) {
13820
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13821
        if (lastComparison != 0) {
13822
          return lastComparison;
13823
        }
13824
      }
13825
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
13826
      if (lastComparison != 0) {
13827
        return lastComparison;
13828
      }
13829
      if (isSetPe()) {
13830
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
13831
        if (lastComparison != 0) {
13832
          return lastComparison;
13833
        }
13834
      }
13835
      return 0;
13836
    }
13837
 
13838
    public _Fields fieldForId(int fieldId) {
13839
      return _Fields.findByThriftId(fieldId);
13840
    }
13841
 
13842
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13843
      org.apache.thrift.protocol.TField field;
13844
      iprot.readStructBegin();
13845
      while (true)
13846
      {
13847
        field = iprot.readFieldBegin();
13848
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13849
          break;
13850
        }
13851
        switch (field.id) {
13852
          case 0: // SUCCESS
13853
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13854
              this.success = iprot.readString();
13855
            } else { 
13856
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13857
            }
13858
            break;
13859
          case 1: // PE
13860
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13861
              this.pe = new PaymentException();
13862
              this.pe.read(iprot);
13863
            } else { 
13864
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13865
            }
13866
            break;
13867
          default:
13868
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13869
        }
13870
        iprot.readFieldEnd();
13871
      }
13872
      iprot.readStructEnd();
13873
      validate();
13874
    }
13875
 
13876
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13877
      oprot.writeStructBegin(STRUCT_DESC);
13878
 
13879
      if (this.isSetSuccess()) {
13880
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13881
        oprot.writeString(this.success);
13882
        oprot.writeFieldEnd();
13883
      } else if (this.isSetPe()) {
13884
        oprot.writeFieldBegin(PE_FIELD_DESC);
13885
        this.pe.write(oprot);
13886
        oprot.writeFieldEnd();
13887
      }
13888
      oprot.writeFieldStop();
13889
      oprot.writeStructEnd();
13890
    }
13891
 
13892
    @Override
13893
    public String toString() {
13894
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_result(");
13895
      boolean first = true;
13896
 
13897
      sb.append("success:");
13898
      if (this.success == null) {
13899
        sb.append("null");
13900
      } else {
13901
        sb.append(this.success);
13902
      }
13903
      first = false;
13904
      if (!first) sb.append(", ");
13905
      sb.append("pe:");
13906
      if (this.pe == null) {
13907
        sb.append("null");
13908
      } else {
13909
        sb.append(this.pe);
13910
      }
13911
      first = false;
13912
      sb.append(")");
13913
      return sb.toString();
13914
    }
13915
 
13916
    public void validate() throws org.apache.thrift.TException {
13917
      // check for required fields
13918
    }
13919
 
13920
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13921
      try {
13922
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13923
      } catch (org.apache.thrift.TException te) {
13924
        throw new java.io.IOException(te);
13925
      }
13926
    }
13927
 
13928
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13929
      try {
13930
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13931
      } catch (org.apache.thrift.TException te) {
13932
        throw new java.io.IOException(te);
13933
      }
13934
    }
13935
 
13936
  }
13937
 
3616 chandransh 13938
  public static class initializeHdfcEmiPayment_args implements org.apache.thrift.TBase<initializeHdfcEmiPayment_args, initializeHdfcEmiPayment_args._Fields>, java.io.Serializable, Cloneable   {
13939
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_args");
13940
 
13941
    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);
13942
 
13943
    private long merchantPaymentId; // required
13944
 
13945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13946
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13947
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
13948
 
13949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13950
 
13951
      static {
13952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13953
          byName.put(field.getFieldName(), field);
13954
        }
13955
      }
13956
 
13957
      /**
13958
       * Find the _Fields constant that matches fieldId, or null if its not found.
13959
       */
13960
      public static _Fields findByThriftId(int fieldId) {
13961
        switch(fieldId) {
13962
          case 1: // MERCHANT_PAYMENT_ID
13963
            return MERCHANT_PAYMENT_ID;
13964
          default:
13965
            return null;
13966
        }
13967
      }
13968
 
13969
      /**
13970
       * Find the _Fields constant that matches fieldId, throwing an exception
13971
       * if it is not found.
13972
       */
13973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13974
        _Fields fields = findByThriftId(fieldId);
13975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13976
        return fields;
13977
      }
13978
 
13979
      /**
13980
       * Find the _Fields constant that matches name, or null if its not found.
13981
       */
13982
      public static _Fields findByName(String name) {
13983
        return byName.get(name);
13984
      }
13985
 
13986
      private final short _thriftId;
13987
      private final String _fieldName;
13988
 
13989
      _Fields(short thriftId, String fieldName) {
13990
        _thriftId = thriftId;
13991
        _fieldName = fieldName;
13992
      }
13993
 
13994
      public short getThriftFieldId() {
13995
        return _thriftId;
13996
      }
13997
 
13998
      public String getFieldName() {
13999
        return _fieldName;
14000
      }
14001
    }
14002
 
14003
    // isset id assignments
14004
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
14005
    private BitSet __isset_bit_vector = new BitSet(1);
14006
 
14007
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14008
    static {
14009
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14010
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14011
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14012
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14013
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_args.class, metaDataMap);
14014
    }
14015
 
14016
    public initializeHdfcEmiPayment_args() {
14017
    }
14018
 
14019
    public initializeHdfcEmiPayment_args(
14020
      long merchantPaymentId)
14021
    {
14022
      this();
14023
      this.merchantPaymentId = merchantPaymentId;
14024
      setMerchantPaymentIdIsSet(true);
14025
    }
14026
 
14027
    /**
14028
     * Performs a deep copy on <i>other</i>.
14029
     */
14030
    public initializeHdfcEmiPayment_args(initializeHdfcEmiPayment_args other) {
14031
      __isset_bit_vector.clear();
14032
      __isset_bit_vector.or(other.__isset_bit_vector);
14033
      this.merchantPaymentId = other.merchantPaymentId;
14034
    }
14035
 
14036
    public initializeHdfcEmiPayment_args deepCopy() {
14037
      return new initializeHdfcEmiPayment_args(this);
14038
    }
14039
 
14040
    @Override
14041
    public void clear() {
14042
      setMerchantPaymentIdIsSet(false);
14043
      this.merchantPaymentId = 0;
14044
    }
14045
 
14046
    public long getMerchantPaymentId() {
14047
      return this.merchantPaymentId;
14048
    }
14049
 
14050
    public void setMerchantPaymentId(long merchantPaymentId) {
14051
      this.merchantPaymentId = merchantPaymentId;
14052
      setMerchantPaymentIdIsSet(true);
14053
    }
14054
 
14055
    public void unsetMerchantPaymentId() {
14056
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
14057
    }
14058
 
14059
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
14060
    public boolean isSetMerchantPaymentId() {
14061
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
14062
    }
14063
 
14064
    public void setMerchantPaymentIdIsSet(boolean value) {
14065
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
14066
    }
14067
 
14068
    public void setFieldValue(_Fields field, Object value) {
14069
      switch (field) {
14070
      case MERCHANT_PAYMENT_ID:
14071
        if (value == null) {
14072
          unsetMerchantPaymentId();
14073
        } else {
14074
          setMerchantPaymentId((Long)value);
14075
        }
14076
        break;
14077
 
14078
      }
14079
    }
14080
 
14081
    public Object getFieldValue(_Fields field) {
14082
      switch (field) {
14083
      case MERCHANT_PAYMENT_ID:
14084
        return Long.valueOf(getMerchantPaymentId());
14085
 
14086
      }
14087
      throw new IllegalStateException();
14088
    }
14089
 
14090
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14091
    public boolean isSet(_Fields field) {
14092
      if (field == null) {
14093
        throw new IllegalArgumentException();
14094
      }
14095
 
14096
      switch (field) {
14097
      case MERCHANT_PAYMENT_ID:
14098
        return isSetMerchantPaymentId();
14099
      }
14100
      throw new IllegalStateException();
14101
    }
14102
 
14103
    @Override
14104
    public boolean equals(Object that) {
14105
      if (that == null)
14106
        return false;
14107
      if (that instanceof initializeHdfcEmiPayment_args)
14108
        return this.equals((initializeHdfcEmiPayment_args)that);
14109
      return false;
14110
    }
14111
 
14112
    public boolean equals(initializeHdfcEmiPayment_args that) {
14113
      if (that == null)
14114
        return false;
14115
 
14116
      boolean this_present_merchantPaymentId = true;
14117
      boolean that_present_merchantPaymentId = true;
14118
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
14119
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
14120
          return false;
14121
        if (this.merchantPaymentId != that.merchantPaymentId)
14122
          return false;
14123
      }
14124
 
14125
      return true;
14126
    }
14127
 
14128
    @Override
14129
    public int hashCode() {
14130
      return 0;
14131
    }
14132
 
14133
    public int compareTo(initializeHdfcEmiPayment_args other) {
14134
      if (!getClass().equals(other.getClass())) {
14135
        return getClass().getName().compareTo(other.getClass().getName());
14136
      }
14137
 
14138
      int lastComparison = 0;
14139
      initializeHdfcEmiPayment_args typedOther = (initializeHdfcEmiPayment_args)other;
14140
 
14141
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
14142
      if (lastComparison != 0) {
14143
        return lastComparison;
14144
      }
14145
      if (isSetMerchantPaymentId()) {
14146
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
14147
        if (lastComparison != 0) {
14148
          return lastComparison;
14149
        }
14150
      }
14151
      return 0;
14152
    }
14153
 
14154
    public _Fields fieldForId(int fieldId) {
14155
      return _Fields.findByThriftId(fieldId);
14156
    }
14157
 
14158
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14159
      org.apache.thrift.protocol.TField field;
14160
      iprot.readStructBegin();
14161
      while (true)
14162
      {
14163
        field = iprot.readFieldBegin();
14164
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14165
          break;
14166
        }
14167
        switch (field.id) {
14168
          case 1: // MERCHANT_PAYMENT_ID
14169
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14170
              this.merchantPaymentId = iprot.readI64();
14171
              setMerchantPaymentIdIsSet(true);
14172
            } else { 
14173
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14174
            }
14175
            break;
14176
          default:
14177
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14178
        }
14179
        iprot.readFieldEnd();
14180
      }
14181
      iprot.readStructEnd();
14182
      validate();
14183
    }
14184
 
14185
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14186
      validate();
14187
 
14188
      oprot.writeStructBegin(STRUCT_DESC);
14189
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
14190
      oprot.writeI64(this.merchantPaymentId);
14191
      oprot.writeFieldEnd();
14192
      oprot.writeFieldStop();
14193
      oprot.writeStructEnd();
14194
    }
14195
 
14196
    @Override
14197
    public String toString() {
14198
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_args(");
14199
      boolean first = true;
14200
 
14201
      sb.append("merchantPaymentId:");
14202
      sb.append(this.merchantPaymentId);
14203
      first = false;
14204
      sb.append(")");
14205
      return sb.toString();
14206
    }
14207
 
14208
    public void validate() throws org.apache.thrift.TException {
14209
      // check for required fields
14210
    }
14211
 
14212
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14213
      try {
14214
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14215
      } catch (org.apache.thrift.TException te) {
14216
        throw new java.io.IOException(te);
14217
      }
14218
    }
14219
 
14220
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14221
      try {
14222
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14223
      } catch (org.apache.thrift.TException te) {
14224
        throw new java.io.IOException(te);
14225
      }
14226
    }
14227
 
14228
  }
14229
 
14230
  public static class initializeHdfcEmiPayment_result implements org.apache.thrift.TBase<initializeHdfcEmiPayment_result, initializeHdfcEmiPayment_result._Fields>, java.io.Serializable, Cloneable   {
14231
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_result");
14232
 
14233
    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);
14234
    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);
14235
 
14236
    private String success; // required
14237
    private PaymentException pe; // required
14238
 
14239
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14240
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14241
      SUCCESS((short)0, "success"),
14242
      PE((short)1, "pe");
14243
 
14244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14245
 
14246
      static {
14247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14248
          byName.put(field.getFieldName(), field);
14249
        }
14250
      }
14251
 
14252
      /**
14253
       * Find the _Fields constant that matches fieldId, or null if its not found.
14254
       */
14255
      public static _Fields findByThriftId(int fieldId) {
14256
        switch(fieldId) {
14257
          case 0: // SUCCESS
14258
            return SUCCESS;
14259
          case 1: // PE
14260
            return PE;
14261
          default:
14262
            return null;
14263
        }
14264
      }
14265
 
14266
      /**
14267
       * Find the _Fields constant that matches fieldId, throwing an exception
14268
       * if it is not found.
14269
       */
14270
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14271
        _Fields fields = findByThriftId(fieldId);
14272
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14273
        return fields;
14274
      }
14275
 
14276
      /**
14277
       * Find the _Fields constant that matches name, or null if its not found.
14278
       */
14279
      public static _Fields findByName(String name) {
14280
        return byName.get(name);
14281
      }
14282
 
14283
      private final short _thriftId;
14284
      private final String _fieldName;
14285
 
14286
      _Fields(short thriftId, String fieldName) {
14287
        _thriftId = thriftId;
14288
        _fieldName = fieldName;
14289
      }
14290
 
14291
      public short getThriftFieldId() {
14292
        return _thriftId;
14293
      }
14294
 
14295
      public String getFieldName() {
14296
        return _fieldName;
14297
      }
14298
    }
14299
 
14300
    // isset id assignments
14301
 
14302
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14303
    static {
14304
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14305
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14306
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14307
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14308
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14309
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14310
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_result.class, metaDataMap);
14311
    }
14312
 
14313
    public initializeHdfcEmiPayment_result() {
14314
    }
14315
 
14316
    public initializeHdfcEmiPayment_result(
14317
      String success,
14318
      PaymentException pe)
14319
    {
14320
      this();
14321
      this.success = success;
14322
      this.pe = pe;
14323
    }
14324
 
14325
    /**
14326
     * Performs a deep copy on <i>other</i>.
14327
     */
14328
    public initializeHdfcEmiPayment_result(initializeHdfcEmiPayment_result other) {
14329
      if (other.isSetSuccess()) {
14330
        this.success = other.success;
14331
      }
14332
      if (other.isSetPe()) {
14333
        this.pe = new PaymentException(other.pe);
14334
      }
14335
    }
14336
 
14337
    public initializeHdfcEmiPayment_result deepCopy() {
14338
      return new initializeHdfcEmiPayment_result(this);
14339
    }
14340
 
14341
    @Override
14342
    public void clear() {
14343
      this.success = null;
14344
      this.pe = null;
14345
    }
14346
 
14347
    public String getSuccess() {
14348
      return this.success;
14349
    }
14350
 
14351
    public void setSuccess(String success) {
14352
      this.success = success;
14353
    }
14354
 
14355
    public void unsetSuccess() {
14356
      this.success = null;
14357
    }
14358
 
14359
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14360
    public boolean isSetSuccess() {
14361
      return this.success != null;
14362
    }
14363
 
14364
    public void setSuccessIsSet(boolean value) {
14365
      if (!value) {
14366
        this.success = null;
14367
      }
14368
    }
14369
 
14370
    public PaymentException getPe() {
14371
      return this.pe;
14372
    }
14373
 
14374
    public void setPe(PaymentException pe) {
14375
      this.pe = pe;
14376
    }
14377
 
14378
    public void unsetPe() {
14379
      this.pe = null;
14380
    }
14381
 
14382
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
14383
    public boolean isSetPe() {
14384
      return this.pe != null;
14385
    }
14386
 
14387
    public void setPeIsSet(boolean value) {
14388
      if (!value) {
14389
        this.pe = null;
14390
      }
14391
    }
14392
 
14393
    public void setFieldValue(_Fields field, Object value) {
14394
      switch (field) {
14395
      case SUCCESS:
14396
        if (value == null) {
14397
          unsetSuccess();
14398
        } else {
14399
          setSuccess((String)value);
14400
        }
14401
        break;
14402
 
14403
      case PE:
14404
        if (value == null) {
14405
          unsetPe();
14406
        } else {
14407
          setPe((PaymentException)value);
14408
        }
14409
        break;
14410
 
14411
      }
14412
    }
14413
 
14414
    public Object getFieldValue(_Fields field) {
14415
      switch (field) {
14416
      case SUCCESS:
14417
        return getSuccess();
14418
 
14419
      case PE:
14420
        return getPe();
14421
 
14422
      }
14423
      throw new IllegalStateException();
14424
    }
14425
 
14426
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14427
    public boolean isSet(_Fields field) {
14428
      if (field == null) {
14429
        throw new IllegalArgumentException();
14430
      }
14431
 
14432
      switch (field) {
14433
      case SUCCESS:
14434
        return isSetSuccess();
14435
      case PE:
14436
        return isSetPe();
14437
      }
14438
      throw new IllegalStateException();
14439
    }
14440
 
14441
    @Override
14442
    public boolean equals(Object that) {
14443
      if (that == null)
14444
        return false;
14445
      if (that instanceof initializeHdfcEmiPayment_result)
14446
        return this.equals((initializeHdfcEmiPayment_result)that);
14447
      return false;
14448
    }
14449
 
14450
    public boolean equals(initializeHdfcEmiPayment_result that) {
14451
      if (that == null)
14452
        return false;
14453
 
14454
      boolean this_present_success = true && this.isSetSuccess();
14455
      boolean that_present_success = true && that.isSetSuccess();
14456
      if (this_present_success || that_present_success) {
14457
        if (!(this_present_success && that_present_success))
14458
          return false;
14459
        if (!this.success.equals(that.success))
14460
          return false;
14461
      }
14462
 
14463
      boolean this_present_pe = true && this.isSetPe();
14464
      boolean that_present_pe = true && that.isSetPe();
14465
      if (this_present_pe || that_present_pe) {
14466
        if (!(this_present_pe && that_present_pe))
14467
          return false;
14468
        if (!this.pe.equals(that.pe))
14469
          return false;
14470
      }
14471
 
14472
      return true;
14473
    }
14474
 
14475
    @Override
14476
    public int hashCode() {
14477
      return 0;
14478
    }
14479
 
14480
    public int compareTo(initializeHdfcEmiPayment_result other) {
14481
      if (!getClass().equals(other.getClass())) {
14482
        return getClass().getName().compareTo(other.getClass().getName());
14483
      }
14484
 
14485
      int lastComparison = 0;
14486
      initializeHdfcEmiPayment_result typedOther = (initializeHdfcEmiPayment_result)other;
14487
 
14488
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14489
      if (lastComparison != 0) {
14490
        return lastComparison;
14491
      }
14492
      if (isSetSuccess()) {
14493
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14494
        if (lastComparison != 0) {
14495
          return lastComparison;
14496
        }
14497
      }
14498
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
14499
      if (lastComparison != 0) {
14500
        return lastComparison;
14501
      }
14502
      if (isSetPe()) {
14503
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
14504
        if (lastComparison != 0) {
14505
          return lastComparison;
14506
        }
14507
      }
14508
      return 0;
14509
    }
14510
 
14511
    public _Fields fieldForId(int fieldId) {
14512
      return _Fields.findByThriftId(fieldId);
14513
    }
14514
 
14515
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14516
      org.apache.thrift.protocol.TField field;
14517
      iprot.readStructBegin();
14518
      while (true)
14519
      {
14520
        field = iprot.readFieldBegin();
14521
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14522
          break;
14523
        }
14524
        switch (field.id) {
14525
          case 0: // SUCCESS
14526
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14527
              this.success = iprot.readString();
14528
            } else { 
14529
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14530
            }
14531
            break;
14532
          case 1: // PE
14533
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14534
              this.pe = new PaymentException();
14535
              this.pe.read(iprot);
14536
            } else { 
14537
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14538
            }
14539
            break;
14540
          default:
14541
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14542
        }
14543
        iprot.readFieldEnd();
14544
      }
14545
      iprot.readStructEnd();
14546
      validate();
14547
    }
14548
 
14549
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14550
      oprot.writeStructBegin(STRUCT_DESC);
14551
 
14552
      if (this.isSetSuccess()) {
14553
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14554
        oprot.writeString(this.success);
14555
        oprot.writeFieldEnd();
14556
      } else if (this.isSetPe()) {
14557
        oprot.writeFieldBegin(PE_FIELD_DESC);
14558
        this.pe.write(oprot);
14559
        oprot.writeFieldEnd();
14560
      }
14561
      oprot.writeFieldStop();
14562
      oprot.writeStructEnd();
14563
    }
14564
 
14565
    @Override
14566
    public String toString() {
14567
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_result(");
14568
      boolean first = true;
14569
 
14570
      sb.append("success:");
14571
      if (this.success == null) {
14572
        sb.append("null");
14573
      } else {
14574
        sb.append(this.success);
14575
      }
14576
      first = false;
14577
      if (!first) sb.append(", ");
14578
      sb.append("pe:");
14579
      if (this.pe == null) {
14580
        sb.append("null");
14581
      } else {
14582
        sb.append(this.pe);
14583
      }
14584
      first = false;
14585
      sb.append(")");
14586
      return sb.toString();
14587
    }
14588
 
14589
    public void validate() throws org.apache.thrift.TException {
14590
      // check for required fields
14591
    }
14592
 
14593
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14594
      try {
14595
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14596
      } catch (org.apache.thrift.TException te) {
14597
        throw new java.io.IOException(te);
14598
      }
14599
    }
14600
 
14601
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14602
      try {
14603
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14604
      } catch (org.apache.thrift.TException te) {
14605
        throw new java.io.IOException(te);
14606
      }
14607
    }
14608
 
14609
  }
14610
 
3430 rajveer 14611
  public static class createRefund_args implements org.apache.thrift.TBase<createRefund_args, createRefund_args._Fields>, java.io.Serializable, Cloneable   {
14612
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_args");
2462 chandransh 14613
 
3430 rajveer 14614
    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);
14615
    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);
14616
    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 14617
 
3430 rajveer 14618
    private long orderId; // required
14619
    private long merchantTxnId; // required
14620
    private double amount; // required
2462 chandransh 14621
 
14622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 14623
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 14624
      ORDER_ID((short)1, "orderId"),
14625
      MERCHANT_TXN_ID((short)2, "merchantTxnId"),
14626
      AMOUNT((short)3, "amount");
2462 chandransh 14627
 
14628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14629
 
14630
      static {
14631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14632
          byName.put(field.getFieldName(), field);
14633
        }
14634
      }
14635
 
14636
      /**
14637
       * Find the _Fields constant that matches fieldId, or null if its not found.
14638
       */
14639
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 14640
        switch(fieldId) {
14641
          case 1: // ORDER_ID
14642
            return ORDER_ID;
14643
          case 2: // MERCHANT_TXN_ID
14644
            return MERCHANT_TXN_ID;
14645
          case 3: // AMOUNT
14646
            return AMOUNT;
14647
          default:
14648
            return null;
14649
        }
2462 chandransh 14650
      }
14651
 
14652
      /**
14653
       * Find the _Fields constant that matches fieldId, throwing an exception
14654
       * if it is not found.
14655
       */
14656
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14657
        _Fields fields = findByThriftId(fieldId);
14658
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14659
        return fields;
14660
      }
14661
 
14662
      /**
14663
       * Find the _Fields constant that matches name, or null if its not found.
14664
       */
14665
      public static _Fields findByName(String name) {
14666
        return byName.get(name);
14667
      }
14668
 
14669
      private final short _thriftId;
14670
      private final String _fieldName;
14671
 
14672
      _Fields(short thriftId, String fieldName) {
14673
        _thriftId = thriftId;
14674
        _fieldName = fieldName;
14675
      }
14676
 
14677
      public short getThriftFieldId() {
14678
        return _thriftId;
14679
      }
14680
 
14681
      public String getFieldName() {
14682
        return _fieldName;
14683
      }
14684
    }
14685
 
14686
    // isset id assignments
3010 chandransh 14687
    private static final int __ORDERID_ISSET_ID = 0;
14688
    private static final int __MERCHANTTXNID_ISSET_ID = 1;
14689
    private static final int __AMOUNT_ISSET_ID = 2;
14690
    private BitSet __isset_bit_vector = new BitSet(3);
2462 chandransh 14691
 
3430 rajveer 14692
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 14693
    static {
3430 rajveer 14694
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14695
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14696
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14697
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14698
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14699
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14700
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
14701
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14702
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_args.class, metaDataMap);
2462 chandransh 14703
    }
14704
 
3010 chandransh 14705
    public createRefund_args() {
2462 chandransh 14706
    }
14707
 
3010 chandransh 14708
    public createRefund_args(
14709
      long orderId,
14710
      long merchantTxnId,
14711
      double amount)
2462 chandransh 14712
    {
14713
      this();
3010 chandransh 14714
      this.orderId = orderId;
14715
      setOrderIdIsSet(true);
14716
      this.merchantTxnId = merchantTxnId;
14717
      setMerchantTxnIdIsSet(true);
14718
      this.amount = amount;
14719
      setAmountIsSet(true);
2462 chandransh 14720
    }
14721
 
14722
    /**
14723
     * Performs a deep copy on <i>other</i>.
14724
     */
3010 chandransh 14725
    public createRefund_args(createRefund_args other) {
2462 chandransh 14726
      __isset_bit_vector.clear();
14727
      __isset_bit_vector.or(other.__isset_bit_vector);
3010 chandransh 14728
      this.orderId = other.orderId;
14729
      this.merchantTxnId = other.merchantTxnId;
14730
      this.amount = other.amount;
2462 chandransh 14731
    }
14732
 
3010 chandransh 14733
    public createRefund_args deepCopy() {
14734
      return new createRefund_args(this);
2462 chandransh 14735
    }
14736
 
3430 rajveer 14737
    @Override
14738
    public void clear() {
14739
      setOrderIdIsSet(false);
14740
      this.orderId = 0;
14741
      setMerchantTxnIdIsSet(false);
14742
      this.merchantTxnId = 0;
14743
      setAmountIsSet(false);
14744
      this.amount = 0.0;
2462 chandransh 14745
    }
14746
 
3010 chandransh 14747
    public long getOrderId() {
14748
      return this.orderId;
2462 chandransh 14749
    }
14750
 
3430 rajveer 14751
    public void setOrderId(long orderId) {
3010 chandransh 14752
      this.orderId = orderId;
14753
      setOrderIdIsSet(true);
2462 chandransh 14754
    }
14755
 
3010 chandransh 14756
    public void unsetOrderId() {
14757
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2462 chandransh 14758
    }
14759
 
3430 rajveer 14760
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
3010 chandransh 14761
    public boolean isSetOrderId() {
14762
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2462 chandransh 14763
    }
14764
 
3010 chandransh 14765
    public void setOrderIdIsSet(boolean value) {
14766
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2462 chandransh 14767
    }
14768
 
3010 chandransh 14769
    public long getMerchantTxnId() {
14770
      return this.merchantTxnId;
14771
    }
14772
 
3430 rajveer 14773
    public void setMerchantTxnId(long merchantTxnId) {
3010 chandransh 14774
      this.merchantTxnId = merchantTxnId;
14775
      setMerchantTxnIdIsSet(true);
14776
    }
14777
 
14778
    public void unsetMerchantTxnId() {
14779
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
14780
    }
14781
 
3430 rajveer 14782
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
3010 chandransh 14783
    public boolean isSetMerchantTxnId() {
14784
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
14785
    }
14786
 
14787
    public void setMerchantTxnIdIsSet(boolean value) {
14788
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
14789
    }
14790
 
14791
    public double getAmount() {
14792
      return this.amount;
14793
    }
14794
 
3430 rajveer 14795
    public void setAmount(double amount) {
3010 chandransh 14796
      this.amount = amount;
14797
      setAmountIsSet(true);
14798
    }
14799
 
14800
    public void unsetAmount() {
14801
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
14802
    }
14803
 
3430 rajveer 14804
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
3010 chandransh 14805
    public boolean isSetAmount() {
14806
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
14807
    }
14808
 
14809
    public void setAmountIsSet(boolean value) {
14810
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
14811
    }
14812
 
2462 chandransh 14813
    public void setFieldValue(_Fields field, Object value) {
14814
      switch (field) {
3010 chandransh 14815
      case ORDER_ID:
2462 chandransh 14816
        if (value == null) {
3010 chandransh 14817
          unsetOrderId();
2462 chandransh 14818
        } else {
3010 chandransh 14819
          setOrderId((Long)value);
2462 chandransh 14820
        }
14821
        break;
14822
 
3010 chandransh 14823
      case MERCHANT_TXN_ID:
14824
        if (value == null) {
14825
          unsetMerchantTxnId();
14826
        } else {
14827
          setMerchantTxnId((Long)value);
14828
        }
14829
        break;
14830
 
14831
      case AMOUNT:
14832
        if (value == null) {
14833
          unsetAmount();
14834
        } else {
14835
          setAmount((Double)value);
14836
        }
14837
        break;
14838
 
2462 chandransh 14839
      }
14840
    }
14841
 
14842
    public Object getFieldValue(_Fields field) {
14843
      switch (field) {
3010 chandransh 14844
      case ORDER_ID:
3430 rajveer 14845
        return Long.valueOf(getOrderId());
2462 chandransh 14846
 
3010 chandransh 14847
      case MERCHANT_TXN_ID:
3430 rajveer 14848
        return Long.valueOf(getMerchantTxnId());
3010 chandransh 14849
 
14850
      case AMOUNT:
3430 rajveer 14851
        return Double.valueOf(getAmount());
3010 chandransh 14852
 
2462 chandransh 14853
      }
14854
      throw new IllegalStateException();
14855
    }
14856
 
3430 rajveer 14857
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14858
    public boolean isSet(_Fields field) {
14859
      if (field == null) {
14860
        throw new IllegalArgumentException();
14861
      }
2462 chandransh 14862
 
14863
      switch (field) {
3010 chandransh 14864
      case ORDER_ID:
14865
        return isSetOrderId();
14866
      case MERCHANT_TXN_ID:
14867
        return isSetMerchantTxnId();
14868
      case AMOUNT:
14869
        return isSetAmount();
2462 chandransh 14870
      }
14871
      throw new IllegalStateException();
14872
    }
14873
 
14874
    @Override
14875
    public boolean equals(Object that) {
14876
      if (that == null)
14877
        return false;
3010 chandransh 14878
      if (that instanceof createRefund_args)
14879
        return this.equals((createRefund_args)that);
2462 chandransh 14880
      return false;
14881
    }
14882
 
3010 chandransh 14883
    public boolean equals(createRefund_args that) {
2462 chandransh 14884
      if (that == null)
14885
        return false;
14886
 
3010 chandransh 14887
      boolean this_present_orderId = true;
14888
      boolean that_present_orderId = true;
14889
      if (this_present_orderId || that_present_orderId) {
14890
        if (!(this_present_orderId && that_present_orderId))
2462 chandransh 14891
          return false;
3010 chandransh 14892
        if (this.orderId != that.orderId)
2462 chandransh 14893
          return false;
14894
      }
14895
 
3010 chandransh 14896
      boolean this_present_merchantTxnId = true;
14897
      boolean that_present_merchantTxnId = true;
14898
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
14899
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
14900
          return false;
14901
        if (this.merchantTxnId != that.merchantTxnId)
14902
          return false;
14903
      }
14904
 
14905
      boolean this_present_amount = true;
14906
      boolean that_present_amount = true;
14907
      if (this_present_amount || that_present_amount) {
14908
        if (!(this_present_amount && that_present_amount))
14909
          return false;
14910
        if (this.amount != that.amount)
14911
          return false;
14912
      }
14913
 
2462 chandransh 14914
      return true;
14915
    }
14916
 
14917
    @Override
14918
    public int hashCode() {
14919
      return 0;
14920
    }
14921
 
3010 chandransh 14922
    public int compareTo(createRefund_args other) {
2462 chandransh 14923
      if (!getClass().equals(other.getClass())) {
14924
        return getClass().getName().compareTo(other.getClass().getName());
14925
      }
14926
 
14927
      int lastComparison = 0;
3010 chandransh 14928
      createRefund_args typedOther = (createRefund_args)other;
2462 chandransh 14929
 
3430 rajveer 14930
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2462 chandransh 14931
      if (lastComparison != 0) {
14932
        return lastComparison;
14933
      }
3430 rajveer 14934
      if (isSetOrderId()) {
14935
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
14936
        if (lastComparison != 0) {
14937
          return lastComparison;
14938
        }
2462 chandransh 14939
      }
3430 rajveer 14940
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
3010 chandransh 14941
      if (lastComparison != 0) {
14942
        return lastComparison;
14943
      }
3430 rajveer 14944
      if (isSetMerchantTxnId()) {
14945
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
14946
        if (lastComparison != 0) {
14947
          return lastComparison;
14948
        }
3010 chandransh 14949
      }
3430 rajveer 14950
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
3010 chandransh 14951
      if (lastComparison != 0) {
14952
        return lastComparison;
14953
      }
3430 rajveer 14954
      if (isSetAmount()) {
14955
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
14956
        if (lastComparison != 0) {
14957
          return lastComparison;
14958
        }
3010 chandransh 14959
      }
2462 chandransh 14960
      return 0;
14961
    }
14962
 
3430 rajveer 14963
    public _Fields fieldForId(int fieldId) {
14964
      return _Fields.findByThriftId(fieldId);
14965
    }
14966
 
14967
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14968
      org.apache.thrift.protocol.TField field;
2462 chandransh 14969
      iprot.readStructBegin();
14970
      while (true)
14971
      {
14972
        field = iprot.readFieldBegin();
3430 rajveer 14973
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 14974
          break;
14975
        }
3430 rajveer 14976
        switch (field.id) {
14977
          case 1: // ORDER_ID
14978
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14979
              this.orderId = iprot.readI64();
14980
              setOrderIdIsSet(true);
14981
            } else { 
14982
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14983
            }
14984
            break;
14985
          case 2: // MERCHANT_TXN_ID
14986
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14987
              this.merchantTxnId = iprot.readI64();
14988
              setMerchantTxnIdIsSet(true);
14989
            } else { 
14990
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14991
            }
14992
            break;
14993
          case 3: // AMOUNT
14994
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
14995
              this.amount = iprot.readDouble();
14996
              setAmountIsSet(true);
14997
            } else { 
14998
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14999
            }
15000
            break;
15001
          default:
15002
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 15003
        }
3430 rajveer 15004
        iprot.readFieldEnd();
2462 chandransh 15005
      }
15006
      iprot.readStructEnd();
15007
      validate();
15008
    }
15009
 
3430 rajveer 15010
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 15011
      validate();
15012
 
15013
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 15014
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15015
      oprot.writeI64(this.orderId);
2462 chandransh 15016
      oprot.writeFieldEnd();
3010 chandransh 15017
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15018
      oprot.writeI64(this.merchantTxnId);
15019
      oprot.writeFieldEnd();
15020
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
15021
      oprot.writeDouble(this.amount);
15022
      oprot.writeFieldEnd();
2462 chandransh 15023
      oprot.writeFieldStop();
15024
      oprot.writeStructEnd();
15025
    }
15026
 
15027
    @Override
15028
    public String toString() {
3010 chandransh 15029
      StringBuilder sb = new StringBuilder("createRefund_args(");
2462 chandransh 15030
      boolean first = true;
15031
 
3010 chandransh 15032
      sb.append("orderId:");
15033
      sb.append(this.orderId);
2462 chandransh 15034
      first = false;
3010 chandransh 15035
      if (!first) sb.append(", ");
15036
      sb.append("merchantTxnId:");
15037
      sb.append(this.merchantTxnId);
15038
      first = false;
15039
      if (!first) sb.append(", ");
15040
      sb.append("amount:");
15041
      sb.append(this.amount);
15042
      first = false;
2462 chandransh 15043
      sb.append(")");
15044
      return sb.toString();
15045
    }
15046
 
3430 rajveer 15047
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 15048
      // check for required fields
15049
    }
15050
 
3430 rajveer 15051
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15052
      try {
15053
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15054
      } catch (org.apache.thrift.TException te) {
15055
        throw new java.io.IOException(te);
15056
      }
15057
    }
15058
 
15059
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15060
      try {
15061
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15062
      } catch (org.apache.thrift.TException te) {
15063
        throw new java.io.IOException(te);
15064
      }
15065
    }
15066
 
2462 chandransh 15067
  }
15068
 
3430 rajveer 15069
  public static class createRefund_result implements org.apache.thrift.TBase<createRefund_result, createRefund_result._Fields>, java.io.Serializable, Cloneable   {
15070
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_result");
2462 chandransh 15071
 
3430 rajveer 15072
    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);
15073
    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 15074
 
3430 rajveer 15075
    private long success; // required
15076
    private PaymentException pe; // required
2462 chandransh 15077
 
15078
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15079
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 15080
      SUCCESS((short)0, "success"),
15081
      PE((short)1, "pe");
15082
 
15083
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15084
 
15085
      static {
15086
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15087
          byName.put(field.getFieldName(), field);
15088
        }
15089
      }
15090
 
15091
      /**
15092
       * Find the _Fields constant that matches fieldId, or null if its not found.
15093
       */
15094
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15095
        switch(fieldId) {
15096
          case 0: // SUCCESS
15097
            return SUCCESS;
15098
          case 1: // PE
15099
            return PE;
15100
          default:
15101
            return null;
15102
        }
2462 chandransh 15103
      }
15104
 
15105
      /**
15106
       * Find the _Fields constant that matches fieldId, throwing an exception
15107
       * if it is not found.
15108
       */
15109
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15110
        _Fields fields = findByThriftId(fieldId);
15111
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15112
        return fields;
15113
      }
15114
 
15115
      /**
15116
       * Find the _Fields constant that matches name, or null if its not found.
15117
       */
15118
      public static _Fields findByName(String name) {
15119
        return byName.get(name);
15120
      }
15121
 
15122
      private final short _thriftId;
15123
      private final String _fieldName;
15124
 
15125
      _Fields(short thriftId, String fieldName) {
15126
        _thriftId = thriftId;
15127
        _fieldName = fieldName;
15128
      }
15129
 
15130
      public short getThriftFieldId() {
15131
        return _thriftId;
15132
      }
15133
 
15134
      public String getFieldName() {
15135
        return _fieldName;
15136
      }
15137
    }
15138
 
15139
    // isset id assignments
3010 chandransh 15140
    private static final int __SUCCESS_ISSET_ID = 0;
15141
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 15142
 
3430 rajveer 15143
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 15144
    static {
3430 rajveer 15145
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15146
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15147
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15148
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15149
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15150
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15151
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_result.class, metaDataMap);
2462 chandransh 15152
    }
15153
 
3010 chandransh 15154
    public createRefund_result() {
2462 chandransh 15155
    }
15156
 
3010 chandransh 15157
    public createRefund_result(
15158
      long success,
2462 chandransh 15159
      PaymentException pe)
15160
    {
15161
      this();
15162
      this.success = success;
3010 chandransh 15163
      setSuccessIsSet(true);
2462 chandransh 15164
      this.pe = pe;
15165
    }
15166
 
15167
    /**
15168
     * Performs a deep copy on <i>other</i>.
15169
     */
3010 chandransh 15170
    public createRefund_result(createRefund_result other) {
15171
      __isset_bit_vector.clear();
15172
      __isset_bit_vector.or(other.__isset_bit_vector);
15173
      this.success = other.success;
2462 chandransh 15174
      if (other.isSetPe()) {
15175
        this.pe = new PaymentException(other.pe);
15176
      }
15177
    }
15178
 
3010 chandransh 15179
    public createRefund_result deepCopy() {
15180
      return new createRefund_result(this);
2462 chandransh 15181
    }
15182
 
3430 rajveer 15183
    @Override
15184
    public void clear() {
15185
      setSuccessIsSet(false);
15186
      this.success = 0;
15187
      this.pe = null;
2462 chandransh 15188
    }
15189
 
3010 chandransh 15190
    public long getSuccess() {
2462 chandransh 15191
      return this.success;
15192
    }
15193
 
3430 rajveer 15194
    public void setSuccess(long success) {
2462 chandransh 15195
      this.success = success;
3010 chandransh 15196
      setSuccessIsSet(true);
2462 chandransh 15197
    }
15198
 
15199
    public void unsetSuccess() {
3010 chandransh 15200
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2462 chandransh 15201
    }
15202
 
3430 rajveer 15203
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 15204
    public boolean isSetSuccess() {
3010 chandransh 15205
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2462 chandransh 15206
    }
15207
 
15208
    public void setSuccessIsSet(boolean value) {
3010 chandransh 15209
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2462 chandransh 15210
    }
15211
 
15212
    public PaymentException getPe() {
15213
      return this.pe;
15214
    }
15215
 
3430 rajveer 15216
    public void setPe(PaymentException pe) {
2462 chandransh 15217
      this.pe = pe;
15218
    }
15219
 
15220
    public void unsetPe() {
15221
      this.pe = null;
15222
    }
15223
 
3430 rajveer 15224
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 15225
    public boolean isSetPe() {
15226
      return this.pe != null;
15227
    }
15228
 
15229
    public void setPeIsSet(boolean value) {
15230
      if (!value) {
15231
        this.pe = null;
15232
      }
15233
    }
15234
 
15235
    public void setFieldValue(_Fields field, Object value) {
15236
      switch (field) {
15237
      case SUCCESS:
15238
        if (value == null) {
15239
          unsetSuccess();
15240
        } else {
3010 chandransh 15241
          setSuccess((Long)value);
2462 chandransh 15242
        }
15243
        break;
15244
 
15245
      case PE:
15246
        if (value == null) {
15247
          unsetPe();
15248
        } else {
15249
          setPe((PaymentException)value);
15250
        }
15251
        break;
15252
 
15253
      }
15254
    }
15255
 
15256
    public Object getFieldValue(_Fields field) {
15257
      switch (field) {
15258
      case SUCCESS:
3430 rajveer 15259
        return Long.valueOf(getSuccess());
2462 chandransh 15260
 
15261
      case PE:
15262
        return getPe();
15263
 
15264
      }
15265
      throw new IllegalStateException();
15266
    }
15267
 
3430 rajveer 15268
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15269
    public boolean isSet(_Fields field) {
15270
      if (field == null) {
15271
        throw new IllegalArgumentException();
15272
      }
2462 chandransh 15273
 
15274
      switch (field) {
15275
      case SUCCESS:
15276
        return isSetSuccess();
15277
      case PE:
15278
        return isSetPe();
15279
      }
15280
      throw new IllegalStateException();
15281
    }
15282
 
15283
    @Override
15284
    public boolean equals(Object that) {
15285
      if (that == null)
15286
        return false;
3010 chandransh 15287
      if (that instanceof createRefund_result)
15288
        return this.equals((createRefund_result)that);
2462 chandransh 15289
      return false;
15290
    }
15291
 
3010 chandransh 15292
    public boolean equals(createRefund_result that) {
2462 chandransh 15293
      if (that == null)
15294
        return false;
15295
 
3010 chandransh 15296
      boolean this_present_success = true;
15297
      boolean that_present_success = true;
2462 chandransh 15298
      if (this_present_success || that_present_success) {
15299
        if (!(this_present_success && that_present_success))
15300
          return false;
3010 chandransh 15301
        if (this.success != that.success)
2462 chandransh 15302
          return false;
15303
      }
15304
 
15305
      boolean this_present_pe = true && this.isSetPe();
15306
      boolean that_present_pe = true && that.isSetPe();
15307
      if (this_present_pe || that_present_pe) {
15308
        if (!(this_present_pe && that_present_pe))
15309
          return false;
15310
        if (!this.pe.equals(that.pe))
15311
          return false;
15312
      }
15313
 
15314
      return true;
15315
    }
15316
 
15317
    @Override
15318
    public int hashCode() {
15319
      return 0;
15320
    }
15321
 
3010 chandransh 15322
    public int compareTo(createRefund_result other) {
2462 chandransh 15323
      if (!getClass().equals(other.getClass())) {
15324
        return getClass().getName().compareTo(other.getClass().getName());
15325
      }
15326
 
15327
      int lastComparison = 0;
3010 chandransh 15328
      createRefund_result typedOther = (createRefund_result)other;
2462 chandransh 15329
 
3430 rajveer 15330
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2462 chandransh 15331
      if (lastComparison != 0) {
15332
        return lastComparison;
15333
      }
3430 rajveer 15334
      if (isSetSuccess()) {
15335
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15336
        if (lastComparison != 0) {
15337
          return lastComparison;
15338
        }
2462 chandransh 15339
      }
3430 rajveer 15340
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2462 chandransh 15341
      if (lastComparison != 0) {
15342
        return lastComparison;
15343
      }
3430 rajveer 15344
      if (isSetPe()) {
15345
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
15346
        if (lastComparison != 0) {
15347
          return lastComparison;
15348
        }
2462 chandransh 15349
      }
15350
      return 0;
15351
    }
15352
 
3430 rajveer 15353
    public _Fields fieldForId(int fieldId) {
15354
      return _Fields.findByThriftId(fieldId);
15355
    }
15356
 
15357
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15358
      org.apache.thrift.protocol.TField field;
2462 chandransh 15359
      iprot.readStructBegin();
15360
      while (true)
15361
      {
15362
        field = iprot.readFieldBegin();
3430 rajveer 15363
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 15364
          break;
15365
        }
3430 rajveer 15366
        switch (field.id) {
15367
          case 0: // SUCCESS
15368
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15369
              this.success = iprot.readI64();
15370
              setSuccessIsSet(true);
15371
            } else { 
15372
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15373
            }
15374
            break;
15375
          case 1: // PE
15376
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15377
              this.pe = new PaymentException();
15378
              this.pe.read(iprot);
15379
            } else { 
15380
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15381
            }
15382
            break;
15383
          default:
15384
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 15385
        }
3430 rajveer 15386
        iprot.readFieldEnd();
2462 chandransh 15387
      }
15388
      iprot.readStructEnd();
15389
      validate();
15390
    }
15391
 
3430 rajveer 15392
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 15393
      oprot.writeStructBegin(STRUCT_DESC);
15394
 
15395
      if (this.isSetSuccess()) {
15396
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 15397
        oprot.writeI64(this.success);
2462 chandransh 15398
        oprot.writeFieldEnd();
15399
      } else if (this.isSetPe()) {
15400
        oprot.writeFieldBegin(PE_FIELD_DESC);
15401
        this.pe.write(oprot);
15402
        oprot.writeFieldEnd();
15403
      }
15404
      oprot.writeFieldStop();
15405
      oprot.writeStructEnd();
15406
    }
15407
 
15408
    @Override
15409
    public String toString() {
3010 chandransh 15410
      StringBuilder sb = new StringBuilder("createRefund_result(");
2462 chandransh 15411
      boolean first = true;
15412
 
15413
      sb.append("success:");
3010 chandransh 15414
      sb.append(this.success);
2462 chandransh 15415
      first = false;
15416
      if (!first) sb.append(", ");
15417
      sb.append("pe:");
15418
      if (this.pe == null) {
15419
        sb.append("null");
15420
      } else {
15421
        sb.append(this.pe);
15422
      }
15423
      first = false;
15424
      sb.append(")");
15425
      return sb.toString();
15426
    }
15427
 
3430 rajveer 15428
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 15429
      // check for required fields
15430
    }
15431
 
3430 rajveer 15432
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15433
      try {
15434
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15435
      } catch (org.apache.thrift.TException te) {
15436
        throw new java.io.IOException(te);
15437
      }
15438
    }
15439
 
15440
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15441
      try {
15442
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15443
      } catch (org.apache.thrift.TException te) {
15444
        throw new java.io.IOException(te);
15445
      }
15446
    }
15447
 
2462 chandransh 15448
  }
15449
 
3430 rajveer 15450
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
15451
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
2690 chandransh 15452
 
3430 rajveer 15453
    private static final org.apache.thrift.protocol.TField MERCHANT_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantTxnId", org.apache.thrift.protocol.TType.I64, (short)1);
8618 rajveer 15454
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)2);
2690 chandransh 15455
 
3430 rajveer 15456
    private long merchantTxnId; // required
8618 rajveer 15457
    private boolean isDigital; // required
2690 chandransh 15458
 
15459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15460
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8618 rajveer 15461
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
15462
      IS_DIGITAL((short)2, "isDigital");
2690 chandransh 15463
 
15464
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15465
 
15466
      static {
15467
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15468
          byName.put(field.getFieldName(), field);
15469
        }
15470
      }
15471
 
15472
      /**
15473
       * Find the _Fields constant that matches fieldId, or null if its not found.
15474
       */
15475
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15476
        switch(fieldId) {
15477
          case 1: // MERCHANT_TXN_ID
15478
            return MERCHANT_TXN_ID;
8618 rajveer 15479
          case 2: // IS_DIGITAL
15480
            return IS_DIGITAL;
3430 rajveer 15481
          default:
15482
            return null;
15483
        }
2690 chandransh 15484
      }
15485
 
15486
      /**
15487
       * Find the _Fields constant that matches fieldId, throwing an exception
15488
       * if it is not found.
15489
       */
15490
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15491
        _Fields fields = findByThriftId(fieldId);
15492
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15493
        return fields;
15494
      }
15495
 
15496
      /**
15497
       * Find the _Fields constant that matches name, or null if its not found.
15498
       */
15499
      public static _Fields findByName(String name) {
15500
        return byName.get(name);
15501
      }
15502
 
15503
      private final short _thriftId;
15504
      private final String _fieldName;
15505
 
15506
      _Fields(short thriftId, String fieldName) {
15507
        _thriftId = thriftId;
15508
        _fieldName = fieldName;
15509
      }
15510
 
15511
      public short getThriftFieldId() {
15512
        return _thriftId;
15513
      }
15514
 
15515
      public String getFieldName() {
15516
        return _fieldName;
15517
      }
15518
    }
15519
 
15520
    // isset id assignments
3010 chandransh 15521
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
8618 rajveer 15522
    private static final int __ISDIGITAL_ISSET_ID = 1;
15523
    private BitSet __isset_bit_vector = new BitSet(2);
2690 chandransh 15524
 
3430 rajveer 15525
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 15526
    static {
3430 rajveer 15527
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15528
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8618 rajveer 15530
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 15532
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15533
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
2690 chandransh 15534
    }
15535
 
3010 chandransh 15536
    public capturePayment_args() {
2690 chandransh 15537
    }
15538
 
3010 chandransh 15539
    public capturePayment_args(
8618 rajveer 15540
      long merchantTxnId,
15541
      boolean isDigital)
2690 chandransh 15542
    {
15543
      this();
15544
      this.merchantTxnId = merchantTxnId;
15545
      setMerchantTxnIdIsSet(true);
8618 rajveer 15546
      this.isDigital = isDigital;
15547
      setIsDigitalIsSet(true);
2690 chandransh 15548
    }
15549
 
15550
    /**
15551
     * Performs a deep copy on <i>other</i>.
15552
     */
3010 chandransh 15553
    public capturePayment_args(capturePayment_args other) {
2690 chandransh 15554
      __isset_bit_vector.clear();
15555
      __isset_bit_vector.or(other.__isset_bit_vector);
15556
      this.merchantTxnId = other.merchantTxnId;
8618 rajveer 15557
      this.isDigital = other.isDigital;
2690 chandransh 15558
    }
15559
 
3010 chandransh 15560
    public capturePayment_args deepCopy() {
15561
      return new capturePayment_args(this);
2690 chandransh 15562
    }
15563
 
3430 rajveer 15564
    @Override
15565
    public void clear() {
15566
      setMerchantTxnIdIsSet(false);
15567
      this.merchantTxnId = 0;
8618 rajveer 15568
      setIsDigitalIsSet(false);
15569
      this.isDigital = false;
2690 chandransh 15570
    }
15571
 
15572
    public long getMerchantTxnId() {
15573
      return this.merchantTxnId;
15574
    }
15575
 
3430 rajveer 15576
    public void setMerchantTxnId(long merchantTxnId) {
2690 chandransh 15577
      this.merchantTxnId = merchantTxnId;
15578
      setMerchantTxnIdIsSet(true);
15579
    }
15580
 
15581
    public void unsetMerchantTxnId() {
15582
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
15583
    }
15584
 
3430 rajveer 15585
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
2690 chandransh 15586
    public boolean isSetMerchantTxnId() {
15587
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
15588
    }
15589
 
15590
    public void setMerchantTxnIdIsSet(boolean value) {
15591
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
15592
    }
15593
 
8618 rajveer 15594
    public boolean isIsDigital() {
15595
      return this.isDigital;
15596
    }
15597
 
15598
    public void setIsDigital(boolean isDigital) {
15599
      this.isDigital = isDigital;
15600
      setIsDigitalIsSet(true);
15601
    }
15602
 
15603
    public void unsetIsDigital() {
15604
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
15605
    }
15606
 
15607
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
15608
    public boolean isSetIsDigital() {
15609
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
15610
    }
15611
 
15612
    public void setIsDigitalIsSet(boolean value) {
15613
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
15614
    }
15615
 
2690 chandransh 15616
    public void setFieldValue(_Fields field, Object value) {
15617
      switch (field) {
15618
      case MERCHANT_TXN_ID:
15619
        if (value == null) {
15620
          unsetMerchantTxnId();
15621
        } else {
15622
          setMerchantTxnId((Long)value);
15623
        }
15624
        break;
15625
 
8618 rajveer 15626
      case IS_DIGITAL:
15627
        if (value == null) {
15628
          unsetIsDigital();
15629
        } else {
15630
          setIsDigital((Boolean)value);
15631
        }
15632
        break;
15633
 
2690 chandransh 15634
      }
15635
    }
15636
 
15637
    public Object getFieldValue(_Fields field) {
15638
      switch (field) {
15639
      case MERCHANT_TXN_ID:
3430 rajveer 15640
        return Long.valueOf(getMerchantTxnId());
2690 chandransh 15641
 
8618 rajveer 15642
      case IS_DIGITAL:
15643
        return Boolean.valueOf(isIsDigital());
15644
 
2690 chandransh 15645
      }
15646
      throw new IllegalStateException();
15647
    }
15648
 
3430 rajveer 15649
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15650
    public boolean isSet(_Fields field) {
15651
      if (field == null) {
15652
        throw new IllegalArgumentException();
15653
      }
2690 chandransh 15654
 
15655
      switch (field) {
15656
      case MERCHANT_TXN_ID:
15657
        return isSetMerchantTxnId();
8618 rajveer 15658
      case IS_DIGITAL:
15659
        return isSetIsDigital();
2690 chandransh 15660
      }
15661
      throw new IllegalStateException();
15662
    }
15663
 
15664
    @Override
15665
    public boolean equals(Object that) {
15666
      if (that == null)
15667
        return false;
3010 chandransh 15668
      if (that instanceof capturePayment_args)
15669
        return this.equals((capturePayment_args)that);
2690 chandransh 15670
      return false;
15671
    }
15672
 
3010 chandransh 15673
    public boolean equals(capturePayment_args that) {
2690 chandransh 15674
      if (that == null)
15675
        return false;
15676
 
15677
      boolean this_present_merchantTxnId = true;
15678
      boolean that_present_merchantTxnId = true;
15679
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
15680
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
15681
          return false;
15682
        if (this.merchantTxnId != that.merchantTxnId)
15683
          return false;
15684
      }
15685
 
8618 rajveer 15686
      boolean this_present_isDigital = true;
15687
      boolean that_present_isDigital = true;
15688
      if (this_present_isDigital || that_present_isDigital) {
15689
        if (!(this_present_isDigital && that_present_isDigital))
15690
          return false;
15691
        if (this.isDigital != that.isDigital)
15692
          return false;
15693
      }
15694
 
2690 chandransh 15695
      return true;
15696
    }
15697
 
15698
    @Override
15699
    public int hashCode() {
15700
      return 0;
15701
    }
15702
 
3010 chandransh 15703
    public int compareTo(capturePayment_args other) {
2690 chandransh 15704
      if (!getClass().equals(other.getClass())) {
15705
        return getClass().getName().compareTo(other.getClass().getName());
15706
      }
15707
 
15708
      int lastComparison = 0;
3010 chandransh 15709
      capturePayment_args typedOther = (capturePayment_args)other;
2690 chandransh 15710
 
3430 rajveer 15711
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
2690 chandransh 15712
      if (lastComparison != 0) {
15713
        return lastComparison;
15714
      }
3430 rajveer 15715
      if (isSetMerchantTxnId()) {
15716
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
15717
        if (lastComparison != 0) {
15718
          return lastComparison;
15719
        }
2690 chandransh 15720
      }
8618 rajveer 15721
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
15722
      if (lastComparison != 0) {
15723
        return lastComparison;
15724
      }
15725
      if (isSetIsDigital()) {
15726
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
15727
        if (lastComparison != 0) {
15728
          return lastComparison;
15729
        }
15730
      }
2690 chandransh 15731
      return 0;
15732
    }
15733
 
3430 rajveer 15734
    public _Fields fieldForId(int fieldId) {
15735
      return _Fields.findByThriftId(fieldId);
15736
    }
15737
 
15738
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15739
      org.apache.thrift.protocol.TField field;
2690 chandransh 15740
      iprot.readStructBegin();
15741
      while (true)
15742
      {
15743
        field = iprot.readFieldBegin();
3430 rajveer 15744
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 15745
          break;
15746
        }
3430 rajveer 15747
        switch (field.id) {
15748
          case 1: // MERCHANT_TXN_ID
15749
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15750
              this.merchantTxnId = iprot.readI64();
15751
              setMerchantTxnIdIsSet(true);
15752
            } else { 
15753
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15754
            }
15755
            break;
8618 rajveer 15756
          case 2: // IS_DIGITAL
15757
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
15758
              this.isDigital = iprot.readBool();
15759
              setIsDigitalIsSet(true);
15760
            } else { 
15761
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15762
            }
15763
            break;
3430 rajveer 15764
          default:
15765
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 15766
        }
3430 rajveer 15767
        iprot.readFieldEnd();
2690 chandransh 15768
      }
15769
      iprot.readStructEnd();
15770
      validate();
15771
    }
15772
 
3430 rajveer 15773
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 15774
      validate();
15775
 
15776
      oprot.writeStructBegin(STRUCT_DESC);
15777
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15778
      oprot.writeI64(this.merchantTxnId);
15779
      oprot.writeFieldEnd();
8618 rajveer 15780
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
15781
      oprot.writeBool(this.isDigital);
15782
      oprot.writeFieldEnd();
2690 chandransh 15783
      oprot.writeFieldStop();
15784
      oprot.writeStructEnd();
15785
    }
15786
 
15787
    @Override
15788
    public String toString() {
3010 chandransh 15789
      StringBuilder sb = new StringBuilder("capturePayment_args(");
2690 chandransh 15790
      boolean first = true;
15791
 
15792
      sb.append("merchantTxnId:");
15793
      sb.append(this.merchantTxnId);
15794
      first = false;
8618 rajveer 15795
      if (!first) sb.append(", ");
15796
      sb.append("isDigital:");
15797
      sb.append(this.isDigital);
15798
      first = false;
2690 chandransh 15799
      sb.append(")");
15800
      return sb.toString();
15801
    }
15802
 
3430 rajveer 15803
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 15804
      // check for required fields
15805
    }
15806
 
3430 rajveer 15807
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15808
      try {
15809
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15810
      } catch (org.apache.thrift.TException te) {
15811
        throw new java.io.IOException(te);
15812
      }
15813
    }
15814
 
15815
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15816
      try {
15817
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15818
      } catch (org.apache.thrift.TException te) {
15819
        throw new java.io.IOException(te);
15820
      }
15821
    }
15822
 
2690 chandransh 15823
  }
15824
 
3430 rajveer 15825
  public static class capturePayment_result implements org.apache.thrift.TBase<capturePayment_result, capturePayment_result._Fields>, java.io.Serializable, Cloneable   {
15826
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_result");
2690 chandransh 15827
 
3430 rajveer 15828
    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);
15829
    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 15830
 
3430 rajveer 15831
    private boolean success; // required
15832
    private PaymentException pe; // required
2690 chandransh 15833
 
15834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15835
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2690 chandransh 15836
      SUCCESS((short)0, "success"),
15837
      PE((short)1, "pe");
15838
 
15839
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15840
 
15841
      static {
15842
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15843
          byName.put(field.getFieldName(), field);
15844
        }
15845
      }
15846
 
15847
      /**
15848
       * Find the _Fields constant that matches fieldId, or null if its not found.
15849
       */
15850
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15851
        switch(fieldId) {
15852
          case 0: // SUCCESS
15853
            return SUCCESS;
15854
          case 1: // PE
15855
            return PE;
15856
          default:
15857
            return null;
15858
        }
2690 chandransh 15859
      }
15860
 
15861
      /**
15862
       * Find the _Fields constant that matches fieldId, throwing an exception
15863
       * if it is not found.
15864
       */
15865
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15866
        _Fields fields = findByThriftId(fieldId);
15867
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15868
        return fields;
15869
      }
15870
 
15871
      /**
15872
       * Find the _Fields constant that matches name, or null if its not found.
15873
       */
15874
      public static _Fields findByName(String name) {
15875
        return byName.get(name);
15876
      }
15877
 
15878
      private final short _thriftId;
15879
      private final String _fieldName;
15880
 
15881
      _Fields(short thriftId, String fieldName) {
15882
        _thriftId = thriftId;
15883
        _fieldName = fieldName;
15884
      }
15885
 
15886
      public short getThriftFieldId() {
15887
        return _thriftId;
15888
      }
15889
 
15890
      public String getFieldName() {
15891
        return _fieldName;
15892
      }
15893
    }
15894
 
15895
    // isset id assignments
15896
    private static final int __SUCCESS_ISSET_ID = 0;
15897
    private BitSet __isset_bit_vector = new BitSet(1);
15898
 
3430 rajveer 15899
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 15900
    static {
3430 rajveer 15901
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15902
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15903
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
15904
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15905
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15906
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15907
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_result.class, metaDataMap);
2690 chandransh 15908
    }
15909
 
3010 chandransh 15910
    public capturePayment_result() {
2690 chandransh 15911
    }
15912
 
3010 chandransh 15913
    public capturePayment_result(
15914
      boolean success,
2690 chandransh 15915
      PaymentException pe)
15916
    {
15917
      this();
15918
      this.success = success;
15919
      setSuccessIsSet(true);
15920
      this.pe = pe;
15921
    }
15922
 
15923
    /**
15924
     * Performs a deep copy on <i>other</i>.
15925
     */
3010 chandransh 15926
    public capturePayment_result(capturePayment_result other) {
2690 chandransh 15927
      __isset_bit_vector.clear();
15928
      __isset_bit_vector.or(other.__isset_bit_vector);
15929
      this.success = other.success;
15930
      if (other.isSetPe()) {
15931
        this.pe = new PaymentException(other.pe);
15932
      }
15933
    }
15934
 
3010 chandransh 15935
    public capturePayment_result deepCopy() {
15936
      return new capturePayment_result(this);
2690 chandransh 15937
    }
15938
 
3430 rajveer 15939
    @Override
15940
    public void clear() {
15941
      setSuccessIsSet(false);
15942
      this.success = false;
15943
      this.pe = null;
2690 chandransh 15944
    }
15945
 
3010 chandransh 15946
    public boolean isSuccess() {
2690 chandransh 15947
      return this.success;
15948
    }
15949
 
3430 rajveer 15950
    public void setSuccess(boolean success) {
2690 chandransh 15951
      this.success = success;
15952
      setSuccessIsSet(true);
15953
    }
15954
 
15955
    public void unsetSuccess() {
15956
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15957
    }
15958
 
3430 rajveer 15959
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2690 chandransh 15960
    public boolean isSetSuccess() {
15961
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15962
    }
15963
 
15964
    public void setSuccessIsSet(boolean value) {
15965
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15966
    }
15967
 
15968
    public PaymentException getPe() {
15969
      return this.pe;
15970
    }
15971
 
3430 rajveer 15972
    public void setPe(PaymentException pe) {
2690 chandransh 15973
      this.pe = pe;
15974
    }
15975
 
15976
    public void unsetPe() {
15977
      this.pe = null;
15978
    }
15979
 
3430 rajveer 15980
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2690 chandransh 15981
    public boolean isSetPe() {
15982
      return this.pe != null;
15983
    }
15984
 
15985
    public void setPeIsSet(boolean value) {
15986
      if (!value) {
15987
        this.pe = null;
15988
      }
15989
    }
15990
 
15991
    public void setFieldValue(_Fields field, Object value) {
15992
      switch (field) {
15993
      case SUCCESS:
15994
        if (value == null) {
15995
          unsetSuccess();
15996
        } else {
3010 chandransh 15997
          setSuccess((Boolean)value);
2690 chandransh 15998
        }
15999
        break;
16000
 
16001
      case PE:
16002
        if (value == null) {
16003
          unsetPe();
16004
        } else {
16005
          setPe((PaymentException)value);
16006
        }
16007
        break;
16008
 
16009
      }
16010
    }
16011
 
16012
    public Object getFieldValue(_Fields field) {
16013
      switch (field) {
16014
      case SUCCESS:
3430 rajveer 16015
        return Boolean.valueOf(isSuccess());
2690 chandransh 16016
 
16017
      case PE:
16018
        return getPe();
16019
 
16020
      }
16021
      throw new IllegalStateException();
16022
    }
16023
 
3430 rajveer 16024
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16025
    public boolean isSet(_Fields field) {
16026
      if (field == null) {
16027
        throw new IllegalArgumentException();
16028
      }
2690 chandransh 16029
 
16030
      switch (field) {
16031
      case SUCCESS:
16032
        return isSetSuccess();
16033
      case PE:
16034
        return isSetPe();
16035
      }
16036
      throw new IllegalStateException();
16037
    }
16038
 
16039
    @Override
16040
    public boolean equals(Object that) {
16041
      if (that == null)
16042
        return false;
3010 chandransh 16043
      if (that instanceof capturePayment_result)
16044
        return this.equals((capturePayment_result)that);
2690 chandransh 16045
      return false;
16046
    }
16047
 
3010 chandransh 16048
    public boolean equals(capturePayment_result that) {
2690 chandransh 16049
      if (that == null)
16050
        return false;
16051
 
16052
      boolean this_present_success = true;
16053
      boolean that_present_success = true;
16054
      if (this_present_success || that_present_success) {
16055
        if (!(this_present_success && that_present_success))
16056
          return false;
16057
        if (this.success != that.success)
16058
          return false;
16059
      }
16060
 
16061
      boolean this_present_pe = true && this.isSetPe();
16062
      boolean that_present_pe = true && that.isSetPe();
16063
      if (this_present_pe || that_present_pe) {
16064
        if (!(this_present_pe && that_present_pe))
16065
          return false;
16066
        if (!this.pe.equals(that.pe))
16067
          return false;
16068
      }
16069
 
16070
      return true;
16071
    }
16072
 
16073
    @Override
16074
    public int hashCode() {
16075
      return 0;
16076
    }
16077
 
3010 chandransh 16078
    public int compareTo(capturePayment_result other) {
2690 chandransh 16079
      if (!getClass().equals(other.getClass())) {
16080
        return getClass().getName().compareTo(other.getClass().getName());
16081
      }
16082
 
16083
      int lastComparison = 0;
3010 chandransh 16084
      capturePayment_result typedOther = (capturePayment_result)other;
2690 chandransh 16085
 
3430 rajveer 16086
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2690 chandransh 16087
      if (lastComparison != 0) {
16088
        return lastComparison;
16089
      }
3430 rajveer 16090
      if (isSetSuccess()) {
16091
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16092
        if (lastComparison != 0) {
16093
          return lastComparison;
16094
        }
2690 chandransh 16095
      }
3430 rajveer 16096
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2690 chandransh 16097
      if (lastComparison != 0) {
16098
        return lastComparison;
16099
      }
3430 rajveer 16100
      if (isSetPe()) {
16101
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
16102
        if (lastComparison != 0) {
16103
          return lastComparison;
16104
        }
2690 chandransh 16105
      }
16106
      return 0;
16107
    }
16108
 
3430 rajveer 16109
    public _Fields fieldForId(int fieldId) {
16110
      return _Fields.findByThriftId(fieldId);
16111
    }
16112
 
16113
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16114
      org.apache.thrift.protocol.TField field;
2690 chandransh 16115
      iprot.readStructBegin();
16116
      while (true)
16117
      {
16118
        field = iprot.readFieldBegin();
3430 rajveer 16119
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 16120
          break;
16121
        }
3430 rajveer 16122
        switch (field.id) {
16123
          case 0: // SUCCESS
16124
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16125
              this.success = iprot.readBool();
16126
              setSuccessIsSet(true);
16127
            } else { 
16128
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16129
            }
16130
            break;
16131
          case 1: // PE
16132
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16133
              this.pe = new PaymentException();
16134
              this.pe.read(iprot);
16135
            } else { 
16136
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16137
            }
16138
            break;
16139
          default:
16140
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 16141
        }
3430 rajveer 16142
        iprot.readFieldEnd();
2690 chandransh 16143
      }
16144
      iprot.readStructEnd();
16145
      validate();
16146
    }
16147
 
3430 rajveer 16148
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 16149
      oprot.writeStructBegin(STRUCT_DESC);
16150
 
16151
      if (this.isSetSuccess()) {
16152
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 16153
        oprot.writeBool(this.success);
2690 chandransh 16154
        oprot.writeFieldEnd();
16155
      } else if (this.isSetPe()) {
16156
        oprot.writeFieldBegin(PE_FIELD_DESC);
16157
        this.pe.write(oprot);
16158
        oprot.writeFieldEnd();
16159
      }
16160
      oprot.writeFieldStop();
16161
      oprot.writeStructEnd();
16162
    }
16163
 
16164
    @Override
16165
    public String toString() {
3010 chandransh 16166
      StringBuilder sb = new StringBuilder("capturePayment_result(");
2690 chandransh 16167
      boolean first = true;
16168
 
16169
      sb.append("success:");
16170
      sb.append(this.success);
16171
      first = false;
16172
      if (!first) sb.append(", ");
16173
      sb.append("pe:");
16174
      if (this.pe == null) {
16175
        sb.append("null");
16176
      } else {
16177
        sb.append(this.pe);
16178
      }
16179
      first = false;
16180
      sb.append(")");
16181
      return sb.toString();
16182
    }
16183
 
3430 rajveer 16184
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 16185
      // check for required fields
16186
    }
16187
 
3430 rajveer 16188
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16189
      try {
16190
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16191
      } catch (org.apache.thrift.TException te) {
16192
        throw new java.io.IOException(te);
16193
      }
16194
    }
16195
 
16196
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16197
      try {
16198
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16199
      } catch (org.apache.thrift.TException te) {
16200
        throw new java.io.IOException(te);
16201
      }
16202
    }
16203
 
2690 chandransh 16204
  }
16205
 
6486 rajveer 16206
  public static class refundPayment_args implements org.apache.thrift.TBase<refundPayment_args, refundPayment_args._Fields>, java.io.Serializable, Cloneable   {
16207
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_args");
16208
 
16209
    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);
16210
    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);
16211
    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);
16212
 
16213
    private long merchantTxnId; // required
16214
    private double amount; // required
16215
    private boolean isDigital; // required
16216
 
16217
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16218
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16219
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
16220
      AMOUNT((short)2, "amount"),
16221
      IS_DIGITAL((short)3, "isDigital");
16222
 
16223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16224
 
16225
      static {
16226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16227
          byName.put(field.getFieldName(), field);
16228
        }
16229
      }
16230
 
16231
      /**
16232
       * Find the _Fields constant that matches fieldId, or null if its not found.
16233
       */
16234
      public static _Fields findByThriftId(int fieldId) {
16235
        switch(fieldId) {
16236
          case 1: // MERCHANT_TXN_ID
16237
            return MERCHANT_TXN_ID;
16238
          case 2: // AMOUNT
16239
            return AMOUNT;
16240
          case 3: // IS_DIGITAL
16241
            return IS_DIGITAL;
16242
          default:
16243
            return null;
16244
        }
16245
      }
16246
 
16247
      /**
16248
       * Find the _Fields constant that matches fieldId, throwing an exception
16249
       * if it is not found.
16250
       */
16251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16252
        _Fields fields = findByThriftId(fieldId);
16253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16254
        return fields;
16255
      }
16256
 
16257
      /**
16258
       * Find the _Fields constant that matches name, or null if its not found.
16259
       */
16260
      public static _Fields findByName(String name) {
16261
        return byName.get(name);
16262
      }
16263
 
16264
      private final short _thriftId;
16265
      private final String _fieldName;
16266
 
16267
      _Fields(short thriftId, String fieldName) {
16268
        _thriftId = thriftId;
16269
        _fieldName = fieldName;
16270
      }
16271
 
16272
      public short getThriftFieldId() {
16273
        return _thriftId;
16274
      }
16275
 
16276
      public String getFieldName() {
16277
        return _fieldName;
16278
      }
16279
    }
16280
 
16281
    // isset id assignments
16282
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
16283
    private static final int __AMOUNT_ISSET_ID = 1;
16284
    private static final int __ISDIGITAL_ISSET_ID = 2;
16285
    private BitSet __isset_bit_vector = new BitSet(3);
16286
 
16287
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16288
    static {
16289
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16290
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16291
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16292
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16293
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
16294
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16295
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16296
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16297
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_args.class, metaDataMap);
16298
    }
16299
 
16300
    public refundPayment_args() {
16301
    }
16302
 
16303
    public refundPayment_args(
16304
      long merchantTxnId,
16305
      double amount,
16306
      boolean isDigital)
16307
    {
16308
      this();
16309
      this.merchantTxnId = merchantTxnId;
16310
      setMerchantTxnIdIsSet(true);
16311
      this.amount = amount;
16312
      setAmountIsSet(true);
16313
      this.isDigital = isDigital;
16314
      setIsDigitalIsSet(true);
16315
    }
16316
 
16317
    /**
16318
     * Performs a deep copy on <i>other</i>.
16319
     */
16320
    public refundPayment_args(refundPayment_args other) {
16321
      __isset_bit_vector.clear();
16322
      __isset_bit_vector.or(other.__isset_bit_vector);
16323
      this.merchantTxnId = other.merchantTxnId;
16324
      this.amount = other.amount;
16325
      this.isDigital = other.isDigital;
16326
    }
16327
 
16328
    public refundPayment_args deepCopy() {
16329
      return new refundPayment_args(this);
16330
    }
16331
 
16332
    @Override
16333
    public void clear() {
16334
      setMerchantTxnIdIsSet(false);
16335
      this.merchantTxnId = 0;
16336
      setAmountIsSet(false);
16337
      this.amount = 0.0;
16338
      setIsDigitalIsSet(false);
16339
      this.isDigital = false;
16340
    }
16341
 
16342
    public long getMerchantTxnId() {
16343
      return this.merchantTxnId;
16344
    }
16345
 
16346
    public void setMerchantTxnId(long merchantTxnId) {
16347
      this.merchantTxnId = merchantTxnId;
16348
      setMerchantTxnIdIsSet(true);
16349
    }
16350
 
16351
    public void unsetMerchantTxnId() {
16352
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
16353
    }
16354
 
16355
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
16356
    public boolean isSetMerchantTxnId() {
16357
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
16358
    }
16359
 
16360
    public void setMerchantTxnIdIsSet(boolean value) {
16361
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
16362
    }
16363
 
16364
    public double getAmount() {
16365
      return this.amount;
16366
    }
16367
 
16368
    public void setAmount(double amount) {
16369
      this.amount = amount;
16370
      setAmountIsSet(true);
16371
    }
16372
 
16373
    public void unsetAmount() {
16374
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
16375
    }
16376
 
16377
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
16378
    public boolean isSetAmount() {
16379
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
16380
    }
16381
 
16382
    public void setAmountIsSet(boolean value) {
16383
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
16384
    }
16385
 
16386
    public boolean isIsDigital() {
16387
      return this.isDigital;
16388
    }
16389
 
16390
    public void setIsDigital(boolean isDigital) {
16391
      this.isDigital = isDigital;
16392
      setIsDigitalIsSet(true);
16393
    }
16394
 
16395
    public void unsetIsDigital() {
16396
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
16397
    }
16398
 
16399
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
16400
    public boolean isSetIsDigital() {
16401
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
16402
    }
16403
 
16404
    public void setIsDigitalIsSet(boolean value) {
16405
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
16406
    }
16407
 
16408
    public void setFieldValue(_Fields field, Object value) {
16409
      switch (field) {
16410
      case MERCHANT_TXN_ID:
16411
        if (value == null) {
16412
          unsetMerchantTxnId();
16413
        } else {
16414
          setMerchantTxnId((Long)value);
16415
        }
16416
        break;
16417
 
16418
      case AMOUNT:
16419
        if (value == null) {
16420
          unsetAmount();
16421
        } else {
16422
          setAmount((Double)value);
16423
        }
16424
        break;
16425
 
16426
      case IS_DIGITAL:
16427
        if (value == null) {
16428
          unsetIsDigital();
16429
        } else {
16430
          setIsDigital((Boolean)value);
16431
        }
16432
        break;
16433
 
16434
      }
16435
    }
16436
 
16437
    public Object getFieldValue(_Fields field) {
16438
      switch (field) {
16439
      case MERCHANT_TXN_ID:
16440
        return Long.valueOf(getMerchantTxnId());
16441
 
16442
      case AMOUNT:
16443
        return Double.valueOf(getAmount());
16444
 
16445
      case IS_DIGITAL:
16446
        return Boolean.valueOf(isIsDigital());
16447
 
16448
      }
16449
      throw new IllegalStateException();
16450
    }
16451
 
16452
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16453
    public boolean isSet(_Fields field) {
16454
      if (field == null) {
16455
        throw new IllegalArgumentException();
16456
      }
16457
 
16458
      switch (field) {
16459
      case MERCHANT_TXN_ID:
16460
        return isSetMerchantTxnId();
16461
      case AMOUNT:
16462
        return isSetAmount();
16463
      case IS_DIGITAL:
16464
        return isSetIsDigital();
16465
      }
16466
      throw new IllegalStateException();
16467
    }
16468
 
16469
    @Override
16470
    public boolean equals(Object that) {
16471
      if (that == null)
16472
        return false;
16473
      if (that instanceof refundPayment_args)
16474
        return this.equals((refundPayment_args)that);
16475
      return false;
16476
    }
16477
 
16478
    public boolean equals(refundPayment_args that) {
16479
      if (that == null)
16480
        return false;
16481
 
16482
      boolean this_present_merchantTxnId = true;
16483
      boolean that_present_merchantTxnId = true;
16484
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
16485
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
16486
          return false;
16487
        if (this.merchantTxnId != that.merchantTxnId)
16488
          return false;
16489
      }
16490
 
16491
      boolean this_present_amount = true;
16492
      boolean that_present_amount = true;
16493
      if (this_present_amount || that_present_amount) {
16494
        if (!(this_present_amount && that_present_amount))
16495
          return false;
16496
        if (this.amount != that.amount)
16497
          return false;
16498
      }
16499
 
16500
      boolean this_present_isDigital = true;
16501
      boolean that_present_isDigital = true;
16502
      if (this_present_isDigital || that_present_isDigital) {
16503
        if (!(this_present_isDigital && that_present_isDigital))
16504
          return false;
16505
        if (this.isDigital != that.isDigital)
16506
          return false;
16507
      }
16508
 
16509
      return true;
16510
    }
16511
 
16512
    @Override
16513
    public int hashCode() {
16514
      return 0;
16515
    }
16516
 
16517
    public int compareTo(refundPayment_args other) {
16518
      if (!getClass().equals(other.getClass())) {
16519
        return getClass().getName().compareTo(other.getClass().getName());
16520
      }
16521
 
16522
      int lastComparison = 0;
16523
      refundPayment_args typedOther = (refundPayment_args)other;
16524
 
16525
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
16526
      if (lastComparison != 0) {
16527
        return lastComparison;
16528
      }
16529
      if (isSetMerchantTxnId()) {
16530
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
16531
        if (lastComparison != 0) {
16532
          return lastComparison;
16533
        }
16534
      }
16535
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
16536
      if (lastComparison != 0) {
16537
        return lastComparison;
16538
      }
16539
      if (isSetAmount()) {
16540
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
16541
        if (lastComparison != 0) {
16542
          return lastComparison;
16543
        }
16544
      }
16545
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
16546
      if (lastComparison != 0) {
16547
        return lastComparison;
16548
      }
16549
      if (isSetIsDigital()) {
16550
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
16551
        if (lastComparison != 0) {
16552
          return lastComparison;
16553
        }
16554
      }
16555
      return 0;
16556
    }
16557
 
16558
    public _Fields fieldForId(int fieldId) {
16559
      return _Fields.findByThriftId(fieldId);
16560
    }
16561
 
16562
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16563
      org.apache.thrift.protocol.TField field;
16564
      iprot.readStructBegin();
16565
      while (true)
16566
      {
16567
        field = iprot.readFieldBegin();
16568
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16569
          break;
16570
        }
16571
        switch (field.id) {
16572
          case 1: // MERCHANT_TXN_ID
16573
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16574
              this.merchantTxnId = iprot.readI64();
16575
              setMerchantTxnIdIsSet(true);
16576
            } else { 
16577
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16578
            }
16579
            break;
16580
          case 2: // AMOUNT
16581
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
16582
              this.amount = iprot.readDouble();
16583
              setAmountIsSet(true);
16584
            } else { 
16585
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16586
            }
16587
            break;
16588
          case 3: // IS_DIGITAL
16589
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16590
              this.isDigital = iprot.readBool();
16591
              setIsDigitalIsSet(true);
16592
            } else { 
16593
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16594
            }
16595
            break;
16596
          default:
16597
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16598
        }
16599
        iprot.readFieldEnd();
16600
      }
16601
      iprot.readStructEnd();
16602
      validate();
16603
    }
16604
 
16605
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16606
      validate();
16607
 
16608
      oprot.writeStructBegin(STRUCT_DESC);
16609
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
16610
      oprot.writeI64(this.merchantTxnId);
16611
      oprot.writeFieldEnd();
16612
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
16613
      oprot.writeDouble(this.amount);
16614
      oprot.writeFieldEnd();
16615
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
16616
      oprot.writeBool(this.isDigital);
16617
      oprot.writeFieldEnd();
16618
      oprot.writeFieldStop();
16619
      oprot.writeStructEnd();
16620
    }
16621
 
16622
    @Override
16623
    public String toString() {
16624
      StringBuilder sb = new StringBuilder("refundPayment_args(");
16625
      boolean first = true;
16626
 
16627
      sb.append("merchantTxnId:");
16628
      sb.append(this.merchantTxnId);
16629
      first = false;
16630
      if (!first) sb.append(", ");
16631
      sb.append("amount:");
16632
      sb.append(this.amount);
16633
      first = false;
16634
      if (!first) sb.append(", ");
16635
      sb.append("isDigital:");
16636
      sb.append(this.isDigital);
16637
      first = false;
16638
      sb.append(")");
16639
      return sb.toString();
16640
    }
16641
 
16642
    public void validate() throws org.apache.thrift.TException {
16643
      // check for required fields
16644
    }
16645
 
16646
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16647
      try {
16648
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16649
      } catch (org.apache.thrift.TException te) {
16650
        throw new java.io.IOException(te);
16651
      }
16652
    }
16653
 
16654
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16655
      try {
16656
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16657
      } catch (org.apache.thrift.TException te) {
16658
        throw new java.io.IOException(te);
16659
      }
16660
    }
16661
 
16662
  }
16663
 
16664
  public static class refundPayment_result implements org.apache.thrift.TBase<refundPayment_result, refundPayment_result._Fields>, java.io.Serializable, Cloneable   {
16665
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_result");
16666
 
16667
    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);
16668
    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);
16669
 
16670
    private boolean success; // required
16671
    private PaymentException pe; // required
16672
 
16673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16674
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16675
      SUCCESS((short)0, "success"),
16676
      PE((short)1, "pe");
16677
 
16678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16679
 
16680
      static {
16681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16682
          byName.put(field.getFieldName(), field);
16683
        }
16684
      }
16685
 
16686
      /**
16687
       * Find the _Fields constant that matches fieldId, or null if its not found.
16688
       */
16689
      public static _Fields findByThriftId(int fieldId) {
16690
        switch(fieldId) {
16691
          case 0: // SUCCESS
16692
            return SUCCESS;
16693
          case 1: // PE
16694
            return PE;
16695
          default:
16696
            return null;
16697
        }
16698
      }
16699
 
16700
      /**
16701
       * Find the _Fields constant that matches fieldId, throwing an exception
16702
       * if it is not found.
16703
       */
16704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16705
        _Fields fields = findByThriftId(fieldId);
16706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16707
        return fields;
16708
      }
16709
 
16710
      /**
16711
       * Find the _Fields constant that matches name, or null if its not found.
16712
       */
16713
      public static _Fields findByName(String name) {
16714
        return byName.get(name);
16715
      }
16716
 
16717
      private final short _thriftId;
16718
      private final String _fieldName;
16719
 
16720
      _Fields(short thriftId, String fieldName) {
16721
        _thriftId = thriftId;
16722
        _fieldName = fieldName;
16723
      }
16724
 
16725
      public short getThriftFieldId() {
16726
        return _thriftId;
16727
      }
16728
 
16729
      public String getFieldName() {
16730
        return _fieldName;
16731
      }
16732
    }
16733
 
16734
    // isset id assignments
16735
    private static final int __SUCCESS_ISSET_ID = 0;
16736
    private BitSet __isset_bit_vector = new BitSet(1);
16737
 
16738
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16739
    static {
16740
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16741
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16742
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16743
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16744
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
16745
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16746
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_result.class, metaDataMap);
16747
    }
16748
 
16749
    public refundPayment_result() {
16750
    }
16751
 
16752
    public refundPayment_result(
16753
      boolean success,
16754
      PaymentException pe)
16755
    {
16756
      this();
16757
      this.success = success;
16758
      setSuccessIsSet(true);
16759
      this.pe = pe;
16760
    }
16761
 
16762
    /**
16763
     * Performs a deep copy on <i>other</i>.
16764
     */
16765
    public refundPayment_result(refundPayment_result other) {
16766
      __isset_bit_vector.clear();
16767
      __isset_bit_vector.or(other.__isset_bit_vector);
16768
      this.success = other.success;
16769
      if (other.isSetPe()) {
16770
        this.pe = new PaymentException(other.pe);
16771
      }
16772
    }
16773
 
16774
    public refundPayment_result deepCopy() {
16775
      return new refundPayment_result(this);
16776
    }
16777
 
16778
    @Override
16779
    public void clear() {
16780
      setSuccessIsSet(false);
16781
      this.success = false;
16782
      this.pe = null;
16783
    }
16784
 
16785
    public boolean isSuccess() {
16786
      return this.success;
16787
    }
16788
 
16789
    public void setSuccess(boolean success) {
16790
      this.success = success;
16791
      setSuccessIsSet(true);
16792
    }
16793
 
16794
    public void unsetSuccess() {
16795
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16796
    }
16797
 
16798
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16799
    public boolean isSetSuccess() {
16800
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16801
    }
16802
 
16803
    public void setSuccessIsSet(boolean value) {
16804
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16805
    }
16806
 
16807
    public PaymentException getPe() {
16808
      return this.pe;
16809
    }
16810
 
16811
    public void setPe(PaymentException pe) {
16812
      this.pe = pe;
16813
    }
16814
 
16815
    public void unsetPe() {
16816
      this.pe = null;
16817
    }
16818
 
16819
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
16820
    public boolean isSetPe() {
16821
      return this.pe != null;
16822
    }
16823
 
16824
    public void setPeIsSet(boolean value) {
16825
      if (!value) {
16826
        this.pe = null;
16827
      }
16828
    }
16829
 
16830
    public void setFieldValue(_Fields field, Object value) {
16831
      switch (field) {
16832
      case SUCCESS:
16833
        if (value == null) {
16834
          unsetSuccess();
16835
        } else {
16836
          setSuccess((Boolean)value);
16837
        }
16838
        break;
16839
 
16840
      case PE:
16841
        if (value == null) {
16842
          unsetPe();
16843
        } else {
16844
          setPe((PaymentException)value);
16845
        }
16846
        break;
16847
 
16848
      }
16849
    }
16850
 
16851
    public Object getFieldValue(_Fields field) {
16852
      switch (field) {
16853
      case SUCCESS:
16854
        return Boolean.valueOf(isSuccess());
16855
 
16856
      case PE:
16857
        return getPe();
16858
 
16859
      }
16860
      throw new IllegalStateException();
16861
    }
16862
 
16863
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16864
    public boolean isSet(_Fields field) {
16865
      if (field == null) {
16866
        throw new IllegalArgumentException();
16867
      }
16868
 
16869
      switch (field) {
16870
      case SUCCESS:
16871
        return isSetSuccess();
16872
      case PE:
16873
        return isSetPe();
16874
      }
16875
      throw new IllegalStateException();
16876
    }
16877
 
16878
    @Override
16879
    public boolean equals(Object that) {
16880
      if (that == null)
16881
        return false;
16882
      if (that instanceof refundPayment_result)
16883
        return this.equals((refundPayment_result)that);
16884
      return false;
16885
    }
16886
 
16887
    public boolean equals(refundPayment_result that) {
16888
      if (that == null)
16889
        return false;
16890
 
16891
      boolean this_present_success = true;
16892
      boolean that_present_success = true;
16893
      if (this_present_success || that_present_success) {
16894
        if (!(this_present_success && that_present_success))
16895
          return false;
16896
        if (this.success != that.success)
16897
          return false;
16898
      }
16899
 
16900
      boolean this_present_pe = true && this.isSetPe();
16901
      boolean that_present_pe = true && that.isSetPe();
16902
      if (this_present_pe || that_present_pe) {
16903
        if (!(this_present_pe && that_present_pe))
16904
          return false;
16905
        if (!this.pe.equals(that.pe))
16906
          return false;
16907
      }
16908
 
16909
      return true;
16910
    }
16911
 
16912
    @Override
16913
    public int hashCode() {
16914
      return 0;
16915
    }
16916
 
16917
    public int compareTo(refundPayment_result other) {
16918
      if (!getClass().equals(other.getClass())) {
16919
        return getClass().getName().compareTo(other.getClass().getName());
16920
      }
16921
 
16922
      int lastComparison = 0;
16923
      refundPayment_result typedOther = (refundPayment_result)other;
16924
 
16925
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16926
      if (lastComparison != 0) {
16927
        return lastComparison;
16928
      }
16929
      if (isSetSuccess()) {
16930
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16931
        if (lastComparison != 0) {
16932
          return lastComparison;
16933
        }
16934
      }
16935
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
16936
      if (lastComparison != 0) {
16937
        return lastComparison;
16938
      }
16939
      if (isSetPe()) {
16940
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
16941
        if (lastComparison != 0) {
16942
          return lastComparison;
16943
        }
16944
      }
16945
      return 0;
16946
    }
16947
 
16948
    public _Fields fieldForId(int fieldId) {
16949
      return _Fields.findByThriftId(fieldId);
16950
    }
16951
 
16952
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16953
      org.apache.thrift.protocol.TField field;
16954
      iprot.readStructBegin();
16955
      while (true)
16956
      {
16957
        field = iprot.readFieldBegin();
16958
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16959
          break;
16960
        }
16961
        switch (field.id) {
16962
          case 0: // SUCCESS
16963
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16964
              this.success = iprot.readBool();
16965
              setSuccessIsSet(true);
16966
            } else { 
16967
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16968
            }
16969
            break;
16970
          case 1: // PE
16971
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16972
              this.pe = new PaymentException();
16973
              this.pe.read(iprot);
16974
            } else { 
16975
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16976
            }
16977
            break;
16978
          default:
16979
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16980
        }
16981
        iprot.readFieldEnd();
16982
      }
16983
      iprot.readStructEnd();
16984
      validate();
16985
    }
16986
 
16987
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16988
      oprot.writeStructBegin(STRUCT_DESC);
16989
 
16990
      if (this.isSetSuccess()) {
16991
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16992
        oprot.writeBool(this.success);
16993
        oprot.writeFieldEnd();
16994
      } else if (this.isSetPe()) {
16995
        oprot.writeFieldBegin(PE_FIELD_DESC);
16996
        this.pe.write(oprot);
16997
        oprot.writeFieldEnd();
16998
      }
16999
      oprot.writeFieldStop();
17000
      oprot.writeStructEnd();
17001
    }
17002
 
17003
    @Override
17004
    public String toString() {
17005
      StringBuilder sb = new StringBuilder("refundPayment_result(");
17006
      boolean first = true;
17007
 
17008
      sb.append("success:");
17009
      sb.append(this.success);
17010
      first = false;
17011
      if (!first) sb.append(", ");
17012
      sb.append("pe:");
17013
      if (this.pe == null) {
17014
        sb.append("null");
17015
      } else {
17016
        sb.append(this.pe);
17017
      }
17018
      first = false;
17019
      sb.append(")");
17020
      return sb.toString();
17021
    }
17022
 
17023
    public void validate() throws org.apache.thrift.TException {
17024
      // check for required fields
17025
    }
17026
 
17027
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17028
      try {
17029
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17030
      } catch (org.apache.thrift.TException te) {
17031
        throw new java.io.IOException(te);
17032
      }
17033
    }
17034
 
17035
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17036
      try {
17037
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17038
      } catch (org.apache.thrift.TException te) {
17039
        throw new java.io.IOException(te);
17040
      }
17041
    }
17042
 
17043
  }
17044
 
3956 chandransh 17045
  public static class partiallyCapturePayment_args implements org.apache.thrift.TBase<partiallyCapturePayment_args, partiallyCapturePayment_args._Fields>, java.io.Serializable, Cloneable   {
17046
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_args");
17047
 
17048
    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);
17049
    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);
17050
    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);
17051
    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);
17052
    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);
17053
 
17054
    private long merchantTxnId; // required
17055
    private double amount; // required
17056
    private String xferBy; // required
17057
    private String xferTxnId; // required
17058
    private long xferDate; // required
17059
 
17060
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17061
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17062
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
17063
      AMOUNT((short)2, "amount"),
17064
      XFER_BY((short)3, "xferBy"),
17065
      XFER_TXN_ID((short)4, "xferTxnId"),
17066
      XFER_DATE((short)5, "xferDate");
17067
 
17068
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17069
 
17070
      static {
17071
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17072
          byName.put(field.getFieldName(), field);
17073
        }
17074
      }
17075
 
17076
      /**
17077
       * Find the _Fields constant that matches fieldId, or null if its not found.
17078
       */
17079
      public static _Fields findByThriftId(int fieldId) {
17080
        switch(fieldId) {
17081
          case 1: // MERCHANT_TXN_ID
17082
            return MERCHANT_TXN_ID;
17083
          case 2: // AMOUNT
17084
            return AMOUNT;
17085
          case 3: // XFER_BY
17086
            return XFER_BY;
17087
          case 4: // XFER_TXN_ID
17088
            return XFER_TXN_ID;
17089
          case 5: // XFER_DATE
17090
            return XFER_DATE;
17091
          default:
17092
            return null;
17093
        }
17094
      }
17095
 
17096
      /**
17097
       * Find the _Fields constant that matches fieldId, throwing an exception
17098
       * if it is not found.
17099
       */
17100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17101
        _Fields fields = findByThriftId(fieldId);
17102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17103
        return fields;
17104
      }
17105
 
17106
      /**
17107
       * Find the _Fields constant that matches name, or null if its not found.
17108
       */
17109
      public static _Fields findByName(String name) {
17110
        return byName.get(name);
17111
      }
17112
 
17113
      private final short _thriftId;
17114
      private final String _fieldName;
17115
 
17116
      _Fields(short thriftId, String fieldName) {
17117
        _thriftId = thriftId;
17118
        _fieldName = fieldName;
17119
      }
17120
 
17121
      public short getThriftFieldId() {
17122
        return _thriftId;
17123
      }
17124
 
17125
      public String getFieldName() {
17126
        return _fieldName;
17127
      }
17128
    }
17129
 
17130
    // isset id assignments
17131
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
17132
    private static final int __AMOUNT_ISSET_ID = 1;
17133
    private static final int __XFERDATE_ISSET_ID = 2;
17134
    private BitSet __isset_bit_vector = new BitSet(3);
17135
 
17136
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17137
    static {
17138
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17139
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17140
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17141
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17142
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
17143
      tmpMap.put(_Fields.XFER_BY, new org.apache.thrift.meta_data.FieldMetaData("xferBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17144
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17145
      tmpMap.put(_Fields.XFER_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("xferTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17146
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17147
      tmpMap.put(_Fields.XFER_DATE, new org.apache.thrift.meta_data.FieldMetaData("xferDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17148
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17149
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17150
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_args.class, metaDataMap);
17151
    }
17152
 
17153
    public partiallyCapturePayment_args() {
17154
    }
17155
 
17156
    public partiallyCapturePayment_args(
17157
      long merchantTxnId,
17158
      double amount,
17159
      String xferBy,
17160
      String xferTxnId,
17161
      long xferDate)
17162
    {
17163
      this();
17164
      this.merchantTxnId = merchantTxnId;
17165
      setMerchantTxnIdIsSet(true);
17166
      this.amount = amount;
17167
      setAmountIsSet(true);
17168
      this.xferBy = xferBy;
17169
      this.xferTxnId = xferTxnId;
17170
      this.xferDate = xferDate;
17171
      setXferDateIsSet(true);
17172
    }
17173
 
17174
    /**
17175
     * Performs a deep copy on <i>other</i>.
17176
     */
17177
    public partiallyCapturePayment_args(partiallyCapturePayment_args other) {
17178
      __isset_bit_vector.clear();
17179
      __isset_bit_vector.or(other.__isset_bit_vector);
17180
      this.merchantTxnId = other.merchantTxnId;
17181
      this.amount = other.amount;
17182
      if (other.isSetXferBy()) {
17183
        this.xferBy = other.xferBy;
17184
      }
17185
      if (other.isSetXferTxnId()) {
17186
        this.xferTxnId = other.xferTxnId;
17187
      }
17188
      this.xferDate = other.xferDate;
17189
    }
17190
 
17191
    public partiallyCapturePayment_args deepCopy() {
17192
      return new partiallyCapturePayment_args(this);
17193
    }
17194
 
17195
    @Override
17196
    public void clear() {
17197
      setMerchantTxnIdIsSet(false);
17198
      this.merchantTxnId = 0;
17199
      setAmountIsSet(false);
17200
      this.amount = 0.0;
17201
      this.xferBy = null;
17202
      this.xferTxnId = null;
17203
      setXferDateIsSet(false);
17204
      this.xferDate = 0;
17205
    }
17206
 
17207
    public long getMerchantTxnId() {
17208
      return this.merchantTxnId;
17209
    }
17210
 
17211
    public void setMerchantTxnId(long merchantTxnId) {
17212
      this.merchantTxnId = merchantTxnId;
17213
      setMerchantTxnIdIsSet(true);
17214
    }
17215
 
17216
    public void unsetMerchantTxnId() {
17217
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
17218
    }
17219
 
17220
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
17221
    public boolean isSetMerchantTxnId() {
17222
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
17223
    }
17224
 
17225
    public void setMerchantTxnIdIsSet(boolean value) {
17226
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
17227
    }
17228
 
17229
    public double getAmount() {
17230
      return this.amount;
17231
    }
17232
 
17233
    public void setAmount(double amount) {
17234
      this.amount = amount;
17235
      setAmountIsSet(true);
17236
    }
17237
 
17238
    public void unsetAmount() {
17239
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
17240
    }
17241
 
17242
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
17243
    public boolean isSetAmount() {
17244
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
17245
    }
17246
 
17247
    public void setAmountIsSet(boolean value) {
17248
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
17249
    }
17250
 
17251
    public String getXferBy() {
17252
      return this.xferBy;
17253
    }
17254
 
17255
    public void setXferBy(String xferBy) {
17256
      this.xferBy = xferBy;
17257
    }
17258
 
17259
    public void unsetXferBy() {
17260
      this.xferBy = null;
17261
    }
17262
 
17263
    /** Returns true if field xferBy is set (has been assigned a value) and false otherwise */
17264
    public boolean isSetXferBy() {
17265
      return this.xferBy != null;
17266
    }
17267
 
17268
    public void setXferByIsSet(boolean value) {
17269
      if (!value) {
17270
        this.xferBy = null;
17271
      }
17272
    }
17273
 
17274
    public String getXferTxnId() {
17275
      return this.xferTxnId;
17276
    }
17277
 
17278
    public void setXferTxnId(String xferTxnId) {
17279
      this.xferTxnId = xferTxnId;
17280
    }
17281
 
17282
    public void unsetXferTxnId() {
17283
      this.xferTxnId = null;
17284
    }
17285
 
17286
    /** Returns true if field xferTxnId is set (has been assigned a value) and false otherwise */
17287
    public boolean isSetXferTxnId() {
17288
      return this.xferTxnId != null;
17289
    }
17290
 
17291
    public void setXferTxnIdIsSet(boolean value) {
17292
      if (!value) {
17293
        this.xferTxnId = null;
17294
      }
17295
    }
17296
 
17297
    public long getXferDate() {
17298
      return this.xferDate;
17299
    }
17300
 
17301
    public void setXferDate(long xferDate) {
17302
      this.xferDate = xferDate;
17303
      setXferDateIsSet(true);
17304
    }
17305
 
17306
    public void unsetXferDate() {
17307
      __isset_bit_vector.clear(__XFERDATE_ISSET_ID);
17308
    }
17309
 
17310
    /** Returns true if field xferDate is set (has been assigned a value) and false otherwise */
17311
    public boolean isSetXferDate() {
17312
      return __isset_bit_vector.get(__XFERDATE_ISSET_ID);
17313
    }
17314
 
17315
    public void setXferDateIsSet(boolean value) {
17316
      __isset_bit_vector.set(__XFERDATE_ISSET_ID, value);
17317
    }
17318
 
17319
    public void setFieldValue(_Fields field, Object value) {
17320
      switch (field) {
17321
      case MERCHANT_TXN_ID:
17322
        if (value == null) {
17323
          unsetMerchantTxnId();
17324
        } else {
17325
          setMerchantTxnId((Long)value);
17326
        }
17327
        break;
17328
 
17329
      case AMOUNT:
17330
        if (value == null) {
17331
          unsetAmount();
17332
        } else {
17333
          setAmount((Double)value);
17334
        }
17335
        break;
17336
 
17337
      case XFER_BY:
17338
        if (value == null) {
17339
          unsetXferBy();
17340
        } else {
17341
          setXferBy((String)value);
17342
        }
17343
        break;
17344
 
17345
      case XFER_TXN_ID:
17346
        if (value == null) {
17347
          unsetXferTxnId();
17348
        } else {
17349
          setXferTxnId((String)value);
17350
        }
17351
        break;
17352
 
17353
      case XFER_DATE:
17354
        if (value == null) {
17355
          unsetXferDate();
17356
        } else {
17357
          setXferDate((Long)value);
17358
        }
17359
        break;
17360
 
17361
      }
17362
    }
17363
 
17364
    public Object getFieldValue(_Fields field) {
17365
      switch (field) {
17366
      case MERCHANT_TXN_ID:
17367
        return Long.valueOf(getMerchantTxnId());
17368
 
17369
      case AMOUNT:
17370
        return Double.valueOf(getAmount());
17371
 
17372
      case XFER_BY:
17373
        return getXferBy();
17374
 
17375
      case XFER_TXN_ID:
17376
        return getXferTxnId();
17377
 
17378
      case XFER_DATE:
17379
        return Long.valueOf(getXferDate());
17380
 
17381
      }
17382
      throw new IllegalStateException();
17383
    }
17384
 
17385
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17386
    public boolean isSet(_Fields field) {
17387
      if (field == null) {
17388
        throw new IllegalArgumentException();
17389
      }
17390
 
17391
      switch (field) {
17392
      case MERCHANT_TXN_ID:
17393
        return isSetMerchantTxnId();
17394
      case AMOUNT:
17395
        return isSetAmount();
17396
      case XFER_BY:
17397
        return isSetXferBy();
17398
      case XFER_TXN_ID:
17399
        return isSetXferTxnId();
17400
      case XFER_DATE:
17401
        return isSetXferDate();
17402
      }
17403
      throw new IllegalStateException();
17404
    }
17405
 
17406
    @Override
17407
    public boolean equals(Object that) {
17408
      if (that == null)
17409
        return false;
17410
      if (that instanceof partiallyCapturePayment_args)
17411
        return this.equals((partiallyCapturePayment_args)that);
17412
      return false;
17413
    }
17414
 
17415
    public boolean equals(partiallyCapturePayment_args that) {
17416
      if (that == null)
17417
        return false;
17418
 
17419
      boolean this_present_merchantTxnId = true;
17420
      boolean that_present_merchantTxnId = true;
17421
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
17422
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
17423
          return false;
17424
        if (this.merchantTxnId != that.merchantTxnId)
17425
          return false;
17426
      }
17427
 
17428
      boolean this_present_amount = true;
17429
      boolean that_present_amount = true;
17430
      if (this_present_amount || that_present_amount) {
17431
        if (!(this_present_amount && that_present_amount))
17432
          return false;
17433
        if (this.amount != that.amount)
17434
          return false;
17435
      }
17436
 
17437
      boolean this_present_xferBy = true && this.isSetXferBy();
17438
      boolean that_present_xferBy = true && that.isSetXferBy();
17439
      if (this_present_xferBy || that_present_xferBy) {
17440
        if (!(this_present_xferBy && that_present_xferBy))
17441
          return false;
17442
        if (!this.xferBy.equals(that.xferBy))
17443
          return false;
17444
      }
17445
 
17446
      boolean this_present_xferTxnId = true && this.isSetXferTxnId();
17447
      boolean that_present_xferTxnId = true && that.isSetXferTxnId();
17448
      if (this_present_xferTxnId || that_present_xferTxnId) {
17449
        if (!(this_present_xferTxnId && that_present_xferTxnId))
17450
          return false;
17451
        if (!this.xferTxnId.equals(that.xferTxnId))
17452
          return false;
17453
      }
17454
 
17455
      boolean this_present_xferDate = true;
17456
      boolean that_present_xferDate = true;
17457
      if (this_present_xferDate || that_present_xferDate) {
17458
        if (!(this_present_xferDate && that_present_xferDate))
17459
          return false;
17460
        if (this.xferDate != that.xferDate)
17461
          return false;
17462
      }
17463
 
17464
      return true;
17465
    }
17466
 
17467
    @Override
17468
    public int hashCode() {
17469
      return 0;
17470
    }
17471
 
17472
    public int compareTo(partiallyCapturePayment_args other) {
17473
      if (!getClass().equals(other.getClass())) {
17474
        return getClass().getName().compareTo(other.getClass().getName());
17475
      }
17476
 
17477
      int lastComparison = 0;
17478
      partiallyCapturePayment_args typedOther = (partiallyCapturePayment_args)other;
17479
 
17480
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
17481
      if (lastComparison != 0) {
17482
        return lastComparison;
17483
      }
17484
      if (isSetMerchantTxnId()) {
17485
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
17486
        if (lastComparison != 0) {
17487
          return lastComparison;
17488
        }
17489
      }
17490
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
17491
      if (lastComparison != 0) {
17492
        return lastComparison;
17493
      }
17494
      if (isSetAmount()) {
17495
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
17496
        if (lastComparison != 0) {
17497
          return lastComparison;
17498
        }
17499
      }
17500
      lastComparison = Boolean.valueOf(isSetXferBy()).compareTo(typedOther.isSetXferBy());
17501
      if (lastComparison != 0) {
17502
        return lastComparison;
17503
      }
17504
      if (isSetXferBy()) {
17505
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferBy, typedOther.xferBy);
17506
        if (lastComparison != 0) {
17507
          return lastComparison;
17508
        }
17509
      }
17510
      lastComparison = Boolean.valueOf(isSetXferTxnId()).compareTo(typedOther.isSetXferTxnId());
17511
      if (lastComparison != 0) {
17512
        return lastComparison;
17513
      }
17514
      if (isSetXferTxnId()) {
17515
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferTxnId, typedOther.xferTxnId);
17516
        if (lastComparison != 0) {
17517
          return lastComparison;
17518
        }
17519
      }
17520
      lastComparison = Boolean.valueOf(isSetXferDate()).compareTo(typedOther.isSetXferDate());
17521
      if (lastComparison != 0) {
17522
        return lastComparison;
17523
      }
17524
      if (isSetXferDate()) {
17525
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferDate, typedOther.xferDate);
17526
        if (lastComparison != 0) {
17527
          return lastComparison;
17528
        }
17529
      }
17530
      return 0;
17531
    }
17532
 
17533
    public _Fields fieldForId(int fieldId) {
17534
      return _Fields.findByThriftId(fieldId);
17535
    }
17536
 
17537
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17538
      org.apache.thrift.protocol.TField field;
17539
      iprot.readStructBegin();
17540
      while (true)
17541
      {
17542
        field = iprot.readFieldBegin();
17543
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17544
          break;
17545
        }
17546
        switch (field.id) {
17547
          case 1: // MERCHANT_TXN_ID
17548
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17549
              this.merchantTxnId = iprot.readI64();
17550
              setMerchantTxnIdIsSet(true);
17551
            } else { 
17552
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17553
            }
17554
            break;
17555
          case 2: // AMOUNT
17556
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
17557
              this.amount = iprot.readDouble();
17558
              setAmountIsSet(true);
17559
            } else { 
17560
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17561
            }
17562
            break;
17563
          case 3: // XFER_BY
17564
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17565
              this.xferBy = iprot.readString();
17566
            } else { 
17567
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17568
            }
17569
            break;
17570
          case 4: // XFER_TXN_ID
17571
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17572
              this.xferTxnId = iprot.readString();
17573
            } else { 
17574
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17575
            }
17576
            break;
17577
          case 5: // XFER_DATE
17578
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17579
              this.xferDate = iprot.readI64();
17580
              setXferDateIsSet(true);
17581
            } else { 
17582
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17583
            }
17584
            break;
17585
          default:
17586
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17587
        }
17588
        iprot.readFieldEnd();
17589
      }
17590
      iprot.readStructEnd();
17591
      validate();
17592
    }
17593
 
17594
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17595
      validate();
17596
 
17597
      oprot.writeStructBegin(STRUCT_DESC);
17598
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
17599
      oprot.writeI64(this.merchantTxnId);
17600
      oprot.writeFieldEnd();
17601
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
17602
      oprot.writeDouble(this.amount);
17603
      oprot.writeFieldEnd();
17604
      if (this.xferBy != null) {
17605
        oprot.writeFieldBegin(XFER_BY_FIELD_DESC);
17606
        oprot.writeString(this.xferBy);
17607
        oprot.writeFieldEnd();
17608
      }
17609
      if (this.xferTxnId != null) {
17610
        oprot.writeFieldBegin(XFER_TXN_ID_FIELD_DESC);
17611
        oprot.writeString(this.xferTxnId);
17612
        oprot.writeFieldEnd();
17613
      }
17614
      oprot.writeFieldBegin(XFER_DATE_FIELD_DESC);
17615
      oprot.writeI64(this.xferDate);
17616
      oprot.writeFieldEnd();
17617
      oprot.writeFieldStop();
17618
      oprot.writeStructEnd();
17619
    }
17620
 
17621
    @Override
17622
    public String toString() {
17623
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_args(");
17624
      boolean first = true;
17625
 
17626
      sb.append("merchantTxnId:");
17627
      sb.append(this.merchantTxnId);
17628
      first = false;
17629
      if (!first) sb.append(", ");
17630
      sb.append("amount:");
17631
      sb.append(this.amount);
17632
      first = false;
17633
      if (!first) sb.append(", ");
17634
      sb.append("xferBy:");
17635
      if (this.xferBy == null) {
17636
        sb.append("null");
17637
      } else {
17638
        sb.append(this.xferBy);
17639
      }
17640
      first = false;
17641
      if (!first) sb.append(", ");
17642
      sb.append("xferTxnId:");
17643
      if (this.xferTxnId == null) {
17644
        sb.append("null");
17645
      } else {
17646
        sb.append(this.xferTxnId);
17647
      }
17648
      first = false;
17649
      if (!first) sb.append(", ");
17650
      sb.append("xferDate:");
17651
      sb.append(this.xferDate);
17652
      first = false;
17653
      sb.append(")");
17654
      return sb.toString();
17655
    }
17656
 
17657
    public void validate() throws org.apache.thrift.TException {
17658
      // check for required fields
17659
    }
17660
 
17661
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17662
      try {
17663
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17664
      } catch (org.apache.thrift.TException te) {
17665
        throw new java.io.IOException(te);
17666
      }
17667
    }
17668
 
17669
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17670
      try {
9506 amit.gupta 17671
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17672
        __isset_bit_vector = new BitSet(1);
3956 chandransh 17673
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17674
      } catch (org.apache.thrift.TException te) {
17675
        throw new java.io.IOException(te);
17676
      }
17677
    }
17678
 
17679
  }
17680
 
17681
  public static class partiallyCapturePayment_result implements org.apache.thrift.TBase<partiallyCapturePayment_result, partiallyCapturePayment_result._Fields>, java.io.Serializable, Cloneable   {
17682
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_result");
17683
 
17684
    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);
17685
    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);
17686
 
17687
    private boolean success; // required
17688
    private PaymentException pe; // required
17689
 
17690
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17691
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17692
      SUCCESS((short)0, "success"),
17693
      PE((short)1, "pe");
17694
 
17695
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17696
 
17697
      static {
17698
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17699
          byName.put(field.getFieldName(), field);
17700
        }
17701
      }
17702
 
17703
      /**
17704
       * Find the _Fields constant that matches fieldId, or null if its not found.
17705
       */
17706
      public static _Fields findByThriftId(int fieldId) {
17707
        switch(fieldId) {
17708
          case 0: // SUCCESS
17709
            return SUCCESS;
17710
          case 1: // PE
17711
            return PE;
17712
          default:
17713
            return null;
17714
        }
17715
      }
17716
 
17717
      /**
17718
       * Find the _Fields constant that matches fieldId, throwing an exception
17719
       * if it is not found.
17720
       */
17721
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17722
        _Fields fields = findByThriftId(fieldId);
17723
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17724
        return fields;
17725
      }
17726
 
17727
      /**
17728
       * Find the _Fields constant that matches name, or null if its not found.
17729
       */
17730
      public static _Fields findByName(String name) {
17731
        return byName.get(name);
17732
      }
17733
 
17734
      private final short _thriftId;
17735
      private final String _fieldName;
17736
 
17737
      _Fields(short thriftId, String fieldName) {
17738
        _thriftId = thriftId;
17739
        _fieldName = fieldName;
17740
      }
17741
 
17742
      public short getThriftFieldId() {
17743
        return _thriftId;
17744
      }
17745
 
17746
      public String getFieldName() {
17747
        return _fieldName;
17748
      }
17749
    }
17750
 
17751
    // isset id assignments
17752
    private static final int __SUCCESS_ISSET_ID = 0;
17753
    private BitSet __isset_bit_vector = new BitSet(1);
17754
 
17755
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17756
    static {
17757
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17758
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17759
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
17760
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17761
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
17762
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17763
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_result.class, metaDataMap);
17764
    }
17765
 
17766
    public partiallyCapturePayment_result() {
17767
    }
17768
 
17769
    public partiallyCapturePayment_result(
17770
      boolean success,
17771
      PaymentException pe)
17772
    {
17773
      this();
17774
      this.success = success;
17775
      setSuccessIsSet(true);
17776
      this.pe = pe;
17777
    }
17778
 
17779
    /**
17780
     * Performs a deep copy on <i>other</i>.
17781
     */
17782
    public partiallyCapturePayment_result(partiallyCapturePayment_result other) {
17783
      __isset_bit_vector.clear();
17784
      __isset_bit_vector.or(other.__isset_bit_vector);
17785
      this.success = other.success;
17786
      if (other.isSetPe()) {
17787
        this.pe = new PaymentException(other.pe);
17788
      }
17789
    }
17790
 
17791
    public partiallyCapturePayment_result deepCopy() {
17792
      return new partiallyCapturePayment_result(this);
17793
    }
17794
 
17795
    @Override
17796
    public void clear() {
17797
      setSuccessIsSet(false);
17798
      this.success = false;
17799
      this.pe = null;
17800
    }
17801
 
17802
    public boolean isSuccess() {
17803
      return this.success;
17804
    }
17805
 
17806
    public void setSuccess(boolean success) {
17807
      this.success = success;
17808
      setSuccessIsSet(true);
17809
    }
17810
 
17811
    public void unsetSuccess() {
17812
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17813
    }
17814
 
17815
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17816
    public boolean isSetSuccess() {
17817
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17818
    }
17819
 
17820
    public void setSuccessIsSet(boolean value) {
17821
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17822
    }
17823
 
17824
    public PaymentException getPe() {
17825
      return this.pe;
17826
    }
17827
 
17828
    public void setPe(PaymentException pe) {
17829
      this.pe = pe;
17830
    }
17831
 
17832
    public void unsetPe() {
17833
      this.pe = null;
17834
    }
17835
 
17836
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
17837
    public boolean isSetPe() {
17838
      return this.pe != null;
17839
    }
17840
 
17841
    public void setPeIsSet(boolean value) {
17842
      if (!value) {
17843
        this.pe = null;
17844
      }
17845
    }
17846
 
17847
    public void setFieldValue(_Fields field, Object value) {
17848
      switch (field) {
17849
      case SUCCESS:
17850
        if (value == null) {
17851
          unsetSuccess();
17852
        } else {
17853
          setSuccess((Boolean)value);
17854
        }
17855
        break;
17856
 
17857
      case PE:
17858
        if (value == null) {
17859
          unsetPe();
17860
        } else {
17861
          setPe((PaymentException)value);
17862
        }
17863
        break;
17864
 
17865
      }
17866
    }
17867
 
17868
    public Object getFieldValue(_Fields field) {
17869
      switch (field) {
17870
      case SUCCESS:
17871
        return Boolean.valueOf(isSuccess());
17872
 
17873
      case PE:
17874
        return getPe();
17875
 
17876
      }
17877
      throw new IllegalStateException();
17878
    }
17879
 
17880
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17881
    public boolean isSet(_Fields field) {
17882
      if (field == null) {
17883
        throw new IllegalArgumentException();
17884
      }
17885
 
17886
      switch (field) {
17887
      case SUCCESS:
17888
        return isSetSuccess();
17889
      case PE:
17890
        return isSetPe();
17891
      }
17892
      throw new IllegalStateException();
17893
    }
17894
 
17895
    @Override
17896
    public boolean equals(Object that) {
17897
      if (that == null)
17898
        return false;
17899
      if (that instanceof partiallyCapturePayment_result)
17900
        return this.equals((partiallyCapturePayment_result)that);
17901
      return false;
17902
    }
17903
 
17904
    public boolean equals(partiallyCapturePayment_result that) {
17905
      if (that == null)
17906
        return false;
17907
 
17908
      boolean this_present_success = true;
17909
      boolean that_present_success = true;
17910
      if (this_present_success || that_present_success) {
17911
        if (!(this_present_success && that_present_success))
17912
          return false;
17913
        if (this.success != that.success)
17914
          return false;
17915
      }
17916
 
17917
      boolean this_present_pe = true && this.isSetPe();
17918
      boolean that_present_pe = true && that.isSetPe();
17919
      if (this_present_pe || that_present_pe) {
17920
        if (!(this_present_pe && that_present_pe))
17921
          return false;
17922
        if (!this.pe.equals(that.pe))
17923
          return false;
17924
      }
17925
 
17926
      return true;
17927
    }
17928
 
17929
    @Override
17930
    public int hashCode() {
17931
      return 0;
17932
    }
17933
 
17934
    public int compareTo(partiallyCapturePayment_result other) {
17935
      if (!getClass().equals(other.getClass())) {
17936
        return getClass().getName().compareTo(other.getClass().getName());
17937
      }
17938
 
17939
      int lastComparison = 0;
17940
      partiallyCapturePayment_result typedOther = (partiallyCapturePayment_result)other;
17941
 
17942
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17943
      if (lastComparison != 0) {
17944
        return lastComparison;
17945
      }
17946
      if (isSetSuccess()) {
17947
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17948
        if (lastComparison != 0) {
17949
          return lastComparison;
17950
        }
17951
      }
17952
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
17953
      if (lastComparison != 0) {
17954
        return lastComparison;
17955
      }
17956
      if (isSetPe()) {
17957
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
17958
        if (lastComparison != 0) {
17959
          return lastComparison;
17960
        }
17961
      }
17962
      return 0;
17963
    }
17964
 
17965
    public _Fields fieldForId(int fieldId) {
17966
      return _Fields.findByThriftId(fieldId);
17967
    }
17968
 
17969
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17970
      org.apache.thrift.protocol.TField field;
17971
      iprot.readStructBegin();
17972
      while (true)
17973
      {
17974
        field = iprot.readFieldBegin();
17975
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17976
          break;
17977
        }
17978
        switch (field.id) {
17979
          case 0: // SUCCESS
17980
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
17981
              this.success = iprot.readBool();
17982
              setSuccessIsSet(true);
17983
            } else { 
17984
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17985
            }
17986
            break;
17987
          case 1: // PE
17988
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
17989
              this.pe = new PaymentException();
17990
              this.pe.read(iprot);
17991
            } else { 
17992
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17993
            }
17994
            break;
17995
          default:
17996
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17997
        }
17998
        iprot.readFieldEnd();
17999
      }
18000
      iprot.readStructEnd();
18001
      validate();
18002
    }
18003
 
18004
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18005
      oprot.writeStructBegin(STRUCT_DESC);
18006
 
18007
      if (this.isSetSuccess()) {
18008
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18009
        oprot.writeBool(this.success);
18010
        oprot.writeFieldEnd();
18011
      } else if (this.isSetPe()) {
18012
        oprot.writeFieldBegin(PE_FIELD_DESC);
18013
        this.pe.write(oprot);
18014
        oprot.writeFieldEnd();
18015
      }
18016
      oprot.writeFieldStop();
18017
      oprot.writeStructEnd();
18018
    }
18019
 
18020
    @Override
18021
    public String toString() {
18022
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_result(");
18023
      boolean first = true;
18024
 
18025
      sb.append("success:");
18026
      sb.append(this.success);
18027
      first = false;
18028
      if (!first) sb.append(", ");
18029
      sb.append("pe:");
18030
      if (this.pe == null) {
18031
        sb.append("null");
18032
      } else {
18033
        sb.append(this.pe);
18034
      }
18035
      first = false;
18036
      sb.append(")");
18037
      return sb.toString();
18038
    }
18039
 
18040
    public void validate() throws org.apache.thrift.TException {
18041
      // check for required fields
18042
    }
18043
 
18044
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18045
      try {
18046
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18047
      } catch (org.apache.thrift.TException te) {
18048
        throw new java.io.IOException(te);
18049
      }
18050
    }
18051
 
18052
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18053
      try {
18054
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18055
      } catch (org.apache.thrift.TException te) {
18056
        throw new java.io.IOException(te);
18057
      }
18058
    }
18059
 
18060
  }
18061
 
4008 mandeep.dh 18062
  public static class getPaymentsRequiringExtraProcessing_args implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_args, getPaymentsRequiringExtraProcessing_args._Fields>, java.io.Serializable, Cloneable   {
18063
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_args");
18064
 
18065
    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);
18066
 
18067
    private ExtraPaymentProcessingType category; // required
18068
 
18069
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18070
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18071
      /**
18072
       * 
18073
       * @see ExtraPaymentProcessingType
18074
       */
18075
      CATEGORY((short)1, "category");
18076
 
18077
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18078
 
18079
      static {
18080
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18081
          byName.put(field.getFieldName(), field);
18082
        }
18083
      }
18084
 
18085
      /**
18086
       * Find the _Fields constant that matches fieldId, or null if its not found.
18087
       */
18088
      public static _Fields findByThriftId(int fieldId) {
18089
        switch(fieldId) {
18090
          case 1: // CATEGORY
18091
            return CATEGORY;
18092
          default:
18093
            return null;
18094
        }
18095
      }
18096
 
18097
      /**
18098
       * Find the _Fields constant that matches fieldId, throwing an exception
18099
       * if it is not found.
18100
       */
18101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18102
        _Fields fields = findByThriftId(fieldId);
18103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18104
        return fields;
18105
      }
18106
 
18107
      /**
18108
       * Find the _Fields constant that matches name, or null if its not found.
18109
       */
18110
      public static _Fields findByName(String name) {
18111
        return byName.get(name);
18112
      }
18113
 
18114
      private final short _thriftId;
18115
      private final String _fieldName;
18116
 
18117
      _Fields(short thriftId, String fieldName) {
18118
        _thriftId = thriftId;
18119
        _fieldName = fieldName;
18120
      }
18121
 
18122
      public short getThriftFieldId() {
18123
        return _thriftId;
18124
      }
18125
 
18126
      public String getFieldName() {
18127
        return _fieldName;
18128
      }
18129
    }
18130
 
18131
    // isset id assignments
18132
 
18133
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18134
    static {
18135
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18136
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18137
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
18138
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18139
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_args.class, metaDataMap);
18140
    }
18141
 
18142
    public getPaymentsRequiringExtraProcessing_args() {
18143
    }
18144
 
18145
    public getPaymentsRequiringExtraProcessing_args(
18146
      ExtraPaymentProcessingType category)
18147
    {
18148
      this();
18149
      this.category = category;
18150
    }
18151
 
18152
    /**
18153
     * Performs a deep copy on <i>other</i>.
18154
     */
18155
    public getPaymentsRequiringExtraProcessing_args(getPaymentsRequiringExtraProcessing_args other) {
18156
      if (other.isSetCategory()) {
18157
        this.category = other.category;
18158
      }
18159
    }
18160
 
18161
    public getPaymentsRequiringExtraProcessing_args deepCopy() {
18162
      return new getPaymentsRequiringExtraProcessing_args(this);
18163
    }
18164
 
18165
    @Override
18166
    public void clear() {
18167
      this.category = null;
18168
    }
18169
 
18170
    /**
18171
     * 
18172
     * @see ExtraPaymentProcessingType
18173
     */
18174
    public ExtraPaymentProcessingType getCategory() {
18175
      return this.category;
18176
    }
18177
 
18178
    /**
18179
     * 
18180
     * @see ExtraPaymentProcessingType
18181
     */
18182
    public void setCategory(ExtraPaymentProcessingType category) {
18183
      this.category = category;
18184
    }
18185
 
18186
    public void unsetCategory() {
18187
      this.category = null;
18188
    }
18189
 
18190
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
18191
    public boolean isSetCategory() {
18192
      return this.category != null;
18193
    }
18194
 
18195
    public void setCategoryIsSet(boolean value) {
18196
      if (!value) {
18197
        this.category = null;
18198
      }
18199
    }
18200
 
18201
    public void setFieldValue(_Fields field, Object value) {
18202
      switch (field) {
18203
      case CATEGORY:
18204
        if (value == null) {
18205
          unsetCategory();
18206
        } else {
18207
          setCategory((ExtraPaymentProcessingType)value);
18208
        }
18209
        break;
18210
 
18211
      }
18212
    }
18213
 
18214
    public Object getFieldValue(_Fields field) {
18215
      switch (field) {
18216
      case CATEGORY:
18217
        return getCategory();
18218
 
18219
      }
18220
      throw new IllegalStateException();
18221
    }
18222
 
18223
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18224
    public boolean isSet(_Fields field) {
18225
      if (field == null) {
18226
        throw new IllegalArgumentException();
18227
      }
18228
 
18229
      switch (field) {
18230
      case CATEGORY:
18231
        return isSetCategory();
18232
      }
18233
      throw new IllegalStateException();
18234
    }
18235
 
18236
    @Override
18237
    public boolean equals(Object that) {
18238
      if (that == null)
18239
        return false;
18240
      if (that instanceof getPaymentsRequiringExtraProcessing_args)
18241
        return this.equals((getPaymentsRequiringExtraProcessing_args)that);
18242
      return false;
18243
    }
18244
 
18245
    public boolean equals(getPaymentsRequiringExtraProcessing_args that) {
18246
      if (that == null)
18247
        return false;
18248
 
18249
      boolean this_present_category = true && this.isSetCategory();
18250
      boolean that_present_category = true && that.isSetCategory();
18251
      if (this_present_category || that_present_category) {
18252
        if (!(this_present_category && that_present_category))
18253
          return false;
18254
        if (!this.category.equals(that.category))
18255
          return false;
18256
      }
18257
 
18258
      return true;
18259
    }
18260
 
18261
    @Override
18262
    public int hashCode() {
18263
      return 0;
18264
    }
18265
 
18266
    public int compareTo(getPaymentsRequiringExtraProcessing_args other) {
18267
      if (!getClass().equals(other.getClass())) {
18268
        return getClass().getName().compareTo(other.getClass().getName());
18269
      }
18270
 
18271
      int lastComparison = 0;
18272
      getPaymentsRequiringExtraProcessing_args typedOther = (getPaymentsRequiringExtraProcessing_args)other;
18273
 
18274
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
18275
      if (lastComparison != 0) {
18276
        return lastComparison;
18277
      }
18278
      if (isSetCategory()) {
18279
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
18280
        if (lastComparison != 0) {
18281
          return lastComparison;
18282
        }
18283
      }
18284
      return 0;
18285
    }
18286
 
18287
    public _Fields fieldForId(int fieldId) {
18288
      return _Fields.findByThriftId(fieldId);
18289
    }
18290
 
18291
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18292
      org.apache.thrift.protocol.TField field;
18293
      iprot.readStructBegin();
18294
      while (true)
18295
      {
18296
        field = iprot.readFieldBegin();
18297
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18298
          break;
18299
        }
18300
        switch (field.id) {
18301
          case 1: // CATEGORY
18302
            if (field.type == org.apache.thrift.protocol.TType.I32) {
18303
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
18304
            } else { 
18305
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18306
            }
18307
            break;
18308
          default:
18309
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18310
        }
18311
        iprot.readFieldEnd();
18312
      }
18313
      iprot.readStructEnd();
18314
      validate();
18315
    }
18316
 
18317
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18318
      validate();
18319
 
18320
      oprot.writeStructBegin(STRUCT_DESC);
18321
      if (this.category != null) {
18322
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
18323
        oprot.writeI32(this.category.getValue());
18324
        oprot.writeFieldEnd();
18325
      }
18326
      oprot.writeFieldStop();
18327
      oprot.writeStructEnd();
18328
    }
18329
 
18330
    @Override
18331
    public String toString() {
18332
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_args(");
18333
      boolean first = true;
18334
 
18335
      sb.append("category:");
18336
      if (this.category == null) {
18337
        sb.append("null");
18338
      } else {
18339
        sb.append(this.category);
18340
      }
18341
      first = false;
18342
      sb.append(")");
18343
      return sb.toString();
18344
    }
18345
 
18346
    public void validate() throws org.apache.thrift.TException {
18347
      // check for required fields
18348
    }
18349
 
18350
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18351
      try {
18352
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18353
      } catch (org.apache.thrift.TException te) {
18354
        throw new java.io.IOException(te);
18355
      }
18356
    }
18357
 
18358
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18359
      try {
18360
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18361
      } catch (org.apache.thrift.TException te) {
18362
        throw new java.io.IOException(te);
18363
      }
18364
    }
18365
 
18366
  }
18367
 
18368
  public static class getPaymentsRequiringExtraProcessing_result implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_result, getPaymentsRequiringExtraProcessing_result._Fields>, java.io.Serializable, Cloneable   {
18369
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_result");
18370
 
18371
    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);
18372
 
18373
    private List<Long> success; // required
18374
 
18375
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18376
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18377
      SUCCESS((short)0, "success");
18378
 
18379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18380
 
18381
      static {
18382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18383
          byName.put(field.getFieldName(), field);
18384
        }
18385
      }
18386
 
18387
      /**
18388
       * Find the _Fields constant that matches fieldId, or null if its not found.
18389
       */
18390
      public static _Fields findByThriftId(int fieldId) {
18391
        switch(fieldId) {
18392
          case 0: // SUCCESS
18393
            return SUCCESS;
18394
          default:
18395
            return null;
18396
        }
18397
      }
18398
 
18399
      /**
18400
       * Find the _Fields constant that matches fieldId, throwing an exception
18401
       * if it is not found.
18402
       */
18403
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18404
        _Fields fields = findByThriftId(fieldId);
18405
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18406
        return fields;
18407
      }
18408
 
18409
      /**
18410
       * Find the _Fields constant that matches name, or null if its not found.
18411
       */
18412
      public static _Fields findByName(String name) {
18413
        return byName.get(name);
18414
      }
18415
 
18416
      private final short _thriftId;
18417
      private final String _fieldName;
18418
 
18419
      _Fields(short thriftId, String fieldName) {
18420
        _thriftId = thriftId;
18421
        _fieldName = fieldName;
18422
      }
18423
 
18424
      public short getThriftFieldId() {
18425
        return _thriftId;
18426
      }
18427
 
18428
      public String getFieldName() {
18429
        return _fieldName;
18430
      }
18431
    }
18432
 
18433
    // isset id assignments
18434
 
18435
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18436
    static {
18437
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18438
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18439
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18440
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
18441
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18442
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_result.class, metaDataMap);
18443
    }
18444
 
18445
    public getPaymentsRequiringExtraProcessing_result() {
18446
    }
18447
 
18448
    public getPaymentsRequiringExtraProcessing_result(
18449
      List<Long> success)
18450
    {
18451
      this();
18452
      this.success = success;
18453
    }
18454
 
18455
    /**
18456
     * Performs a deep copy on <i>other</i>.
18457
     */
18458
    public getPaymentsRequiringExtraProcessing_result(getPaymentsRequiringExtraProcessing_result other) {
18459
      if (other.isSetSuccess()) {
18460
        List<Long> __this__success = new ArrayList<Long>();
18461
        for (Long other_element : other.success) {
18462
          __this__success.add(other_element);
18463
        }
18464
        this.success = __this__success;
18465
      }
18466
    }
18467
 
18468
    public getPaymentsRequiringExtraProcessing_result deepCopy() {
18469
      return new getPaymentsRequiringExtraProcessing_result(this);
18470
    }
18471
 
18472
    @Override
18473
    public void clear() {
18474
      this.success = null;
18475
    }
18476
 
18477
    public int getSuccessSize() {
18478
      return (this.success == null) ? 0 : this.success.size();
18479
    }
18480
 
18481
    public java.util.Iterator<Long> getSuccessIterator() {
18482
      return (this.success == null) ? null : this.success.iterator();
18483
    }
18484
 
18485
    public void addToSuccess(long elem) {
18486
      if (this.success == null) {
18487
        this.success = new ArrayList<Long>();
18488
      }
18489
      this.success.add(elem);
18490
    }
18491
 
18492
    public List<Long> getSuccess() {
18493
      return this.success;
18494
    }
18495
 
18496
    public void setSuccess(List<Long> success) {
18497
      this.success = success;
18498
    }
18499
 
18500
    public void unsetSuccess() {
18501
      this.success = null;
18502
    }
18503
 
18504
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18505
    public boolean isSetSuccess() {
18506
      return this.success != null;
18507
    }
18508
 
18509
    public void setSuccessIsSet(boolean value) {
18510
      if (!value) {
18511
        this.success = null;
18512
      }
18513
    }
18514
 
18515
    public void setFieldValue(_Fields field, Object value) {
18516
      switch (field) {
18517
      case SUCCESS:
18518
        if (value == null) {
18519
          unsetSuccess();
18520
        } else {
18521
          setSuccess((List<Long>)value);
18522
        }
18523
        break;
18524
 
18525
      }
18526
    }
18527
 
18528
    public Object getFieldValue(_Fields field) {
18529
      switch (field) {
18530
      case SUCCESS:
18531
        return getSuccess();
18532
 
18533
      }
18534
      throw new IllegalStateException();
18535
    }
18536
 
18537
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18538
    public boolean isSet(_Fields field) {
18539
      if (field == null) {
18540
        throw new IllegalArgumentException();
18541
      }
18542
 
18543
      switch (field) {
18544
      case SUCCESS:
18545
        return isSetSuccess();
18546
      }
18547
      throw new IllegalStateException();
18548
    }
18549
 
18550
    @Override
18551
    public boolean equals(Object that) {
18552
      if (that == null)
18553
        return false;
18554
      if (that instanceof getPaymentsRequiringExtraProcessing_result)
18555
        return this.equals((getPaymentsRequiringExtraProcessing_result)that);
18556
      return false;
18557
    }
18558
 
18559
    public boolean equals(getPaymentsRequiringExtraProcessing_result that) {
18560
      if (that == null)
18561
        return false;
18562
 
18563
      boolean this_present_success = true && this.isSetSuccess();
18564
      boolean that_present_success = true && that.isSetSuccess();
18565
      if (this_present_success || that_present_success) {
18566
        if (!(this_present_success && that_present_success))
18567
          return false;
18568
        if (!this.success.equals(that.success))
18569
          return false;
18570
      }
18571
 
18572
      return true;
18573
    }
18574
 
18575
    @Override
18576
    public int hashCode() {
18577
      return 0;
18578
    }
18579
 
18580
    public int compareTo(getPaymentsRequiringExtraProcessing_result other) {
18581
      if (!getClass().equals(other.getClass())) {
18582
        return getClass().getName().compareTo(other.getClass().getName());
18583
      }
18584
 
18585
      int lastComparison = 0;
18586
      getPaymentsRequiringExtraProcessing_result typedOther = (getPaymentsRequiringExtraProcessing_result)other;
18587
 
18588
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18589
      if (lastComparison != 0) {
18590
        return lastComparison;
18591
      }
18592
      if (isSetSuccess()) {
18593
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18594
        if (lastComparison != 0) {
18595
          return lastComparison;
18596
        }
18597
      }
18598
      return 0;
18599
    }
18600
 
18601
    public _Fields fieldForId(int fieldId) {
18602
      return _Fields.findByThriftId(fieldId);
18603
    }
18604
 
18605
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18606
      org.apache.thrift.protocol.TField field;
18607
      iprot.readStructBegin();
18608
      while (true)
18609
      {
18610
        field = iprot.readFieldBegin();
18611
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18612
          break;
18613
        }
18614
        switch (field.id) {
18615
          case 0: // SUCCESS
18616
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18617
              {
7049 anupam.sin 18618
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
18619
                this.success = new ArrayList<Long>(_list44.size);
18620
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
4008 mandeep.dh 18621
                {
7049 anupam.sin 18622
                  long _elem46; // required
18623
                  _elem46 = iprot.readI64();
18624
                  this.success.add(_elem46);
4008 mandeep.dh 18625
                }
18626
                iprot.readListEnd();
18627
              }
18628
            } else { 
18629
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18630
            }
18631
            break;
18632
          default:
18633
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18634
        }
18635
        iprot.readFieldEnd();
18636
      }
18637
      iprot.readStructEnd();
18638
      validate();
18639
    }
18640
 
18641
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18642
      oprot.writeStructBegin(STRUCT_DESC);
18643
 
18644
      if (this.isSetSuccess()) {
18645
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18646
        {
18647
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
7049 anupam.sin 18648
          for (long _iter47 : this.success)
4008 mandeep.dh 18649
          {
7049 anupam.sin 18650
            oprot.writeI64(_iter47);
4008 mandeep.dh 18651
          }
18652
          oprot.writeListEnd();
18653
        }
18654
        oprot.writeFieldEnd();
18655
      }
18656
      oprot.writeFieldStop();
18657
      oprot.writeStructEnd();
18658
    }
18659
 
18660
    @Override
18661
    public String toString() {
18662
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_result(");
18663
      boolean first = true;
18664
 
18665
      sb.append("success:");
18666
      if (this.success == null) {
18667
        sb.append("null");
18668
      } else {
18669
        sb.append(this.success);
18670
      }
18671
      first = false;
18672
      sb.append(")");
18673
      return sb.toString();
18674
    }
18675
 
18676
    public void validate() throws org.apache.thrift.TException {
18677
      // check for required fields
18678
    }
18679
 
18680
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18681
      try {
18682
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18683
      } catch (org.apache.thrift.TException te) {
18684
        throw new java.io.IOException(te);
18685
      }
18686
    }
18687
 
18688
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18689
      try {
18690
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18691
      } catch (org.apache.thrift.TException te) {
18692
        throw new java.io.IOException(te);
18693
      }
18694
    }
18695
 
18696
  }
18697
 
18698
  public static class markPaymentAsProcessed_args implements org.apache.thrift.TBase<markPaymentAsProcessed_args, markPaymentAsProcessed_args._Fields>, java.io.Serializable, Cloneable   {
18699
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_args");
18700
 
18701
    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);
18702
    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);
18703
 
18704
    private long paymentId; // required
18705
    private ExtraPaymentProcessingType category; // required
18706
 
18707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18708
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18709
      PAYMENT_ID((short)1, "paymentId"),
18710
      /**
18711
       * 
18712
       * @see ExtraPaymentProcessingType
18713
       */
18714
      CATEGORY((short)2, "category");
18715
 
18716
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18717
 
18718
      static {
18719
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18720
          byName.put(field.getFieldName(), field);
18721
        }
18722
      }
18723
 
18724
      /**
18725
       * Find the _Fields constant that matches fieldId, or null if its not found.
18726
       */
18727
      public static _Fields findByThriftId(int fieldId) {
18728
        switch(fieldId) {
18729
          case 1: // PAYMENT_ID
18730
            return PAYMENT_ID;
18731
          case 2: // CATEGORY
18732
            return CATEGORY;
18733
          default:
18734
            return null;
18735
        }
18736
      }
18737
 
18738
      /**
18739
       * Find the _Fields constant that matches fieldId, throwing an exception
18740
       * if it is not found.
18741
       */
18742
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18743
        _Fields fields = findByThriftId(fieldId);
18744
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18745
        return fields;
18746
      }
18747
 
18748
      /**
18749
       * Find the _Fields constant that matches name, or null if its not found.
18750
       */
18751
      public static _Fields findByName(String name) {
18752
        return byName.get(name);
18753
      }
18754
 
18755
      private final short _thriftId;
18756
      private final String _fieldName;
18757
 
18758
      _Fields(short thriftId, String fieldName) {
18759
        _thriftId = thriftId;
18760
        _fieldName = fieldName;
18761
      }
18762
 
18763
      public short getThriftFieldId() {
18764
        return _thriftId;
18765
      }
18766
 
18767
      public String getFieldName() {
18768
        return _fieldName;
18769
      }
18770
    }
18771
 
18772
    // isset id assignments
18773
    private static final int __PAYMENTID_ISSET_ID = 0;
18774
    private BitSet __isset_bit_vector = new BitSet(1);
18775
 
18776
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18777
    static {
18778
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18779
      tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18780
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18781
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18782
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
18783
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18784
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_args.class, metaDataMap);
18785
    }
18786
 
18787
    public markPaymentAsProcessed_args() {
18788
    }
18789
 
18790
    public markPaymentAsProcessed_args(
18791
      long paymentId,
18792
      ExtraPaymentProcessingType category)
18793
    {
18794
      this();
18795
      this.paymentId = paymentId;
18796
      setPaymentIdIsSet(true);
18797
      this.category = category;
18798
    }
18799
 
18800
    /**
18801
     * Performs a deep copy on <i>other</i>.
18802
     */
18803
    public markPaymentAsProcessed_args(markPaymentAsProcessed_args other) {
18804
      __isset_bit_vector.clear();
18805
      __isset_bit_vector.or(other.__isset_bit_vector);
18806
      this.paymentId = other.paymentId;
18807
      if (other.isSetCategory()) {
18808
        this.category = other.category;
18809
      }
18810
    }
18811
 
18812
    public markPaymentAsProcessed_args deepCopy() {
18813
      return new markPaymentAsProcessed_args(this);
18814
    }
18815
 
18816
    @Override
18817
    public void clear() {
18818
      setPaymentIdIsSet(false);
18819
      this.paymentId = 0;
18820
      this.category = null;
18821
    }
18822
 
18823
    public long getPaymentId() {
18824
      return this.paymentId;
18825
    }
18826
 
18827
    public void setPaymentId(long paymentId) {
18828
      this.paymentId = paymentId;
18829
      setPaymentIdIsSet(true);
18830
    }
18831
 
18832
    public void unsetPaymentId() {
18833
      __isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
18834
    }
18835
 
18836
    /** Returns true if field paymentId is set (has been assigned a value) and false otherwise */
18837
    public boolean isSetPaymentId() {
18838
      return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
18839
    }
18840
 
18841
    public void setPaymentIdIsSet(boolean value) {
18842
      __isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
18843
    }
18844
 
18845
    /**
18846
     * 
18847
     * @see ExtraPaymentProcessingType
18848
     */
18849
    public ExtraPaymentProcessingType getCategory() {
18850
      return this.category;
18851
    }
18852
 
18853
    /**
18854
     * 
18855
     * @see ExtraPaymentProcessingType
18856
     */
18857
    public void setCategory(ExtraPaymentProcessingType category) {
18858
      this.category = category;
18859
    }
18860
 
18861
    public void unsetCategory() {
18862
      this.category = null;
18863
    }
18864
 
18865
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
18866
    public boolean isSetCategory() {
18867
      return this.category != null;
18868
    }
18869
 
18870
    public void setCategoryIsSet(boolean value) {
18871
      if (!value) {
18872
        this.category = null;
18873
      }
18874
    }
18875
 
18876
    public void setFieldValue(_Fields field, Object value) {
18877
      switch (field) {
18878
      case PAYMENT_ID:
18879
        if (value == null) {
18880
          unsetPaymentId();
18881
        } else {
18882
          setPaymentId((Long)value);
18883
        }
18884
        break;
18885
 
18886
      case CATEGORY:
18887
        if (value == null) {
18888
          unsetCategory();
18889
        } else {
18890
          setCategory((ExtraPaymentProcessingType)value);
18891
        }
18892
        break;
18893
 
18894
      }
18895
    }
18896
 
18897
    public Object getFieldValue(_Fields field) {
18898
      switch (field) {
18899
      case PAYMENT_ID:
18900
        return Long.valueOf(getPaymentId());
18901
 
18902
      case CATEGORY:
18903
        return getCategory();
18904
 
18905
      }
18906
      throw new IllegalStateException();
18907
    }
18908
 
18909
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18910
    public boolean isSet(_Fields field) {
18911
      if (field == null) {
18912
        throw new IllegalArgumentException();
18913
      }
18914
 
18915
      switch (field) {
18916
      case PAYMENT_ID:
18917
        return isSetPaymentId();
18918
      case CATEGORY:
18919
        return isSetCategory();
18920
      }
18921
      throw new IllegalStateException();
18922
    }
18923
 
18924
    @Override
18925
    public boolean equals(Object that) {
18926
      if (that == null)
18927
        return false;
18928
      if (that instanceof markPaymentAsProcessed_args)
18929
        return this.equals((markPaymentAsProcessed_args)that);
18930
      return false;
18931
    }
18932
 
18933
    public boolean equals(markPaymentAsProcessed_args that) {
18934
      if (that == null)
18935
        return false;
18936
 
18937
      boolean this_present_paymentId = true;
18938
      boolean that_present_paymentId = true;
18939
      if (this_present_paymentId || that_present_paymentId) {
18940
        if (!(this_present_paymentId && that_present_paymentId))
18941
          return false;
18942
        if (this.paymentId != that.paymentId)
18943
          return false;
18944
      }
18945
 
18946
      boolean this_present_category = true && this.isSetCategory();
18947
      boolean that_present_category = true && that.isSetCategory();
18948
      if (this_present_category || that_present_category) {
18949
        if (!(this_present_category && that_present_category))
18950
          return false;
18951
        if (!this.category.equals(that.category))
18952
          return false;
18953
      }
18954
 
18955
      return true;
18956
    }
18957
 
18958
    @Override
18959
    public int hashCode() {
18960
      return 0;
18961
    }
18962
 
18963
    public int compareTo(markPaymentAsProcessed_args other) {
18964
      if (!getClass().equals(other.getClass())) {
18965
        return getClass().getName().compareTo(other.getClass().getName());
18966
      }
18967
 
18968
      int lastComparison = 0;
18969
      markPaymentAsProcessed_args typedOther = (markPaymentAsProcessed_args)other;
18970
 
18971
      lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(typedOther.isSetPaymentId());
18972
      if (lastComparison != 0) {
18973
        return lastComparison;
18974
      }
18975
      if (isSetPaymentId()) {
18976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentId, typedOther.paymentId);
18977
        if (lastComparison != 0) {
18978
          return lastComparison;
18979
        }
18980
      }
18981
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
18982
      if (lastComparison != 0) {
18983
        return lastComparison;
18984
      }
18985
      if (isSetCategory()) {
18986
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
18987
        if (lastComparison != 0) {
18988
          return lastComparison;
18989
        }
18990
      }
18991
      return 0;
18992
    }
18993
 
18994
    public _Fields fieldForId(int fieldId) {
18995
      return _Fields.findByThriftId(fieldId);
18996
    }
18997
 
18998
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18999
      org.apache.thrift.protocol.TField field;
19000
      iprot.readStructBegin();
19001
      while (true)
19002
      {
19003
        field = iprot.readFieldBegin();
19004
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19005
          break;
19006
        }
19007
        switch (field.id) {
19008
          case 1: // PAYMENT_ID
19009
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19010
              this.paymentId = iprot.readI64();
19011
              setPaymentIdIsSet(true);
19012
            } else { 
19013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19014
            }
19015
            break;
19016
          case 2: // CATEGORY
19017
            if (field.type == org.apache.thrift.protocol.TType.I32) {
19018
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
19019
            } else { 
19020
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19021
            }
19022
            break;
19023
          default:
19024
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19025
        }
19026
        iprot.readFieldEnd();
19027
      }
19028
      iprot.readStructEnd();
19029
      validate();
19030
    }
19031
 
19032
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19033
      validate();
19034
 
19035
      oprot.writeStructBegin(STRUCT_DESC);
19036
      oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
19037
      oprot.writeI64(this.paymentId);
19038
      oprot.writeFieldEnd();
19039
      if (this.category != null) {
19040
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
19041
        oprot.writeI32(this.category.getValue());
19042
        oprot.writeFieldEnd();
19043
      }
19044
      oprot.writeFieldStop();
19045
      oprot.writeStructEnd();
19046
    }
19047
 
19048
    @Override
19049
    public String toString() {
19050
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_args(");
19051
      boolean first = true;
19052
 
19053
      sb.append("paymentId:");
19054
      sb.append(this.paymentId);
19055
      first = false;
19056
      if (!first) sb.append(", ");
19057
      sb.append("category:");
19058
      if (this.category == null) {
19059
        sb.append("null");
19060
      } else {
19061
        sb.append(this.category);
19062
      }
19063
      first = false;
19064
      sb.append(")");
19065
      return sb.toString();
19066
    }
19067
 
19068
    public void validate() throws org.apache.thrift.TException {
19069
      // check for required fields
19070
    }
19071
 
19072
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19073
      try {
19074
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19075
      } catch (org.apache.thrift.TException te) {
19076
        throw new java.io.IOException(te);
19077
      }
19078
    }
19079
 
19080
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19081
      try {
19082
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19083
      } catch (org.apache.thrift.TException te) {
19084
        throw new java.io.IOException(te);
19085
      }
19086
    }
19087
 
19088
  }
19089
 
19090
  public static class markPaymentAsProcessed_result implements org.apache.thrift.TBase<markPaymentAsProcessed_result, markPaymentAsProcessed_result._Fields>, java.io.Serializable, Cloneable   {
19091
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_result");
19092
 
19093
 
19094
 
19095
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19096
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19097
;
19098
 
19099
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19100
 
19101
      static {
19102
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19103
          byName.put(field.getFieldName(), field);
19104
        }
19105
      }
19106
 
19107
      /**
19108
       * Find the _Fields constant that matches fieldId, or null if its not found.
19109
       */
19110
      public static _Fields findByThriftId(int fieldId) {
19111
        switch(fieldId) {
19112
          default:
19113
            return null;
19114
        }
19115
      }
19116
 
19117
      /**
19118
       * Find the _Fields constant that matches fieldId, throwing an exception
19119
       * if it is not found.
19120
       */
19121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19122
        _Fields fields = findByThriftId(fieldId);
19123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19124
        return fields;
19125
      }
19126
 
19127
      /**
19128
       * Find the _Fields constant that matches name, or null if its not found.
19129
       */
19130
      public static _Fields findByName(String name) {
19131
        return byName.get(name);
19132
      }
19133
 
19134
      private final short _thriftId;
19135
      private final String _fieldName;
19136
 
19137
      _Fields(short thriftId, String fieldName) {
19138
        _thriftId = thriftId;
19139
        _fieldName = fieldName;
19140
      }
19141
 
19142
      public short getThriftFieldId() {
19143
        return _thriftId;
19144
      }
19145
 
19146
      public String getFieldName() {
19147
        return _fieldName;
19148
      }
19149
    }
19150
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19151
    static {
19152
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19153
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19154
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_result.class, metaDataMap);
19155
    }
19156
 
19157
    public markPaymentAsProcessed_result() {
19158
    }
19159
 
19160
    /**
19161
     * Performs a deep copy on <i>other</i>.
19162
     */
19163
    public markPaymentAsProcessed_result(markPaymentAsProcessed_result other) {
19164
    }
19165
 
19166
    public markPaymentAsProcessed_result deepCopy() {
19167
      return new markPaymentAsProcessed_result(this);
19168
    }
19169
 
19170
    @Override
19171
    public void clear() {
19172
    }
19173
 
19174
    public void setFieldValue(_Fields field, Object value) {
19175
      switch (field) {
19176
      }
19177
    }
19178
 
19179
    public Object getFieldValue(_Fields field) {
19180
      switch (field) {
19181
      }
19182
      throw new IllegalStateException();
19183
    }
19184
 
19185
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19186
    public boolean isSet(_Fields field) {
19187
      if (field == null) {
19188
        throw new IllegalArgumentException();
19189
      }
19190
 
19191
      switch (field) {
19192
      }
19193
      throw new IllegalStateException();
19194
    }
19195
 
19196
    @Override
19197
    public boolean equals(Object that) {
19198
      if (that == null)
19199
        return false;
19200
      if (that instanceof markPaymentAsProcessed_result)
19201
        return this.equals((markPaymentAsProcessed_result)that);
19202
      return false;
19203
    }
19204
 
19205
    public boolean equals(markPaymentAsProcessed_result that) {
19206
      if (that == null)
19207
        return false;
19208
 
19209
      return true;
19210
    }
19211
 
19212
    @Override
19213
    public int hashCode() {
19214
      return 0;
19215
    }
19216
 
19217
    public int compareTo(markPaymentAsProcessed_result other) {
19218
      if (!getClass().equals(other.getClass())) {
19219
        return getClass().getName().compareTo(other.getClass().getName());
19220
      }
19221
 
19222
      int lastComparison = 0;
19223
      markPaymentAsProcessed_result typedOther = (markPaymentAsProcessed_result)other;
19224
 
19225
      return 0;
19226
    }
19227
 
19228
    public _Fields fieldForId(int fieldId) {
19229
      return _Fields.findByThriftId(fieldId);
19230
    }
19231
 
19232
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19233
      org.apache.thrift.protocol.TField field;
19234
      iprot.readStructBegin();
19235
      while (true)
19236
      {
19237
        field = iprot.readFieldBegin();
19238
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19239
          break;
19240
        }
19241
        switch (field.id) {
19242
          default:
19243
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19244
        }
19245
        iprot.readFieldEnd();
19246
      }
19247
      iprot.readStructEnd();
19248
      validate();
19249
    }
19250
 
19251
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19252
      oprot.writeStructBegin(STRUCT_DESC);
19253
 
19254
      oprot.writeFieldStop();
19255
      oprot.writeStructEnd();
19256
    }
19257
 
19258
    @Override
19259
    public String toString() {
19260
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_result(");
19261
      boolean first = true;
19262
 
19263
      sb.append(")");
19264
      return sb.toString();
19265
    }
19266
 
19267
    public void validate() throws org.apache.thrift.TException {
19268
      // check for required fields
19269
    }
19270
 
19271
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19272
      try {
19273
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19274
      } catch (org.apache.thrift.TException te) {
19275
        throw new java.io.IOException(te);
19276
      }
19277
    }
19278
 
19279
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19280
      try {
19281
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19282
      } catch (org.apache.thrift.TException te) {
19283
        throw new java.io.IOException(te);
19284
      }
19285
    }
19286
 
19287
  }
19288
 
8914 rajveer 19289
  public static class getPaymentStatusAtGateway_args implements org.apache.thrift.TBase<getPaymentStatusAtGateway_args, getPaymentStatusAtGateway_args._Fields>, java.io.Serializable, Cloneable   {
19290
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentStatusAtGateway_args");
8907 rajveer 19291
 
19292
    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);
19293
    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);
19294
    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);
19295
 
19296
    private long merchantTxnId; // required
19297
    private double amount; // required
19298
    private boolean isDigital; // required
19299
 
19300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19301
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19302
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
19303
      AMOUNT((short)2, "amount"),
19304
      IS_DIGITAL((short)3, "isDigital");
19305
 
19306
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19307
 
19308
      static {
19309
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19310
          byName.put(field.getFieldName(), field);
19311
        }
19312
      }
19313
 
19314
      /**
19315
       * Find the _Fields constant that matches fieldId, or null if its not found.
19316
       */
19317
      public static _Fields findByThriftId(int fieldId) {
19318
        switch(fieldId) {
19319
          case 1: // MERCHANT_TXN_ID
19320
            return MERCHANT_TXN_ID;
19321
          case 2: // AMOUNT
19322
            return AMOUNT;
19323
          case 3: // IS_DIGITAL
19324
            return IS_DIGITAL;
19325
          default:
19326
            return null;
19327
        }
19328
      }
19329
 
19330
      /**
19331
       * Find the _Fields constant that matches fieldId, throwing an exception
19332
       * if it is not found.
19333
       */
19334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19335
        _Fields fields = findByThriftId(fieldId);
19336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19337
        return fields;
19338
      }
19339
 
19340
      /**
19341
       * Find the _Fields constant that matches name, or null if its not found.
19342
       */
19343
      public static _Fields findByName(String name) {
19344
        return byName.get(name);
19345
      }
19346
 
19347
      private final short _thriftId;
19348
      private final String _fieldName;
19349
 
19350
      _Fields(short thriftId, String fieldName) {
19351
        _thriftId = thriftId;
19352
        _fieldName = fieldName;
19353
      }
19354
 
19355
      public short getThriftFieldId() {
19356
        return _thriftId;
19357
      }
19358
 
19359
      public String getFieldName() {
19360
        return _fieldName;
19361
      }
19362
    }
19363
 
19364
    // isset id assignments
19365
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
19366
    private static final int __AMOUNT_ISSET_ID = 1;
19367
    private static final int __ISDIGITAL_ISSET_ID = 2;
19368
    private BitSet __isset_bit_vector = new BitSet(3);
19369
 
19370
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19371
    static {
19372
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19373
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19374
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19375
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19376
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
19377
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19378
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
19379
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8914 rajveer 19380
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentStatusAtGateway_args.class, metaDataMap);
8907 rajveer 19381
    }
19382
 
8914 rajveer 19383
    public getPaymentStatusAtGateway_args() {
8907 rajveer 19384
    }
19385
 
8914 rajveer 19386
    public getPaymentStatusAtGateway_args(
8907 rajveer 19387
      long merchantTxnId,
19388
      double amount,
19389
      boolean isDigital)
19390
    {
19391
      this();
19392
      this.merchantTxnId = merchantTxnId;
19393
      setMerchantTxnIdIsSet(true);
19394
      this.amount = amount;
19395
      setAmountIsSet(true);
19396
      this.isDigital = isDigital;
19397
      setIsDigitalIsSet(true);
19398
    }
19399
 
19400
    /**
19401
     * Performs a deep copy on <i>other</i>.
19402
     */
8914 rajveer 19403
    public getPaymentStatusAtGateway_args(getPaymentStatusAtGateway_args other) {
8907 rajveer 19404
      __isset_bit_vector.clear();
19405
      __isset_bit_vector.or(other.__isset_bit_vector);
19406
      this.merchantTxnId = other.merchantTxnId;
19407
      this.amount = other.amount;
19408
      this.isDigital = other.isDigital;
19409
    }
19410
 
8914 rajveer 19411
    public getPaymentStatusAtGateway_args deepCopy() {
19412
      return new getPaymentStatusAtGateway_args(this);
8907 rajveer 19413
    }
19414
 
19415
    @Override
19416
    public void clear() {
19417
      setMerchantTxnIdIsSet(false);
19418
      this.merchantTxnId = 0;
19419
      setAmountIsSet(false);
19420
      this.amount = 0.0;
19421
      setIsDigitalIsSet(false);
19422
      this.isDigital = false;
19423
    }
19424
 
19425
    public long getMerchantTxnId() {
19426
      return this.merchantTxnId;
19427
    }
19428
 
19429
    public void setMerchantTxnId(long merchantTxnId) {
19430
      this.merchantTxnId = merchantTxnId;
19431
      setMerchantTxnIdIsSet(true);
19432
    }
19433
 
19434
    public void unsetMerchantTxnId() {
19435
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
19436
    }
19437
 
19438
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
19439
    public boolean isSetMerchantTxnId() {
19440
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
19441
    }
19442
 
19443
    public void setMerchantTxnIdIsSet(boolean value) {
19444
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
19445
    }
19446
 
19447
    public double getAmount() {
19448
      return this.amount;
19449
    }
19450
 
19451
    public void setAmount(double amount) {
19452
      this.amount = amount;
19453
      setAmountIsSet(true);
19454
    }
19455
 
19456
    public void unsetAmount() {
19457
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
19458
    }
19459
 
19460
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
19461
    public boolean isSetAmount() {
19462
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
19463
    }
19464
 
19465
    public void setAmountIsSet(boolean value) {
19466
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
19467
    }
19468
 
19469
    public boolean isIsDigital() {
19470
      return this.isDigital;
19471
    }
19472
 
19473
    public void setIsDigital(boolean isDigital) {
19474
      this.isDigital = isDigital;
19475
      setIsDigitalIsSet(true);
19476
    }
19477
 
19478
    public void unsetIsDigital() {
19479
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
19480
    }
19481
 
19482
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
19483
    public boolean isSetIsDigital() {
19484
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
19485
    }
19486
 
19487
    public void setIsDigitalIsSet(boolean value) {
19488
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
19489
    }
19490
 
19491
    public void setFieldValue(_Fields field, Object value) {
19492
      switch (field) {
19493
      case MERCHANT_TXN_ID:
19494
        if (value == null) {
19495
          unsetMerchantTxnId();
19496
        } else {
19497
          setMerchantTxnId((Long)value);
19498
        }
19499
        break;
19500
 
19501
      case AMOUNT:
19502
        if (value == null) {
19503
          unsetAmount();
19504
        } else {
19505
          setAmount((Double)value);
19506
        }
19507
        break;
19508
 
19509
      case IS_DIGITAL:
19510
        if (value == null) {
19511
          unsetIsDigital();
19512
        } else {
19513
          setIsDigital((Boolean)value);
19514
        }
19515
        break;
19516
 
19517
      }
19518
    }
19519
 
19520
    public Object getFieldValue(_Fields field) {
19521
      switch (field) {
19522
      case MERCHANT_TXN_ID:
19523
        return Long.valueOf(getMerchantTxnId());
19524
 
19525
      case AMOUNT:
19526
        return Double.valueOf(getAmount());
19527
 
19528
      case IS_DIGITAL:
19529
        return Boolean.valueOf(isIsDigital());
19530
 
19531
      }
19532
      throw new IllegalStateException();
19533
    }
19534
 
19535
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19536
    public boolean isSet(_Fields field) {
19537
      if (field == null) {
19538
        throw new IllegalArgumentException();
19539
      }
19540
 
19541
      switch (field) {
19542
      case MERCHANT_TXN_ID:
19543
        return isSetMerchantTxnId();
19544
      case AMOUNT:
19545
        return isSetAmount();
19546
      case IS_DIGITAL:
19547
        return isSetIsDigital();
19548
      }
19549
      throw new IllegalStateException();
19550
    }
19551
 
19552
    @Override
19553
    public boolean equals(Object that) {
19554
      if (that == null)
19555
        return false;
8914 rajveer 19556
      if (that instanceof getPaymentStatusAtGateway_args)
19557
        return this.equals((getPaymentStatusAtGateway_args)that);
8907 rajveer 19558
      return false;
19559
    }
19560
 
8914 rajveer 19561
    public boolean equals(getPaymentStatusAtGateway_args that) {
8907 rajveer 19562
      if (that == null)
19563
        return false;
19564
 
19565
      boolean this_present_merchantTxnId = true;
19566
      boolean that_present_merchantTxnId = true;
19567
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
19568
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
19569
          return false;
19570
        if (this.merchantTxnId != that.merchantTxnId)
19571
          return false;
19572
      }
19573
 
19574
      boolean this_present_amount = true;
19575
      boolean that_present_amount = true;
19576
      if (this_present_amount || that_present_amount) {
19577
        if (!(this_present_amount && that_present_amount))
19578
          return false;
19579
        if (this.amount != that.amount)
19580
          return false;
19581
      }
19582
 
19583
      boolean this_present_isDigital = true;
19584
      boolean that_present_isDigital = true;
19585
      if (this_present_isDigital || that_present_isDigital) {
19586
        if (!(this_present_isDigital && that_present_isDigital))
19587
          return false;
19588
        if (this.isDigital != that.isDigital)
19589
          return false;
19590
      }
19591
 
19592
      return true;
19593
    }
19594
 
19595
    @Override
19596
    public int hashCode() {
19597
      return 0;
19598
    }
19599
 
8914 rajveer 19600
    public int compareTo(getPaymentStatusAtGateway_args other) {
8907 rajveer 19601
      if (!getClass().equals(other.getClass())) {
19602
        return getClass().getName().compareTo(other.getClass().getName());
19603
      }
19604
 
19605
      int lastComparison = 0;
8914 rajveer 19606
      getPaymentStatusAtGateway_args typedOther = (getPaymentStatusAtGateway_args)other;
8907 rajveer 19607
 
19608
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
19609
      if (lastComparison != 0) {
19610
        return lastComparison;
19611
      }
19612
      if (isSetMerchantTxnId()) {
19613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
19614
        if (lastComparison != 0) {
19615
          return lastComparison;
19616
        }
19617
      }
19618
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
19619
      if (lastComparison != 0) {
19620
        return lastComparison;
19621
      }
19622
      if (isSetAmount()) {
19623
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
19624
        if (lastComparison != 0) {
19625
          return lastComparison;
19626
        }
19627
      }
19628
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
19629
      if (lastComparison != 0) {
19630
        return lastComparison;
19631
      }
19632
      if (isSetIsDigital()) {
19633
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
19634
        if (lastComparison != 0) {
19635
          return lastComparison;
19636
        }
19637
      }
19638
      return 0;
19639
    }
19640
 
19641
    public _Fields fieldForId(int fieldId) {
19642
      return _Fields.findByThriftId(fieldId);
19643
    }
19644
 
19645
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19646
      org.apache.thrift.protocol.TField field;
19647
      iprot.readStructBegin();
19648
      while (true)
19649
      {
19650
        field = iprot.readFieldBegin();
19651
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19652
          break;
19653
        }
19654
        switch (field.id) {
19655
          case 1: // MERCHANT_TXN_ID
19656
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19657
              this.merchantTxnId = iprot.readI64();
19658
              setMerchantTxnIdIsSet(true);
19659
            } else { 
19660
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19661
            }
19662
            break;
19663
          case 2: // AMOUNT
19664
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19665
              this.amount = iprot.readDouble();
19666
              setAmountIsSet(true);
19667
            } else { 
19668
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19669
            }
19670
            break;
19671
          case 3: // IS_DIGITAL
19672
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
19673
              this.isDigital = iprot.readBool();
19674
              setIsDigitalIsSet(true);
19675
            } else { 
19676
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19677
            }
19678
            break;
19679
          default:
19680
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19681
        }
19682
        iprot.readFieldEnd();
19683
      }
19684
      iprot.readStructEnd();
19685
      validate();
19686
    }
19687
 
19688
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19689
      validate();
19690
 
19691
      oprot.writeStructBegin(STRUCT_DESC);
19692
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
19693
      oprot.writeI64(this.merchantTxnId);
19694
      oprot.writeFieldEnd();
19695
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
19696
      oprot.writeDouble(this.amount);
19697
      oprot.writeFieldEnd();
19698
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
19699
      oprot.writeBool(this.isDigital);
19700
      oprot.writeFieldEnd();
19701
      oprot.writeFieldStop();
19702
      oprot.writeStructEnd();
19703
    }
19704
 
19705
    @Override
19706
    public String toString() {
8914 rajveer 19707
      StringBuilder sb = new StringBuilder("getPaymentStatusAtGateway_args(");
8907 rajveer 19708
      boolean first = true;
19709
 
19710
      sb.append("merchantTxnId:");
19711
      sb.append(this.merchantTxnId);
19712
      first = false;
19713
      if (!first) sb.append(", ");
19714
      sb.append("amount:");
19715
      sb.append(this.amount);
19716
      first = false;
19717
      if (!first) sb.append(", ");
19718
      sb.append("isDigital:");
19719
      sb.append(this.isDigital);
19720
      first = false;
19721
      sb.append(")");
19722
      return sb.toString();
19723
    }
19724
 
19725
    public void validate() throws org.apache.thrift.TException {
19726
      // check for required fields
19727
    }
19728
 
19729
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19730
      try {
19731
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19732
      } catch (org.apache.thrift.TException te) {
19733
        throw new java.io.IOException(te);
19734
      }
19735
    }
19736
 
19737
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19738
      try {
19739
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19740
        __isset_bit_vector = new BitSet(1);
19741
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19742
      } catch (org.apache.thrift.TException te) {
19743
        throw new java.io.IOException(te);
19744
      }
19745
    }
19746
 
19747
  }
19748
 
8914 rajveer 19749
  public static class getPaymentStatusAtGateway_result implements org.apache.thrift.TBase<getPaymentStatusAtGateway_result, getPaymentStatusAtGateway_result._Fields>, java.io.Serializable, Cloneable   {
19750
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentStatusAtGateway_result");
8907 rajveer 19751
 
8914 rajveer 19752
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
8907 rajveer 19753
    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);
19754
 
8914 rajveer 19755
    private PaymentStatus success; // required
8907 rajveer 19756
    private PaymentException pe; // required
19757
 
19758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19759
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8914 rajveer 19760
      /**
19761
       * 
19762
       * @see PaymentStatus
19763
       */
8907 rajveer 19764
      SUCCESS((short)0, "success"),
19765
      PE((short)1, "pe");
19766
 
19767
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19768
 
19769
      static {
19770
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19771
          byName.put(field.getFieldName(), field);
19772
        }
19773
      }
19774
 
19775
      /**
19776
       * Find the _Fields constant that matches fieldId, or null if its not found.
19777
       */
19778
      public static _Fields findByThriftId(int fieldId) {
19779
        switch(fieldId) {
19780
          case 0: // SUCCESS
19781
            return SUCCESS;
19782
          case 1: // PE
19783
            return PE;
19784
          default:
19785
            return null;
19786
        }
19787
      }
19788
 
19789
      /**
19790
       * Find the _Fields constant that matches fieldId, throwing an exception
19791
       * if it is not found.
19792
       */
19793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19794
        _Fields fields = findByThriftId(fieldId);
19795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19796
        return fields;
19797
      }
19798
 
19799
      /**
19800
       * Find the _Fields constant that matches name, or null if its not found.
19801
       */
19802
      public static _Fields findByName(String name) {
19803
        return byName.get(name);
19804
      }
19805
 
19806
      private final short _thriftId;
19807
      private final String _fieldName;
19808
 
19809
      _Fields(short thriftId, String fieldName) {
19810
        _thriftId = thriftId;
19811
        _fieldName = fieldName;
19812
      }
19813
 
19814
      public short getThriftFieldId() {
19815
        return _thriftId;
19816
      }
19817
 
19818
      public String getFieldName() {
19819
        return _fieldName;
19820
      }
19821
    }
19822
 
19823
    // isset id assignments
19824
 
19825
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19826
    static {
19827
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19828
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8914 rajveer 19829
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
8907 rajveer 19830
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19831
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19832
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8914 rajveer 19833
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentStatusAtGateway_result.class, metaDataMap);
8907 rajveer 19834
    }
19835
 
8914 rajveer 19836
    public getPaymentStatusAtGateway_result() {
8907 rajveer 19837
    }
19838
 
8914 rajveer 19839
    public getPaymentStatusAtGateway_result(
19840
      PaymentStatus success,
8907 rajveer 19841
      PaymentException pe)
19842
    {
19843
      this();
19844
      this.success = success;
19845
      this.pe = pe;
19846
    }
19847
 
19848
    /**
19849
     * Performs a deep copy on <i>other</i>.
19850
     */
8914 rajveer 19851
    public getPaymentStatusAtGateway_result(getPaymentStatusAtGateway_result other) {
19852
      if (other.isSetSuccess()) {
19853
        this.success = other.success;
19854
      }
8907 rajveer 19855
      if (other.isSetPe()) {
19856
        this.pe = new PaymentException(other.pe);
19857
      }
19858
    }
19859
 
8914 rajveer 19860
    public getPaymentStatusAtGateway_result deepCopy() {
19861
      return new getPaymentStatusAtGateway_result(this);
8907 rajveer 19862
    }
19863
 
19864
    @Override
19865
    public void clear() {
8914 rajveer 19866
      this.success = null;
8907 rajveer 19867
      this.pe = null;
19868
    }
19869
 
8914 rajveer 19870
    /**
19871
     * 
19872
     * @see PaymentStatus
19873
     */
19874
    public PaymentStatus getSuccess() {
8907 rajveer 19875
      return this.success;
19876
    }
19877
 
8914 rajveer 19878
    /**
19879
     * 
19880
     * @see PaymentStatus
19881
     */
19882
    public void setSuccess(PaymentStatus success) {
8907 rajveer 19883
      this.success = success;
19884
    }
19885
 
19886
    public void unsetSuccess() {
8914 rajveer 19887
      this.success = null;
8907 rajveer 19888
    }
19889
 
19890
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19891
    public boolean isSetSuccess() {
8914 rajveer 19892
      return this.success != null;
8907 rajveer 19893
    }
19894
 
19895
    public void setSuccessIsSet(boolean value) {
8914 rajveer 19896
      if (!value) {
19897
        this.success = null;
19898
      }
8907 rajveer 19899
    }
19900
 
19901
    public PaymentException getPe() {
19902
      return this.pe;
19903
    }
19904
 
19905
    public void setPe(PaymentException pe) {
19906
      this.pe = pe;
19907
    }
19908
 
19909
    public void unsetPe() {
19910
      this.pe = null;
19911
    }
19912
 
19913
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
19914
    public boolean isSetPe() {
19915
      return this.pe != null;
19916
    }
19917
 
19918
    public void setPeIsSet(boolean value) {
19919
      if (!value) {
19920
        this.pe = null;
19921
      }
19922
    }
19923
 
19924
    public void setFieldValue(_Fields field, Object value) {
19925
      switch (field) {
19926
      case SUCCESS:
19927
        if (value == null) {
19928
          unsetSuccess();
19929
        } else {
8914 rajveer 19930
          setSuccess((PaymentStatus)value);
8907 rajveer 19931
        }
19932
        break;
19933
 
19934
      case PE:
19935
        if (value == null) {
19936
          unsetPe();
19937
        } else {
19938
          setPe((PaymentException)value);
19939
        }
19940
        break;
19941
 
19942
      }
19943
    }
19944
 
19945
    public Object getFieldValue(_Fields field) {
19946
      switch (field) {
19947
      case SUCCESS:
8914 rajveer 19948
        return getSuccess();
8907 rajveer 19949
 
19950
      case PE:
19951
        return getPe();
19952
 
19953
      }
19954
      throw new IllegalStateException();
19955
    }
19956
 
19957
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19958
    public boolean isSet(_Fields field) {
19959
      if (field == null) {
19960
        throw new IllegalArgumentException();
19961
      }
19962
 
19963
      switch (field) {
19964
      case SUCCESS:
19965
        return isSetSuccess();
19966
      case PE:
19967
        return isSetPe();
19968
      }
19969
      throw new IllegalStateException();
19970
    }
19971
 
19972
    @Override
19973
    public boolean equals(Object that) {
19974
      if (that == null)
19975
        return false;
8914 rajveer 19976
      if (that instanceof getPaymentStatusAtGateway_result)
19977
        return this.equals((getPaymentStatusAtGateway_result)that);
8907 rajveer 19978
      return false;
19979
    }
19980
 
8914 rajveer 19981
    public boolean equals(getPaymentStatusAtGateway_result that) {
8907 rajveer 19982
      if (that == null)
19983
        return false;
19984
 
8914 rajveer 19985
      boolean this_present_success = true && this.isSetSuccess();
19986
      boolean that_present_success = true && that.isSetSuccess();
8907 rajveer 19987
      if (this_present_success || that_present_success) {
19988
        if (!(this_present_success && that_present_success))
19989
          return false;
8914 rajveer 19990
        if (!this.success.equals(that.success))
8907 rajveer 19991
          return false;
19992
      }
19993
 
19994
      boolean this_present_pe = true && this.isSetPe();
19995
      boolean that_present_pe = true && that.isSetPe();
19996
      if (this_present_pe || that_present_pe) {
19997
        if (!(this_present_pe && that_present_pe))
19998
          return false;
19999
        if (!this.pe.equals(that.pe))
20000
          return false;
20001
      }
20002
 
20003
      return true;
20004
    }
20005
 
20006
    @Override
20007
    public int hashCode() {
20008
      return 0;
20009
    }
20010
 
8914 rajveer 20011
    public int compareTo(getPaymentStatusAtGateway_result other) {
8907 rajveer 20012
      if (!getClass().equals(other.getClass())) {
20013
        return getClass().getName().compareTo(other.getClass().getName());
20014
      }
20015
 
20016
      int lastComparison = 0;
8914 rajveer 20017
      getPaymentStatusAtGateway_result typedOther = (getPaymentStatusAtGateway_result)other;
8907 rajveer 20018
 
20019
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20020
      if (lastComparison != 0) {
20021
        return lastComparison;
20022
      }
20023
      if (isSetSuccess()) {
20024
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20025
        if (lastComparison != 0) {
20026
          return lastComparison;
20027
        }
20028
      }
20029
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
20030
      if (lastComparison != 0) {
20031
        return lastComparison;
20032
      }
20033
      if (isSetPe()) {
20034
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
20035
        if (lastComparison != 0) {
20036
          return lastComparison;
20037
        }
20038
      }
20039
      return 0;
20040
    }
20041
 
20042
    public _Fields fieldForId(int fieldId) {
20043
      return _Fields.findByThriftId(fieldId);
20044
    }
20045
 
20046
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20047
      org.apache.thrift.protocol.TField field;
20048
      iprot.readStructBegin();
20049
      while (true)
20050
      {
20051
        field = iprot.readFieldBegin();
20052
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20053
          break;
20054
        }
20055
        switch (field.id) {
20056
          case 0: // SUCCESS
8914 rajveer 20057
            if (field.type == org.apache.thrift.protocol.TType.I32) {
20058
              this.success = PaymentStatus.findByValue(iprot.readI32());
8907 rajveer 20059
            } else { 
20060
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20061
            }
20062
            break;
20063
          case 1: // PE
20064
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20065
              this.pe = new PaymentException();
20066
              this.pe.read(iprot);
20067
            } else { 
20068
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20069
            }
20070
            break;
20071
          default:
20072
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20073
        }
20074
        iprot.readFieldEnd();
20075
      }
20076
      iprot.readStructEnd();
20077
      validate();
20078
    }
20079
 
20080
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20081
      oprot.writeStructBegin(STRUCT_DESC);
20082
 
20083
      if (this.isSetSuccess()) {
20084
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8914 rajveer 20085
        oprot.writeI32(this.success.getValue());
8907 rajveer 20086
        oprot.writeFieldEnd();
20087
      } else if (this.isSetPe()) {
20088
        oprot.writeFieldBegin(PE_FIELD_DESC);
20089
        this.pe.write(oprot);
20090
        oprot.writeFieldEnd();
20091
      }
20092
      oprot.writeFieldStop();
20093
      oprot.writeStructEnd();
20094
    }
20095
 
20096
    @Override
20097
    public String toString() {
8914 rajveer 20098
      StringBuilder sb = new StringBuilder("getPaymentStatusAtGateway_result(");
8907 rajveer 20099
      boolean first = true;
20100
 
20101
      sb.append("success:");
8914 rajveer 20102
      if (this.success == null) {
20103
        sb.append("null");
20104
      } else {
20105
        sb.append(this.success);
20106
      }
8907 rajveer 20107
      first = false;
20108
      if (!first) sb.append(", ");
20109
      sb.append("pe:");
20110
      if (this.pe == null) {
20111
        sb.append("null");
20112
      } else {
20113
        sb.append(this.pe);
20114
      }
20115
      first = false;
20116
      sb.append(")");
20117
      return sb.toString();
20118
    }
20119
 
20120
    public void validate() throws org.apache.thrift.TException {
20121
      // check for required fields
20122
    }
20123
 
20124
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20125
      try {
20126
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20127
      } catch (org.apache.thrift.TException te) {
20128
        throw new java.io.IOException(te);
20129
      }
20130
    }
20131
 
20132
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20133
      try {
20134
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20135
      } catch (org.apache.thrift.TException te) {
20136
        throw new java.io.IOException(te);
20137
      }
20138
    }
20139
 
20140
  }
20141
 
123 ashish 20142
}