Subversion Repositories SmartDukaan

Rev

Rev 4008 | Rev 4421 | 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
34
     */
3430 rajveer 35
    public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, org.apache.thrift.TException;
123 ashish 36
 
695 rajveer 37
    /**
4141 chandransh 38
     * Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.
695 rajveer 39
     * 
40
     * @param userId
41
     * @param fromTime
42
     * @param toTime
43
     * @param status
44
     * @param gatewayId
45
     */
3430 rajveer 46
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 47
 
695 rajveer 48
    /**
4141 chandransh 49
     * Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.
695 rajveer 50
     * 
51
     * @param fromTime
52
     * @param toTime
53
     * @param status
54
     * @param gatewayId
55
     */
3430 rajveer 56
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 57
 
695 rajveer 58
    /**
4141 chandransh 59
     * Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.
695 rajveer 60
     * 
4141 chandransh 61
     * @param fromTime
62
     * @param toTime
63
     * @param gatewayId
64
     */
65
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException;
66
 
67
    /**
68
     * Get the gateway for the given id.
695 rajveer 69
     * 
70
     * @param id
71
     */
3430 rajveer 72
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 73
 
695 rajveer 74
    /**
75
     * Get a particular payment info
76
     * 
77
     * 
78
     * @param id
79
     */
3430 rajveer 80
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 81
 
695 rajveer 82
    /**
83
     * Get a particular payment for a transaction. Will raise exception.
84
     * 
85
     * 
86
     * @param txnId
87
     */
3430 rajveer 88
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
420 ashish 89
 
695 rajveer 90
    /**
91
     * mark payment successful and store parameters
92
     * 
93
     * 
94
     * @param id
95
     * @param gatewayPaymentId
96
     * @param sessionId
97
     * @param gatewayTxnStatus
98
     * @param description
99
     * @param gatewayTxnId
100
     * @param authCode
101
     * @param referenceCode
102
     * @param errorCode
103
     * @param status
1119 rajveer 104
     * @param gatewayTxnDate
695 rajveer 105
     * @param attributes
106
     */
3430 rajveer 107
    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 108
 
1629 ankur.sing 109
    /**
1731 ankur.sing 110
     * Returns the minimum and maximum amounts among successful payments.
111
     * List contains two double values, first minimum and second maximum amount.
1629 ankur.sing 112
     */
3430 rajveer 113
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException;
1629 ankur.sing 114
 
2462 chandransh 115
    /**
116
     * Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
117
     * In case of any processing error, an exception is raised.
118
     * 
119
     * @param merchantPaymentId
120
     */
3430 rajveer 121
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
2462 chandransh 122
 
2690 chandransh 123
    /**
3616 chandransh 124
     * Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
125
     * In case of any processing error, an exception is raised.
126
     * 
127
     * @param merchantPaymentId
128
     */
129
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
130
 
131
    /**
2690 chandransh 132
     * Create a refund of the given amount corresponding to the given order to be processed through the same
133
     * payment gateway which processed the payment for the corresponding transaction.
134
     * Returns the id of the newly created Refund.
135
     * 
136
     * @param orderId
137
     * @param merchantTxnId
138
     * @param amount
139
     */
3430 rajveer 140
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
2690 chandransh 141
 
3010 chandransh 142
    /**
143
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
144
     * transaction. If the capture attempt failed, the payment is marked as failed.
145
     * 
146
     * @param merchantTxnId
147
     */
3430 rajveer 148
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
3010 chandransh 149
 
3956 chandransh 150
    /**
151
     * Adds the given amount to the captured amount of a COD payment.
152
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
153
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
154
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
155
     * and the corresponding transaction id.
156
     * 
157
     * Returns false if the payment couldn't be captured.
158
     * Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
159
     * 
160
     * @param merchantTxnId
161
     * @param amount
162
     * @param xferBy
163
     * @param xferTxnId
164
     * @param xferDate
165
     */
166
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException;
167
 
4008 mandeep.dh 168
    /**
169
     * Returns the list of payments that require some extra processing and
170
     * which belong to a particular category. This is currently used by CRM
171
     * application.
172
     * 
173
     * @param category
174
     */
175
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
176
 
177
    /**
178
     * Marks a particular payment as processed for a particular cateogory.
179
     * It essentially deletes the payment if it is processed for a particular
180
     * category. This is currently used by CRM application.
181
     * 
182
     * @param paymentId
183
     * @param category
184
     */
185
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
186
 
123 ashish 187
  }
188
 
3430 rajveer 189
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
190
 
191
    public void createPayment(long userId, double amount, long gatewayId, long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
192
 
193
    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;
194
 
195
    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;
196
 
4141 chandransh 197
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException;
198
 
3430 rajveer 199
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException;
200
 
201
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPayment_call> resultHandler) throws org.apache.thrift.TException;
202
 
203
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
204
 
205
    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;
206
 
207
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
208
 
209
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
210
 
3616 chandransh 211
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
212
 
3430 rajveer 213
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
214
 
215
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
216
 
3956 chandransh 217
    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;
218
 
4008 mandeep.dh 219
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
220
 
221
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
222
 
3430 rajveer 223
  }
224
 
3374 rajveer 225
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 226
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
227
      public Factory() {}
228
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
229
        return new Client(prot);
230
      }
231
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
232
        return new Client(iprot, oprot);
233
      }
234
    }
235
 
236
    public Client(org.apache.thrift.protocol.TProtocol prot)
123 ashish 237
    {
3430 rajveer 238
      super(prot, prot);
123 ashish 239
    }
240
 
3430 rajveer 241
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 242
      super(iprot, oprot);
123 ashish 243
    }
244
 
3430 rajveer 245
    public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, org.apache.thrift.TException
123 ashish 246
    {
695 rajveer 247
      send_createPayment(userId, amount, gatewayId, txnId);
123 ashish 248
      return recv_createPayment();
249
    }
250
 
3430 rajveer 251
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId) throws org.apache.thrift.TException
123 ashish 252
    {
253
      createPayment_args args = new createPayment_args();
3430 rajveer 254
      args.setUserId(userId);
255
      args.setAmount(amount);
256
      args.setGatewayId(gatewayId);
257
      args.setTxnId(txnId);
258
      sendBase("createPayment", args);
123 ashish 259
    }
260
 
3430 rajveer 261
    public long recv_createPayment() throws PaymentException, org.apache.thrift.TException
123 ashish 262
    {
263
      createPayment_result result = new createPayment_result();
3430 rajveer 264
      receiveBase(result, "createPayment");
123 ashish 265
      if (result.isSetSuccess()) {
266
        return result.success;
267
      }
268
      if (result.pe != null) {
269
        throw result.pe;
270
      }
3430 rajveer 271
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
123 ashish 272
    }
273
 
3430 rajveer 274
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 275
    {
695 rajveer 276
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 277
      return recv_getPaymentsForUser();
278
    }
279
 
3430 rajveer 280
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 281
    {
282
      getPaymentsForUser_args args = new getPaymentsForUser_args();
3430 rajveer 283
      args.setUserId(userId);
284
      args.setFromTime(fromTime);
285
      args.setToTime(toTime);
286
      args.setStatus(status);
287
      args.setGatewayId(gatewayId);
288
      sendBase("getPaymentsForUser", args);
123 ashish 289
    }
290
 
3430 rajveer 291
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, org.apache.thrift.TException
123 ashish 292
    {
293
      getPaymentsForUser_result result = new getPaymentsForUser_result();
3430 rajveer 294
      receiveBase(result, "getPaymentsForUser");
123 ashish 295
      if (result.isSetSuccess()) {
296
        return result.success;
297
      }
298
      if (result.pe != null) {
299
        throw result.pe;
300
      }
3430 rajveer 301
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
123 ashish 302
    }
303
 
3430 rajveer 304
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 305
    {
695 rajveer 306
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 307
      return recv_getPayments();
308
    }
309
 
3430 rajveer 310
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 311
    {
312
      getPayments_args args = new getPayments_args();
3430 rajveer 313
      args.setFromTime(fromTime);
314
      args.setToTime(toTime);
315
      args.setStatus(status);
316
      args.setGatewayId(gatewayId);
317
      sendBase("getPayments", args);
123 ashish 318
    }
319
 
3430 rajveer 320
    public List<Payment> recv_getPayments() throws PaymentException, org.apache.thrift.TException
123 ashish 321
    {
322
      getPayments_result result = new getPayments_result();
3430 rajveer 323
      receiveBase(result, "getPayments");
123 ashish 324
      if (result.isSetSuccess()) {
325
        return result.success;
326
      }
327
      if (result.pe != null) {
328
        throw result.pe;
329
      }
3430 rajveer 330
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
123 ashish 331
    }
332
 
4141 chandransh 333
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException
334
    {
335
      send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId);
336
      return recv_getPaymentsByCapturedDate();
337
    }
338
 
339
    public void send_getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws org.apache.thrift.TException
340
    {
341
      getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
342
      args.setFromTime(fromTime);
343
      args.setToTime(toTime);
344
      args.setGatewayId(gatewayId);
345
      sendBase("getPaymentsByCapturedDate", args);
346
    }
347
 
348
    public List<Payment> recv_getPaymentsByCapturedDate() throws PaymentException, org.apache.thrift.TException
349
    {
350
      getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
351
      receiveBase(result, "getPaymentsByCapturedDate");
352
      if (result.isSetSuccess()) {
353
        return result.success;
354
      }
355
      if (result.pe != null) {
356
        throw result.pe;
357
      }
358
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");
359
    }
360
 
3430 rajveer 361
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 362
    {
363
      send_getPaymentGateway(id);
364
      return recv_getPaymentGateway();
365
    }
366
 
3430 rajveer 367
    public void send_getPaymentGateway(long id) throws org.apache.thrift.TException
420 ashish 368
    {
369
      getPaymentGateway_args args = new getPaymentGateway_args();
3430 rajveer 370
      args.setId(id);
371
      sendBase("getPaymentGateway", args);
420 ashish 372
    }
373
 
3430 rajveer 374
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, org.apache.thrift.TException
420 ashish 375
    {
376
      getPaymentGateway_result result = new getPaymentGateway_result();
3430 rajveer 377
      receiveBase(result, "getPaymentGateway");
420 ashish 378
      if (result.isSetSuccess()) {
379
        return result.success;
380
      }
381
      if (result.pe != null) {
382
        throw result.pe;
383
      }
3430 rajveer 384
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
420 ashish 385
    }
386
 
3430 rajveer 387
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 388
    {
695 rajveer 389
      send_getPayment(id);
390
      return recv_getPayment();
420 ashish 391
    }
392
 
3430 rajveer 393
    public void send_getPayment(long id) throws org.apache.thrift.TException
420 ashish 394
    {
695 rajveer 395
      getPayment_args args = new getPayment_args();
3430 rajveer 396
      args.setId(id);
397
      sendBase("getPayment", args);
420 ashish 398
    }
399
 
3430 rajveer 400
    public Payment recv_getPayment() throws PaymentException, org.apache.thrift.TException
420 ashish 401
    {
695 rajveer 402
      getPayment_result result = new getPayment_result();
3430 rajveer 403
      receiveBase(result, "getPayment");
695 rajveer 404
      if (result.isSetSuccess()) {
405
        return result.success;
406
      }
420 ashish 407
      if (result.pe != null) {
408
        throw result.pe;
409
      }
3430 rajveer 410
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 411
    }
412
 
3430 rajveer 413
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
420 ashish 414
    {
695 rajveer 415
      send_getPaymentForTxnId(txnId);
416
      return recv_getPaymentForTxnId();
420 ashish 417
    }
418
 
3430 rajveer 419
    public void send_getPaymentForTxnId(long txnId) throws org.apache.thrift.TException
420 ashish 420
    {
695 rajveer 421
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
3430 rajveer 422
      args.setTxnId(txnId);
423
      sendBase("getPaymentForTxnId", args);
420 ashish 424
    }
425
 
3430 rajveer 426
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
420 ashish 427
    {
695 rajveer 428
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
3430 rajveer 429
      receiveBase(result, "getPaymentForTxnId");
420 ashish 430
      if (result.isSetSuccess()) {
431
        return result.success;
432
      }
433
      if (result.pe != null) {
434
        throw result.pe;
435
      }
3430 rajveer 436
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 437
    }
438
 
3430 rajveer 439
    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 440
    {
1119 rajveer 441
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 442
      return recv_updatePaymentDetails();
420 ashish 443
    }
444
 
3430 rajveer 445
    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 446
    {
695 rajveer 447
      updatePaymentDetails_args args = new updatePaymentDetails_args();
3430 rajveer 448
      args.setId(id);
449
      args.setGatewayPaymentId(gatewayPaymentId);
450
      args.setSessionId(sessionId);
451
      args.setGatewayTxnStatus(gatewayTxnStatus);
452
      args.setDescription(description);
453
      args.setGatewayTxnId(gatewayTxnId);
454
      args.setAuthCode(authCode);
455
      args.setReferenceCode(referenceCode);
456
      args.setErrorCode(errorCode);
457
      args.setStatus(status);
458
      args.setGatewayTxnDate(gatewayTxnDate);
459
      args.setAttributes(attributes);
460
      sendBase("updatePaymentDetails", args);
420 ashish 461
    }
462
 
3430 rajveer 463
    public boolean recv_updatePaymentDetails() throws PaymentException, org.apache.thrift.TException
420 ashish 464
    {
695 rajveer 465
      updatePaymentDetails_result result = new updatePaymentDetails_result();
3430 rajveer 466
      receiveBase(result, "updatePaymentDetails");
695 rajveer 467
      if (result.isSetSuccess()) {
468
        return result.success;
469
      }
420 ashish 470
      if (result.pe != null) {
471
        throw result.pe;
472
      }
3430 rajveer 473
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 474
    }
475
 
3430 rajveer 476
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 477
    {
1731 ankur.sing 478
      send_getSuccessfulPaymentsAmountRange();
479
      return recv_getSuccessfulPaymentsAmountRange();
1629 ankur.sing 480
    }
481
 
3430 rajveer 482
    public void send_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 483
    {
1731 ankur.sing 484
      getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
3430 rajveer 485
      sendBase("getSuccessfulPaymentsAmountRange", args);
1629 ankur.sing 486
    }
487
 
3430 rajveer 488
    public List<Double> recv_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 489
    {
1731 ankur.sing 490
      getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 491
      receiveBase(result, "getSuccessfulPaymentsAmountRange");
1629 ankur.sing 492
      if (result.isSetSuccess()) {
493
        return result.success;
494
      }
3430 rajveer 495
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1629 ankur.sing 496
    }
497
 
3430 rajveer 498
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
2462 chandransh 499
    {
500
      send_initializeHdfcPayment(merchantPaymentId);
501
      return recv_initializeHdfcPayment();
502
    }
503
 
3430 rajveer 504
    public void send_initializeHdfcPayment(long merchantPaymentId) throws org.apache.thrift.TException
2462 chandransh 505
    {
506
      initializeHdfcPayment_args args = new initializeHdfcPayment_args();
3430 rajveer 507
      args.setMerchantPaymentId(merchantPaymentId);
508
      sendBase("initializeHdfcPayment", args);
2462 chandransh 509
    }
510
 
3430 rajveer 511
    public String recv_initializeHdfcPayment() throws PaymentException, org.apache.thrift.TException
2462 chandransh 512
    {
513
      initializeHdfcPayment_result result = new initializeHdfcPayment_result();
3430 rajveer 514
      receiveBase(result, "initializeHdfcPayment");
2462 chandransh 515
      if (result.isSetSuccess()) {
516
        return result.success;
517
      }
518
      if (result.pe != null) {
519
        throw result.pe;
520
      }
3430 rajveer 521
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
2462 chandransh 522
    }
523
 
3616 chandransh 524
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
525
    {
526
      send_initializeHdfcEmiPayment(merchantPaymentId);
527
      return recv_initializeHdfcEmiPayment();
528
    }
529
 
530
    public void send_initializeHdfcEmiPayment(long merchantPaymentId) throws org.apache.thrift.TException
531
    {
532
      initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
533
      args.setMerchantPaymentId(merchantPaymentId);
534
      sendBase("initializeHdfcEmiPayment", args);
535
    }
536
 
537
    public String recv_initializeHdfcEmiPayment() throws PaymentException, org.apache.thrift.TException
538
    {
539
      initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
540
      receiveBase(result, "initializeHdfcEmiPayment");
541
      if (result.isSetSuccess()) {
542
        return result.success;
543
      }
544
      if (result.pe != null) {
545
        throw result.pe;
546
      }
547
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
548
    }
549
 
3430 rajveer 550
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
2690 chandransh 551
    {
552
      send_createRefund(orderId, merchantTxnId, amount);
553
      return recv_createRefund();
554
    }
555
 
3430 rajveer 556
    public void send_createRefund(long orderId, long merchantTxnId, double amount) throws org.apache.thrift.TException
2690 chandransh 557
    {
558
      createRefund_args args = new createRefund_args();
3430 rajveer 559
      args.setOrderId(orderId);
560
      args.setMerchantTxnId(merchantTxnId);
561
      args.setAmount(amount);
562
      sendBase("createRefund", args);
2690 chandransh 563
    }
564
 
3430 rajveer 565
    public long recv_createRefund() throws PaymentException, org.apache.thrift.TException
2690 chandransh 566
    {
567
      createRefund_result result = new createRefund_result();
3430 rajveer 568
      receiveBase(result, "createRefund");
2690 chandransh 569
      if (result.isSetSuccess()) {
570
        return result.success;
571
      }
572
      if (result.pe != null) {
573
        throw result.pe;
574
      }
3430 rajveer 575
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
2690 chandransh 576
    }
577
 
3430 rajveer 578
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException
3010 chandransh 579
    {
580
      send_capturePayment(merchantTxnId);
581
      return recv_capturePayment();
582
    }
583
 
3430 rajveer 584
    public void send_capturePayment(long merchantTxnId) throws org.apache.thrift.TException
3010 chandransh 585
    {
586
      capturePayment_args args = new capturePayment_args();
3430 rajveer 587
      args.setMerchantTxnId(merchantTxnId);
588
      sendBase("capturePayment", args);
3010 chandransh 589
    }
590
 
3430 rajveer 591
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
3010 chandransh 592
    {
593
      capturePayment_result result = new capturePayment_result();
3430 rajveer 594
      receiveBase(result, "capturePayment");
3010 chandransh 595
      if (result.isSetSuccess()) {
596
        return result.success;
597
      }
598
      if (result.pe != null) {
599
        throw result.pe;
600
      }
3430 rajveer 601
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
3010 chandransh 602
    }
603
 
3956 chandransh 604
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
605
    {
606
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
607
      return recv_partiallyCapturePayment();
608
    }
609
 
610
    public void send_partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws org.apache.thrift.TException
611
    {
612
      partiallyCapturePayment_args args = new partiallyCapturePayment_args();
613
      args.setMerchantTxnId(merchantTxnId);
614
      args.setAmount(amount);
615
      args.setXferBy(xferBy);
616
      args.setXferTxnId(xferTxnId);
617
      args.setXferDate(xferDate);
618
      sendBase("partiallyCapturePayment", args);
619
    }
620
 
621
    public boolean recv_partiallyCapturePayment() throws PaymentException, org.apache.thrift.TException
622
    {
623
      partiallyCapturePayment_result result = new partiallyCapturePayment_result();
624
      receiveBase(result, "partiallyCapturePayment");
625
      if (result.isSetSuccess()) {
626
        return result.success;
627
      }
628
      if (result.pe != null) {
629
        throw result.pe;
630
      }
631
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
632
    }
633
 
4008 mandeep.dh 634
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
635
    {
636
      send_getPaymentsRequiringExtraProcessing(category);
637
      return recv_getPaymentsRequiringExtraProcessing();
638
    }
639
 
640
    public void send_getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
641
    {
642
      getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
643
      args.setCategory(category);
644
      sendBase("getPaymentsRequiringExtraProcessing", args);
645
    }
646
 
647
    public List<Long> recv_getPaymentsRequiringExtraProcessing() throws org.apache.thrift.TException
648
    {
649
      getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
650
      receiveBase(result, "getPaymentsRequiringExtraProcessing");
651
      if (result.isSetSuccess()) {
652
        return result.success;
653
      }
654
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
655
    }
656
 
657
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
658
    {
659
      send_markPaymentAsProcessed(paymentId, category);
660
      recv_markPaymentAsProcessed();
661
    }
662
 
663
    public void send_markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
664
    {
665
      markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
666
      args.setPaymentId(paymentId);
667
      args.setCategory(category);
668
      sendBase("markPaymentAsProcessed", args);
669
    }
670
 
671
    public void recv_markPaymentAsProcessed() throws org.apache.thrift.TException
672
    {
673
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
674
      receiveBase(result, "markPaymentAsProcessed");
675
      return;
676
    }
677
 
123 ashish 678
  }
3430 rajveer 679
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
680
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
681
      private org.apache.thrift.async.TAsyncClientManager clientManager;
682
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
683
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
684
        this.clientManager = clientManager;
685
        this.protocolFactory = protocolFactory;
686
      }
687
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
688
        return new AsyncClient(protocolFactory, clientManager, transport);
689
      }
123 ashish 690
    }
691
 
3430 rajveer 692
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
693
      super(protocolFactory, clientManager, transport);
694
    }
123 ashish 695
 
3430 rajveer 696
    public void createPayment(long userId, double amount, long gatewayId, long txnId, org.apache.thrift.async.AsyncMethodCallback<createPayment_call> resultHandler) throws org.apache.thrift.TException {
697
      checkReady();
698
      createPayment_call method_call = new createPayment_call(userId, amount, gatewayId, txnId, resultHandler, this, ___protocolFactory, ___transport);
699
      this.___currentMethod = method_call;
700
      ___manager.call(method_call);
701
    }
702
 
703
    public static class createPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
704
      private long userId;
705
      private double amount;
706
      private long gatewayId;
707
      private long txnId;
708
      public createPayment_call(long userId, double amount, long gatewayId, long txnId, org.apache.thrift.async.AsyncMethodCallback<createPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
709
        super(client, protocolFactory, transport, resultHandler, false);
710
        this.userId = userId;
711
        this.amount = amount;
712
        this.gatewayId = gatewayId;
713
        this.txnId = txnId;
123 ashish 714
      }
3430 rajveer 715
 
716
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
717
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
718
        createPayment_args args = new createPayment_args();
719
        args.setUserId(userId);
720
        args.setAmount(amount);
721
        args.setGatewayId(gatewayId);
722
        args.setTxnId(txnId);
723
        args.write(prot);
724
        prot.writeMessageEnd();
725
      }
726
 
727
      public long getResult() throws PaymentException, org.apache.thrift.TException {
728
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
729
          throw new IllegalStateException("Method call not finished!");
730
        }
731
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
732
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
733
        return (new Client(prot)).recv_createPayment();
734
      }
123 ashish 735
    }
736
 
3430 rajveer 737
    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 {
738
      checkReady();
739
      getPaymentsForUser_call method_call = new getPaymentsForUser_call(userId, fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
740
      this.___currentMethod = method_call;
741
      ___manager.call(method_call);
742
    }
743
 
744
    public static class getPaymentsForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
745
      private long userId;
746
      private long fromTime;
747
      private long toTime;
748
      private PaymentStatus status;
749
      private long gatewayId;
750
      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 {
751
        super(client, protocolFactory, transport, resultHandler, false);
752
        this.userId = userId;
753
        this.fromTime = fromTime;
754
        this.toTime = toTime;
755
        this.status = status;
756
        this.gatewayId = gatewayId;
757
      }
758
 
759
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
760
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
761
        getPaymentsForUser_args args = new getPaymentsForUser_args();
762
        args.setUserId(userId);
763
        args.setFromTime(fromTime);
764
        args.setToTime(toTime);
765
        args.setStatus(status);
766
        args.setGatewayId(gatewayId);
767
        args.write(prot);
768
        prot.writeMessageEnd();
769
      }
770
 
771
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
772
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
773
          throw new IllegalStateException("Method call not finished!");
774
        }
775
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
776
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
777
        return (new Client(prot)).recv_getPaymentsForUser();
778
      }
779
    }
780
 
781
    public void getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPayments_call> resultHandler) throws org.apache.thrift.TException {
782
      checkReady();
783
      getPayments_call method_call = new getPayments_call(fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
784
      this.___currentMethod = method_call;
785
      ___manager.call(method_call);
786
    }
787
 
788
    public static class getPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
789
      private long fromTime;
790
      private long toTime;
791
      private PaymentStatus status;
792
      private long gatewayId;
793
      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 {
794
        super(client, protocolFactory, transport, resultHandler, false);
795
        this.fromTime = fromTime;
796
        this.toTime = toTime;
797
        this.status = status;
798
        this.gatewayId = gatewayId;
799
      }
800
 
801
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
802
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
803
        getPayments_args args = new getPayments_args();
804
        args.setFromTime(fromTime);
805
        args.setToTime(toTime);
806
        args.setStatus(status);
807
        args.setGatewayId(gatewayId);
808
        args.write(prot);
809
        prot.writeMessageEnd();
810
      }
811
 
812
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
813
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
814
          throw new IllegalStateException("Method call not finished!");
815
        }
816
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
817
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
818
        return (new Client(prot)).recv_getPayments();
819
      }
820
    }
821
 
4141 chandransh 822
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException {
823
      checkReady();
824
      getPaymentsByCapturedDate_call method_call = new getPaymentsByCapturedDate_call(fromTime, toTime, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
825
      this.___currentMethod = method_call;
826
      ___manager.call(method_call);
827
    }
828
 
829
    public static class getPaymentsByCapturedDate_call extends org.apache.thrift.async.TAsyncMethodCall {
830
      private long fromTime;
831
      private long toTime;
832
      private long gatewayId;
833
      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 {
834
        super(client, protocolFactory, transport, resultHandler, false);
835
        this.fromTime = fromTime;
836
        this.toTime = toTime;
837
        this.gatewayId = gatewayId;
838
      }
839
 
840
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
841
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsByCapturedDate", org.apache.thrift.protocol.TMessageType.CALL, 0));
842
        getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
843
        args.setFromTime(fromTime);
844
        args.setToTime(toTime);
845
        args.setGatewayId(gatewayId);
846
        args.write(prot);
847
        prot.writeMessageEnd();
848
      }
849
 
850
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
851
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
852
          throw new IllegalStateException("Method call not finished!");
853
        }
854
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
855
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
856
        return (new Client(prot)).recv_getPaymentsByCapturedDate();
857
      }
858
    }
859
 
3430 rajveer 860
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException {
861
      checkReady();
862
      getPaymentGateway_call method_call = new getPaymentGateway_call(id, resultHandler, this, ___protocolFactory, ___transport);
863
      this.___currentMethod = method_call;
864
      ___manager.call(method_call);
865
    }
866
 
867
    public static class getPaymentGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
868
      private long id;
869
      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 {
870
        super(client, protocolFactory, transport, resultHandler, false);
871
        this.id = id;
872
      }
873
 
874
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
875
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
876
        getPaymentGateway_args args = new getPaymentGateway_args();
877
        args.setId(id);
878
        args.write(prot);
879
        prot.writeMessageEnd();
880
      }
881
 
882
      public PaymentGateway getResult() throws PaymentException, org.apache.thrift.TException {
883
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
884
          throw new IllegalStateException("Method call not finished!");
885
        }
886
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
887
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
888
        return (new Client(prot)).recv_getPaymentGateway();
889
      }
890
    }
891
 
892
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<getPayment_call> resultHandler) throws org.apache.thrift.TException {
893
      checkReady();
894
      getPayment_call method_call = new getPayment_call(id, resultHandler, this, ___protocolFactory, ___transport);
895
      this.___currentMethod = method_call;
896
      ___manager.call(method_call);
897
    }
898
 
899
    public static class getPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
900
      private long id;
901
      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 {
902
        super(client, protocolFactory, transport, resultHandler, false);
903
        this.id = id;
904
      }
905
 
906
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
907
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
908
        getPayment_args args = new getPayment_args();
909
        args.setId(id);
910
        args.write(prot);
911
        prot.writeMessageEnd();
912
      }
913
 
914
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
915
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
916
          throw new IllegalStateException("Method call not finished!");
917
        }
918
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
919
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
920
        return (new Client(prot)).recv_getPayment();
921
      }
922
    }
923
 
924
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
925
      checkReady();
926
      getPaymentForTxnId_call method_call = new getPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
927
      this.___currentMethod = method_call;
928
      ___manager.call(method_call);
929
    }
930
 
931
    public static class getPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
932
      private long txnId;
933
      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 {
934
        super(client, protocolFactory, transport, resultHandler, false);
935
        this.txnId = txnId;
936
      }
937
 
938
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
939
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
940
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
941
        args.setTxnId(txnId);
942
        args.write(prot);
943
        prot.writeMessageEnd();
944
      }
945
 
946
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
947
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
948
          throw new IllegalStateException("Method call not finished!");
949
        }
950
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
951
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
952
        return (new Client(prot)).recv_getPaymentForTxnId();
953
      }
954
    }
955
 
956
    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 {
957
      checkReady();
958
      updatePaymentDetails_call method_call = new updatePaymentDetails_call(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes, resultHandler, this, ___protocolFactory, ___transport);
959
      this.___currentMethod = method_call;
960
      ___manager.call(method_call);
961
    }
962
 
963
    public static class updatePaymentDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
964
      private long id;
965
      private String gatewayPaymentId;
966
      private String sessionId;
967
      private String gatewayTxnStatus;
968
      private String description;
969
      private String gatewayTxnId;
970
      private String authCode;
971
      private String referenceCode;
972
      private String errorCode;
973
      private PaymentStatus status;
974
      private String gatewayTxnDate;
975
      private List<Attribute> attributes;
976
      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 {
977
        super(client, protocolFactory, transport, resultHandler, false);
978
        this.id = id;
979
        this.gatewayPaymentId = gatewayPaymentId;
980
        this.sessionId = sessionId;
981
        this.gatewayTxnStatus = gatewayTxnStatus;
982
        this.description = description;
983
        this.gatewayTxnId = gatewayTxnId;
984
        this.authCode = authCode;
985
        this.referenceCode = referenceCode;
986
        this.errorCode = errorCode;
987
        this.status = status;
988
        this.gatewayTxnDate = gatewayTxnDate;
989
        this.attributes = attributes;
990
      }
991
 
992
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
993
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePaymentDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
994
        updatePaymentDetails_args args = new updatePaymentDetails_args();
995
        args.setId(id);
996
        args.setGatewayPaymentId(gatewayPaymentId);
997
        args.setSessionId(sessionId);
998
        args.setGatewayTxnStatus(gatewayTxnStatus);
999
        args.setDescription(description);
1000
        args.setGatewayTxnId(gatewayTxnId);
1001
        args.setAuthCode(authCode);
1002
        args.setReferenceCode(referenceCode);
1003
        args.setErrorCode(errorCode);
1004
        args.setStatus(status);
1005
        args.setGatewayTxnDate(gatewayTxnDate);
1006
        args.setAttributes(attributes);
1007
        args.write(prot);
1008
        prot.writeMessageEnd();
1009
      }
1010
 
1011
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1012
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1013
          throw new IllegalStateException("Method call not finished!");
1014
        }
1015
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1016
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1017
        return (new Client(prot)).recv_updatePaymentDetails();
1018
      }
1019
    }
1020
 
1021
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException {
1022
      checkReady();
1023
      getSuccessfulPaymentsAmountRange_call method_call = new getSuccessfulPaymentsAmountRange_call(resultHandler, this, ___protocolFactory, ___transport);
1024
      this.___currentMethod = method_call;
1025
      ___manager.call(method_call);
1026
    }
1027
 
1028
    public static class getSuccessfulPaymentsAmountRange_call extends org.apache.thrift.async.TAsyncMethodCall {
1029
      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 {
1030
        super(client, protocolFactory, transport, resultHandler, false);
1031
      }
1032
 
1033
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1034
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentsAmountRange", org.apache.thrift.protocol.TMessageType.CALL, 0));
1035
        getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1036
        args.write(prot);
1037
        prot.writeMessageEnd();
1038
      }
1039
 
1040
      public List<Double> getResult() throws org.apache.thrift.TException {
1041
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1042
          throw new IllegalStateException("Method call not finished!");
1043
        }
1044
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1045
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1046
        return (new Client(prot)).recv_getSuccessfulPaymentsAmountRange();
1047
      }
1048
    }
1049
 
1050
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException {
1051
      checkReady();
1052
      initializeHdfcPayment_call method_call = new initializeHdfcPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1053
      this.___currentMethod = method_call;
1054
      ___manager.call(method_call);
1055
    }
1056
 
1057
    public static class initializeHdfcPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1058
      private long merchantPaymentId;
1059
      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 {
1060
        super(client, protocolFactory, transport, resultHandler, false);
1061
        this.merchantPaymentId = merchantPaymentId;
1062
      }
1063
 
1064
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1065
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1066
        initializeHdfcPayment_args args = new initializeHdfcPayment_args();
1067
        args.setMerchantPaymentId(merchantPaymentId);
1068
        args.write(prot);
1069
        prot.writeMessageEnd();
1070
      }
1071
 
1072
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1073
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1074
          throw new IllegalStateException("Method call not finished!");
1075
        }
1076
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1077
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1078
        return (new Client(prot)).recv_initializeHdfcPayment();
1079
      }
1080
    }
1081
 
3616 chandransh 1082
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException {
1083
      checkReady();
1084
      initializeHdfcEmiPayment_call method_call = new initializeHdfcEmiPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1085
      this.___currentMethod = method_call;
1086
      ___manager.call(method_call);
1087
    }
1088
 
1089
    public static class initializeHdfcEmiPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1090
      private long merchantPaymentId;
1091
      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 {
1092
        super(client, protocolFactory, transport, resultHandler, false);
1093
        this.merchantPaymentId = merchantPaymentId;
1094
      }
1095
 
1096
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1097
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcEmiPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1098
        initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
1099
        args.setMerchantPaymentId(merchantPaymentId);
1100
        args.write(prot);
1101
        prot.writeMessageEnd();
1102
      }
1103
 
1104
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1105
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1106
          throw new IllegalStateException("Method call not finished!");
1107
        }
1108
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1109
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1110
        return (new Client(prot)).recv_initializeHdfcEmiPayment();
1111
      }
1112
    }
1113
 
3430 rajveer 1114
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
1115
      checkReady();
1116
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
1117
      this.___currentMethod = method_call;
1118
      ___manager.call(method_call);
1119
    }
1120
 
1121
    public static class createRefund_call extends org.apache.thrift.async.TAsyncMethodCall {
1122
      private long orderId;
1123
      private long merchantTxnId;
1124
      private double amount;
1125
      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 {
1126
        super(client, protocolFactory, transport, resultHandler, false);
1127
        this.orderId = orderId;
1128
        this.merchantTxnId = merchantTxnId;
1129
        this.amount = amount;
1130
      }
1131
 
1132
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1133
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRefund", org.apache.thrift.protocol.TMessageType.CALL, 0));
1134
        createRefund_args args = new createRefund_args();
1135
        args.setOrderId(orderId);
1136
        args.setMerchantTxnId(merchantTxnId);
1137
        args.setAmount(amount);
1138
        args.write(prot);
1139
        prot.writeMessageEnd();
1140
      }
1141
 
1142
      public long getResult() throws PaymentException, org.apache.thrift.TException {
1143
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1144
          throw new IllegalStateException("Method call not finished!");
1145
        }
1146
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1147
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1148
        return (new Client(prot)).recv_createRefund();
1149
      }
1150
    }
1151
 
1152
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
1153
      checkReady();
1154
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, resultHandler, this, ___protocolFactory, ___transport);
1155
      this.___currentMethod = method_call;
1156
      ___manager.call(method_call);
1157
    }
1158
 
1159
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1160
      private long merchantTxnId;
1161
      public capturePayment_call(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1162
        super(client, protocolFactory, transport, resultHandler, false);
1163
        this.merchantTxnId = merchantTxnId;
1164
      }
1165
 
1166
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1167
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1168
        capturePayment_args args = new capturePayment_args();
1169
        args.setMerchantTxnId(merchantTxnId);
1170
        args.write(prot);
1171
        prot.writeMessageEnd();
1172
      }
1173
 
1174
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1175
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1176
          throw new IllegalStateException("Method call not finished!");
1177
        }
1178
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1179
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1180
        return (new Client(prot)).recv_capturePayment();
1181
      }
1182
    }
1183
 
3956 chandransh 1184
    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 {
1185
      checkReady();
1186
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1187
      this.___currentMethod = method_call;
1188
      ___manager.call(method_call);
1189
    }
1190
 
1191
    public static class partiallyCapturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1192
      private long merchantTxnId;
1193
      private double amount;
1194
      private String xferBy;
1195
      private String xferTxnId;
1196
      private long xferDate;
1197
      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 {
1198
        super(client, protocolFactory, transport, resultHandler, false);
1199
        this.merchantTxnId = merchantTxnId;
1200
        this.amount = amount;
1201
        this.xferBy = xferBy;
1202
        this.xferTxnId = xferTxnId;
1203
        this.xferDate = xferDate;
1204
      }
1205
 
1206
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1207
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partiallyCapturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1208
        partiallyCapturePayment_args args = new partiallyCapturePayment_args();
1209
        args.setMerchantTxnId(merchantTxnId);
1210
        args.setAmount(amount);
1211
        args.setXferBy(xferBy);
1212
        args.setXferTxnId(xferTxnId);
1213
        args.setXferDate(xferDate);
1214
        args.write(prot);
1215
        prot.writeMessageEnd();
1216
      }
1217
 
1218
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1219
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1220
          throw new IllegalStateException("Method call not finished!");
1221
        }
1222
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1223
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1224
        return (new Client(prot)).recv_partiallyCapturePayment();
1225
      }
1226
    }
1227
 
4008 mandeep.dh 1228
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException {
1229
      checkReady();
1230
      getPaymentsRequiringExtraProcessing_call method_call = new getPaymentsRequiringExtraProcessing_call(category, resultHandler, this, ___protocolFactory, ___transport);
1231
      this.___currentMethod = method_call;
1232
      ___manager.call(method_call);
1233
    }
1234
 
1235
    public static class getPaymentsRequiringExtraProcessing_call extends org.apache.thrift.async.TAsyncMethodCall {
1236
      private ExtraPaymentProcessingType category;
1237
      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 {
1238
        super(client, protocolFactory, transport, resultHandler, false);
1239
        this.category = category;
1240
      }
1241
 
1242
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1243
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsRequiringExtraProcessing", org.apache.thrift.protocol.TMessageType.CALL, 0));
1244
        getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
1245
        args.setCategory(category);
1246
        args.write(prot);
1247
        prot.writeMessageEnd();
1248
      }
1249
 
1250
      public List<Long> getResult() throws org.apache.thrift.TException {
1251
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1252
          throw new IllegalStateException("Method call not finished!");
1253
        }
1254
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1255
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1256
        return (new Client(prot)).recv_getPaymentsRequiringExtraProcessing();
1257
      }
1258
    }
1259
 
1260
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException {
1261
      checkReady();
1262
      markPaymentAsProcessed_call method_call = new markPaymentAsProcessed_call(paymentId, category, resultHandler, this, ___protocolFactory, ___transport);
1263
      this.___currentMethod = method_call;
1264
      ___manager.call(method_call);
1265
    }
1266
 
1267
    public static class markPaymentAsProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
1268
      private long paymentId;
1269
      private ExtraPaymentProcessingType category;
1270
      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 {
1271
        super(client, protocolFactory, transport, resultHandler, false);
1272
        this.paymentId = paymentId;
1273
        this.category = category;
1274
      }
1275
 
1276
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1277
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPaymentAsProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
1278
        markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
1279
        args.setPaymentId(paymentId);
1280
        args.setCategory(category);
1281
        args.write(prot);
1282
        prot.writeMessageEnd();
1283
      }
1284
 
1285
      public void getResult() throws org.apache.thrift.TException {
1286
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1287
          throw new IllegalStateException("Method call not finished!");
1288
        }
1289
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1290
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1291
        (new Client(prot)).recv_markPaymentAsProcessed();
1292
      }
1293
    }
1294
 
3430 rajveer 1295
  }
1296
 
1297
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1298
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1299
    public Processor(I iface) {
1300
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1301
    }
1302
 
1303
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1304
      super(iface, getProcessMap(processMap));
1305
    }
1306
 
1307
    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) {
1308
      processMap.put("createPayment", new createPayment());
1309
      processMap.put("getPaymentsForUser", new getPaymentsForUser());
1310
      processMap.put("getPayments", new getPayments());
4141 chandransh 1311
      processMap.put("getPaymentsByCapturedDate", new getPaymentsByCapturedDate());
3430 rajveer 1312
      processMap.put("getPaymentGateway", new getPaymentGateway());
1313
      processMap.put("getPayment", new getPayment());
1314
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
1315
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
1316
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1317
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
3616 chandransh 1318
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
3430 rajveer 1319
      processMap.put("createRefund", new createRefund());
1320
      processMap.put("capturePayment", new capturePayment());
3956 chandransh 1321
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
4008 mandeep.dh 1322
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1323
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
3430 rajveer 1324
      return processMap;
1325
    }
1326
 
1327
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1328
      public createPayment() {
1329
        super("createPayment");
1330
      }
1331
 
1332
      protected createPayment_args getEmptyArgsInstance() {
1333
        return new createPayment_args();
1334
      }
1335
 
1336
      protected createPayment_result getResult(I iface, createPayment_args args) throws org.apache.thrift.TException {
123 ashish 1337
        createPayment_result result = new createPayment_result();
1338
        try {
3430 rajveer 1339
          result.success = iface.createPayment(args.userId, args.amount, args.gatewayId, args.txnId);
420 ashish 1340
          result.setSuccessIsSet(true);
123 ashish 1341
        } catch (PaymentException pe) {
1342
          result.pe = pe;
1343
        }
3430 rajveer 1344
        return result;
123 ashish 1345
      }
1346
    }
1347
 
3430 rajveer 1348
    private static class getPaymentsForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsForUser_args> {
1349
      public getPaymentsForUser() {
1350
        super("getPaymentsForUser");
1351
      }
1352
 
1353
      protected getPaymentsForUser_args getEmptyArgsInstance() {
1354
        return new getPaymentsForUser_args();
1355
      }
1356
 
1357
      protected getPaymentsForUser_result getResult(I iface, getPaymentsForUser_args args) throws org.apache.thrift.TException {
123 ashish 1358
        getPaymentsForUser_result result = new getPaymentsForUser_result();
1359
        try {
3430 rajveer 1360
          result.success = iface.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1361
        } catch (PaymentException pe) {
1362
          result.pe = pe;
1363
        }
3430 rajveer 1364
        return result;
123 ashish 1365
      }
1366
    }
1367
 
3430 rajveer 1368
    private static class getPayments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayments_args> {
1369
      public getPayments() {
1370
        super("getPayments");
1371
      }
1372
 
1373
      protected getPayments_args getEmptyArgsInstance() {
1374
        return new getPayments_args();
1375
      }
1376
 
1377
      protected getPayments_result getResult(I iface, getPayments_args args) throws org.apache.thrift.TException {
123 ashish 1378
        getPayments_result result = new getPayments_result();
1379
        try {
3430 rajveer 1380
          result.success = iface.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1381
        } catch (PaymentException pe) {
1382
          result.pe = pe;
1383
        }
3430 rajveer 1384
        return result;
123 ashish 1385
      }
1386
    }
1387
 
4141 chandransh 1388
    private static class getPaymentsByCapturedDate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsByCapturedDate_args> {
1389
      public getPaymentsByCapturedDate() {
1390
        super("getPaymentsByCapturedDate");
1391
      }
1392
 
1393
      protected getPaymentsByCapturedDate_args getEmptyArgsInstance() {
1394
        return new getPaymentsByCapturedDate_args();
1395
      }
1396
 
1397
      protected getPaymentsByCapturedDate_result getResult(I iface, getPaymentsByCapturedDate_args args) throws org.apache.thrift.TException {
1398
        getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
1399
        try {
1400
          result.success = iface.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId);
1401
        } catch (PaymentException pe) {
1402
          result.pe = pe;
1403
        }
1404
        return result;
1405
      }
1406
    }
1407
 
3430 rajveer 1408
    private static class getPaymentGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentGateway_args> {
1409
      public getPaymentGateway() {
1410
        super("getPaymentGateway");
1411
      }
1412
 
1413
      protected getPaymentGateway_args getEmptyArgsInstance() {
1414
        return new getPaymentGateway_args();
1415
      }
1416
 
1417
      protected getPaymentGateway_result getResult(I iface, getPaymentGateway_args args) throws org.apache.thrift.TException {
420 ashish 1418
        getPaymentGateway_result result = new getPaymentGateway_result();
1419
        try {
3430 rajveer 1420
          result.success = iface.getPaymentGateway(args.id);
420 ashish 1421
        } catch (PaymentException pe) {
1422
          result.pe = pe;
1423
        }
3430 rajveer 1424
        return result;
420 ashish 1425
      }
1426
    }
1427
 
3430 rajveer 1428
    private static class getPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayment_args> {
1429
      public getPayment() {
1430
        super("getPayment");
1431
      }
1432
 
1433
      protected getPayment_args getEmptyArgsInstance() {
1434
        return new getPayment_args();
1435
      }
1436
 
1437
      protected getPayment_result getResult(I iface, getPayment_args args) throws org.apache.thrift.TException {
695 rajveer 1438
        getPayment_result result = new getPayment_result();
420 ashish 1439
        try {
3430 rajveer 1440
          result.success = iface.getPayment(args.id);
420 ashish 1441
        } catch (PaymentException pe) {
1442
          result.pe = pe;
1443
        }
3430 rajveer 1444
        return result;
420 ashish 1445
      }
1446
    }
1447
 
3430 rajveer 1448
    private static class getPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForTxnId_args> {
1449
      public getPaymentForTxnId() {
1450
        super("getPaymentForTxnId");
1451
      }
1452
 
1453
      protected getPaymentForTxnId_args getEmptyArgsInstance() {
1454
        return new getPaymentForTxnId_args();
1455
      }
1456
 
1457
      protected getPaymentForTxnId_result getResult(I iface, getPaymentForTxnId_args args) throws org.apache.thrift.TException {
695 rajveer 1458
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 1459
        try {
3430 rajveer 1460
          result.success = iface.getPaymentForTxnId(args.txnId);
420 ashish 1461
        } catch (PaymentException pe) {
1462
          result.pe = pe;
1463
        }
3430 rajveer 1464
        return result;
420 ashish 1465
      }
1466
    }
1467
 
3430 rajveer 1468
    private static class updatePaymentDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePaymentDetails_args> {
1469
      public updatePaymentDetails() {
1470
        super("updatePaymentDetails");
1471
      }
1472
 
1473
      protected updatePaymentDetails_args getEmptyArgsInstance() {
1474
        return new updatePaymentDetails_args();
1475
      }
1476
 
1477
      protected updatePaymentDetails_result getResult(I iface, updatePaymentDetails_args args) throws org.apache.thrift.TException {
695 rajveer 1478
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 1479
        try {
3430 rajveer 1480
          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 1481
          result.setSuccessIsSet(true);
420 ashish 1482
        } catch (PaymentException pe) {
1483
          result.pe = pe;
1484
        }
3430 rajveer 1485
        return result;
420 ashish 1486
      }
1487
    }
1488
 
3430 rajveer 1489
    private static class getSuccessfulPaymentsAmountRange<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentsAmountRange_args> {
1490
      public getSuccessfulPaymentsAmountRange() {
1491
        super("getSuccessfulPaymentsAmountRange");
1492
      }
1493
 
1494
      protected getSuccessfulPaymentsAmountRange_args getEmptyArgsInstance() {
1495
        return new getSuccessfulPaymentsAmountRange_args();
1496
      }
1497
 
1498
      protected getSuccessfulPaymentsAmountRange_result getResult(I iface, getSuccessfulPaymentsAmountRange_args args) throws org.apache.thrift.TException {
1731 ankur.sing 1499
        getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 1500
        result.success = iface.getSuccessfulPaymentsAmountRange();
1501
        return result;
1629 ankur.sing 1502
      }
1503
    }
1504
 
3430 rajveer 1505
    private static class initializeHdfcPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcPayment_args> {
1506
      public initializeHdfcPayment() {
1507
        super("initializeHdfcPayment");
1508
      }
1509
 
1510
      protected initializeHdfcPayment_args getEmptyArgsInstance() {
1511
        return new initializeHdfcPayment_args();
1512
      }
1513
 
1514
      protected initializeHdfcPayment_result getResult(I iface, initializeHdfcPayment_args args) throws org.apache.thrift.TException {
2462 chandransh 1515
        initializeHdfcPayment_result result = new initializeHdfcPayment_result();
1516
        try {
3430 rajveer 1517
          result.success = iface.initializeHdfcPayment(args.merchantPaymentId);
2462 chandransh 1518
        } catch (PaymentException pe) {
1519
          result.pe = pe;
1520
        }
3430 rajveer 1521
        return result;
2462 chandransh 1522
      }
1523
    }
1524
 
3616 chandransh 1525
    private static class initializeHdfcEmiPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcEmiPayment_args> {
1526
      public initializeHdfcEmiPayment() {
1527
        super("initializeHdfcEmiPayment");
1528
      }
1529
 
1530
      protected initializeHdfcEmiPayment_args getEmptyArgsInstance() {
1531
        return new initializeHdfcEmiPayment_args();
1532
      }
1533
 
1534
      protected initializeHdfcEmiPayment_result getResult(I iface, initializeHdfcEmiPayment_args args) throws org.apache.thrift.TException {
1535
        initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
1536
        try {
1537
          result.success = iface.initializeHdfcEmiPayment(args.merchantPaymentId);
1538
        } catch (PaymentException pe) {
1539
          result.pe = pe;
1540
        }
1541
        return result;
1542
      }
1543
    }
1544
 
3430 rajveer 1545
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
1546
      public createRefund() {
1547
        super("createRefund");
1548
      }
1549
 
1550
      protected createRefund_args getEmptyArgsInstance() {
1551
        return new createRefund_args();
1552
      }
1553
 
1554
      protected createRefund_result getResult(I iface, createRefund_args args) throws org.apache.thrift.TException {
2690 chandransh 1555
        createRefund_result result = new createRefund_result();
1556
        try {
3430 rajveer 1557
          result.success = iface.createRefund(args.orderId, args.merchantTxnId, args.amount);
2690 chandransh 1558
          result.setSuccessIsSet(true);
1559
        } catch (PaymentException pe) {
1560
          result.pe = pe;
1561
        }
3430 rajveer 1562
        return result;
2690 chandransh 1563
      }
1564
    }
1565
 
3430 rajveer 1566
    private static class capturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, capturePayment_args> {
1567
      public capturePayment() {
1568
        super("capturePayment");
1569
      }
1570
 
1571
      protected capturePayment_args getEmptyArgsInstance() {
1572
        return new capturePayment_args();
1573
      }
1574
 
1575
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
3010 chandransh 1576
        capturePayment_result result = new capturePayment_result();
1577
        try {
3430 rajveer 1578
          result.success = iface.capturePayment(args.merchantTxnId);
3010 chandransh 1579
          result.setSuccessIsSet(true);
1580
        } catch (PaymentException pe) {
1581
          result.pe = pe;
1582
        }
3430 rajveer 1583
        return result;
3010 chandransh 1584
      }
1585
    }
1586
 
3956 chandransh 1587
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
1588
      public partiallyCapturePayment() {
1589
        super("partiallyCapturePayment");
1590
      }
1591
 
1592
      protected partiallyCapturePayment_args getEmptyArgsInstance() {
1593
        return new partiallyCapturePayment_args();
1594
      }
1595
 
1596
      protected partiallyCapturePayment_result getResult(I iface, partiallyCapturePayment_args args) throws org.apache.thrift.TException {
1597
        partiallyCapturePayment_result result = new partiallyCapturePayment_result();
1598
        try {
1599
          result.success = iface.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate);
1600
          result.setSuccessIsSet(true);
1601
        } catch (PaymentException pe) {
1602
          result.pe = pe;
1603
        }
1604
        return result;
1605
      }
1606
    }
1607
 
4008 mandeep.dh 1608
    private static class getPaymentsRequiringExtraProcessing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsRequiringExtraProcessing_args> {
1609
      public getPaymentsRequiringExtraProcessing() {
1610
        super("getPaymentsRequiringExtraProcessing");
1611
      }
1612
 
1613
      protected getPaymentsRequiringExtraProcessing_args getEmptyArgsInstance() {
1614
        return new getPaymentsRequiringExtraProcessing_args();
1615
      }
1616
 
1617
      protected getPaymentsRequiringExtraProcessing_result getResult(I iface, getPaymentsRequiringExtraProcessing_args args) throws org.apache.thrift.TException {
1618
        getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
1619
        result.success = iface.getPaymentsRequiringExtraProcessing(args.category);
1620
        return result;
1621
      }
1622
    }
1623
 
1624
    private static class markPaymentAsProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPaymentAsProcessed_args> {
1625
      public markPaymentAsProcessed() {
1626
        super("markPaymentAsProcessed");
1627
      }
1628
 
1629
      protected markPaymentAsProcessed_args getEmptyArgsInstance() {
1630
        return new markPaymentAsProcessed_args();
1631
      }
1632
 
1633
      protected markPaymentAsProcessed_result getResult(I iface, markPaymentAsProcessed_args args) throws org.apache.thrift.TException {
1634
        markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
1635
        iface.markPaymentAsProcessed(args.paymentId, args.category);
1636
        return result;
1637
      }
1638
    }
1639
 
123 ashish 1640
  }
1641
 
3430 rajveer 1642
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
1643
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
123 ashish 1644
 
3430 rajveer 1645
    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);
1646
    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);
1647
    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);
1648
    private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)4);
123 ashish 1649
 
3430 rajveer 1650
    private long userId; // required
1651
    private double amount; // required
1652
    private long gatewayId; // required
1653
    private long txnId; // required
123 ashish 1654
 
1655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1656
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 1657
      USER_ID((short)1, "userId"),
1658
      AMOUNT((short)2, "amount"),
1659
      GATEWAY_ID((short)3, "gatewayId"),
1660
      TXN_ID((short)4, "txnId");
123 ashish 1661
 
1662
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1663
 
1664
      static {
1665
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1666
          byName.put(field.getFieldName(), field);
1667
        }
1668
      }
1669
 
1670
      /**
1671
       * Find the _Fields constant that matches fieldId, or null if its not found.
1672
       */
1673
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1674
        switch(fieldId) {
1675
          case 1: // USER_ID
1676
            return USER_ID;
1677
          case 2: // AMOUNT
1678
            return AMOUNT;
1679
          case 3: // GATEWAY_ID
1680
            return GATEWAY_ID;
1681
          case 4: // TXN_ID
1682
            return TXN_ID;
1683
          default:
1684
            return null;
1685
        }
123 ashish 1686
      }
1687
 
1688
      /**
1689
       * Find the _Fields constant that matches fieldId, throwing an exception
1690
       * if it is not found.
1691
       */
1692
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1693
        _Fields fields = findByThriftId(fieldId);
1694
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1695
        return fields;
1696
      }
1697
 
1698
      /**
1699
       * Find the _Fields constant that matches name, or null if its not found.
1700
       */
1701
      public static _Fields findByName(String name) {
1702
        return byName.get(name);
1703
      }
1704
 
1705
      private final short _thriftId;
1706
      private final String _fieldName;
1707
 
1708
      _Fields(short thriftId, String fieldName) {
1709
        _thriftId = thriftId;
1710
        _fieldName = fieldName;
1711
      }
1712
 
1713
      public short getThriftFieldId() {
1714
        return _thriftId;
1715
      }
1716
 
1717
      public String getFieldName() {
1718
        return _fieldName;
1719
      }
1720
    }
1721
 
1722
    // isset id assignments
695 rajveer 1723
    private static final int __USERID_ISSET_ID = 0;
1724
    private static final int __AMOUNT_ISSET_ID = 1;
1725
    private static final int __GATEWAYID_ISSET_ID = 2;
1726
    private static final int __TXNID_ISSET_ID = 3;
420 ashish 1727
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 1728
 
3430 rajveer 1729
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 1730
    static {
3430 rajveer 1731
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1732
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1733
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
1734
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1735
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
1736
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1737
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
1738
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1739
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
1740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
123 ashish 1742
    }
1743
 
1744
    public createPayment_args() {
1745
    }
1746
 
1747
    public createPayment_args(
695 rajveer 1748
      long userId,
123 ashish 1749
      double amount,
695 rajveer 1750
      long gatewayId,
1751
      long txnId)
123 ashish 1752
    {
1753
      this();
695 rajveer 1754
      this.userId = userId;
1755
      setUserIdIsSet(true);
123 ashish 1756
      this.amount = amount;
1757
      setAmountIsSet(true);
695 rajveer 1758
      this.gatewayId = gatewayId;
1759
      setGatewayIdIsSet(true);
1760
      this.txnId = txnId;
1761
      setTxnIdIsSet(true);
123 ashish 1762
    }
1763
 
1764
    /**
1765
     * Performs a deep copy on <i>other</i>.
1766
     */
1767
    public createPayment_args(createPayment_args other) {
1768
      __isset_bit_vector.clear();
1769
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 1770
      this.userId = other.userId;
123 ashish 1771
      this.amount = other.amount;
695 rajveer 1772
      this.gatewayId = other.gatewayId;
1773
      this.txnId = other.txnId;
123 ashish 1774
    }
1775
 
1776
    public createPayment_args deepCopy() {
1777
      return new createPayment_args(this);
1778
    }
1779
 
3430 rajveer 1780
    @Override
1781
    public void clear() {
1782
      setUserIdIsSet(false);
1783
      this.userId = 0;
1784
      setAmountIsSet(false);
1785
      this.amount = 0.0;
1786
      setGatewayIdIsSet(false);
1787
      this.gatewayId = 0;
1788
      setTxnIdIsSet(false);
1789
      this.txnId = 0;
123 ashish 1790
    }
1791
 
695 rajveer 1792
    public long getUserId() {
1793
      return this.userId;
123 ashish 1794
    }
1795
 
3430 rajveer 1796
    public void setUserId(long userId) {
695 rajveer 1797
      this.userId = userId;
1798
      setUserIdIsSet(true);
123 ashish 1799
    }
1800
 
695 rajveer 1801
    public void unsetUserId() {
1802
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 1803
    }
1804
 
3430 rajveer 1805
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
695 rajveer 1806
    public boolean isSetUserId() {
1807
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 1808
    }
1809
 
695 rajveer 1810
    public void setUserIdIsSet(boolean value) {
1811
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 1812
    }
1813
 
1814
    public double getAmount() {
1815
      return this.amount;
1816
    }
1817
 
3430 rajveer 1818
    public void setAmount(double amount) {
123 ashish 1819
      this.amount = amount;
1820
      setAmountIsSet(true);
1821
    }
1822
 
1823
    public void unsetAmount() {
1824
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
1825
    }
1826
 
3430 rajveer 1827
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
123 ashish 1828
    public boolean isSetAmount() {
1829
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
1830
    }
1831
 
1832
    public void setAmountIsSet(boolean value) {
1833
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
1834
    }
1835
 
695 rajveer 1836
    public long getGatewayId() {
1837
      return this.gatewayId;
123 ashish 1838
    }
1839
 
3430 rajveer 1840
    public void setGatewayId(long gatewayId) {
695 rajveer 1841
      this.gatewayId = gatewayId;
1842
      setGatewayIdIsSet(true);
123 ashish 1843
    }
1844
 
695 rajveer 1845
    public void unsetGatewayId() {
1846
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 1847
    }
1848
 
3430 rajveer 1849
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 1850
    public boolean isSetGatewayId() {
1851
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 1852
    }
1853
 
695 rajveer 1854
    public void setGatewayIdIsSet(boolean value) {
1855
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 1856
    }
1857
 
695 rajveer 1858
    public long getTxnId() {
1859
      return this.txnId;
1860
    }
1861
 
3430 rajveer 1862
    public void setTxnId(long txnId) {
695 rajveer 1863
      this.txnId = txnId;
1864
      setTxnIdIsSet(true);
1865
    }
1866
 
1867
    public void unsetTxnId() {
1868
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
1869
    }
1870
 
3430 rajveer 1871
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 1872
    public boolean isSetTxnId() {
1873
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
1874
    }
1875
 
1876
    public void setTxnIdIsSet(boolean value) {
1877
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
1878
    }
1879
 
123 ashish 1880
    public void setFieldValue(_Fields field, Object value) {
1881
      switch (field) {
1882
      case USER_ID:
1883
        if (value == null) {
695 rajveer 1884
          unsetUserId();
123 ashish 1885
        } else {
695 rajveer 1886
          setUserId((Long)value);
123 ashish 1887
        }
1888
        break;
1889
 
695 rajveer 1890
      case AMOUNT:
123 ashish 1891
        if (value == null) {
695 rajveer 1892
          unsetAmount();
123 ashish 1893
        } else {
695 rajveer 1894
          setAmount((Double)value);
123 ashish 1895
        }
1896
        break;
1897
 
695 rajveer 1898
      case GATEWAY_ID:
123 ashish 1899
        if (value == null) {
695 rajveer 1900
          unsetGatewayId();
123 ashish 1901
        } else {
695 rajveer 1902
          setGatewayId((Long)value);
123 ashish 1903
        }
1904
        break;
1905
 
695 rajveer 1906
      case TXN_ID:
123 ashish 1907
        if (value == null) {
695 rajveer 1908
          unsetTxnId();
123 ashish 1909
        } else {
695 rajveer 1910
          setTxnId((Long)value);
123 ashish 1911
        }
1912
        break;
1913
 
1914
      }
1915
    }
1916
 
1917
    public Object getFieldValue(_Fields field) {
1918
      switch (field) {
1919
      case USER_ID:
3430 rajveer 1920
        return Long.valueOf(getUserId());
123 ashish 1921
 
1922
      case AMOUNT:
3430 rajveer 1923
        return Double.valueOf(getAmount());
123 ashish 1924
 
420 ashish 1925
      case GATEWAY_ID:
3430 rajveer 1926
        return Long.valueOf(getGatewayId());
123 ashish 1927
 
695 rajveer 1928
      case TXN_ID:
3430 rajveer 1929
        return Long.valueOf(getTxnId());
695 rajveer 1930
 
123 ashish 1931
      }
1932
      throw new IllegalStateException();
1933
    }
1934
 
3430 rajveer 1935
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1936
    public boolean isSet(_Fields field) {
1937
      if (field == null) {
1938
        throw new IllegalArgumentException();
1939
      }
123 ashish 1940
 
1941
      switch (field) {
1942
      case USER_ID:
695 rajveer 1943
        return isSetUserId();
123 ashish 1944
      case AMOUNT:
1945
        return isSetAmount();
420 ashish 1946
      case GATEWAY_ID:
695 rajveer 1947
        return isSetGatewayId();
1948
      case TXN_ID:
1949
        return isSetTxnId();
123 ashish 1950
      }
1951
      throw new IllegalStateException();
1952
    }
1953
 
1954
    @Override
1955
    public boolean equals(Object that) {
1956
      if (that == null)
1957
        return false;
1958
      if (that instanceof createPayment_args)
1959
        return this.equals((createPayment_args)that);
1960
      return false;
1961
    }
1962
 
1963
    public boolean equals(createPayment_args that) {
1964
      if (that == null)
1965
        return false;
1966
 
695 rajveer 1967
      boolean this_present_userId = true;
1968
      boolean that_present_userId = true;
1969
      if (this_present_userId || that_present_userId) {
1970
        if (!(this_present_userId && that_present_userId))
123 ashish 1971
          return false;
695 rajveer 1972
        if (this.userId != that.userId)
123 ashish 1973
          return false;
1974
      }
1975
 
1976
      boolean this_present_amount = true;
1977
      boolean that_present_amount = true;
1978
      if (this_present_amount || that_present_amount) {
1979
        if (!(this_present_amount && that_present_amount))
1980
          return false;
1981
        if (this.amount != that.amount)
1982
          return false;
1983
      }
1984
 
695 rajveer 1985
      boolean this_present_gatewayId = true;
1986
      boolean that_present_gatewayId = true;
1987
      if (this_present_gatewayId || that_present_gatewayId) {
1988
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 1989
          return false;
695 rajveer 1990
        if (this.gatewayId != that.gatewayId)
123 ashish 1991
          return false;
1992
      }
1993
 
695 rajveer 1994
      boolean this_present_txnId = true;
1995
      boolean that_present_txnId = true;
1996
      if (this_present_txnId || that_present_txnId) {
1997
        if (!(this_present_txnId && that_present_txnId))
1998
          return false;
1999
        if (this.txnId != that.txnId)
2000
          return false;
2001
      }
2002
 
123 ashish 2003
      return true;
2004
    }
2005
 
2006
    @Override
2007
    public int hashCode() {
2008
      return 0;
2009
    }
2010
 
2011
    public int compareTo(createPayment_args other) {
2012
      if (!getClass().equals(other.getClass())) {
2013
        return getClass().getName().compareTo(other.getClass().getName());
2014
      }
2015
 
2016
      int lastComparison = 0;
2017
      createPayment_args typedOther = (createPayment_args)other;
2018
 
3430 rajveer 2019
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 2020
      if (lastComparison != 0) {
2021
        return lastComparison;
2022
      }
3430 rajveer 2023
      if (isSetUserId()) {
2024
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
2025
        if (lastComparison != 0) {
2026
          return lastComparison;
2027
        }
123 ashish 2028
      }
3430 rajveer 2029
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
123 ashish 2030
      if (lastComparison != 0) {
2031
        return lastComparison;
2032
      }
3430 rajveer 2033
      if (isSetAmount()) {
2034
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
2035
        if (lastComparison != 0) {
2036
          return lastComparison;
2037
        }
123 ashish 2038
      }
3430 rajveer 2039
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 2040
      if (lastComparison != 0) {
2041
        return lastComparison;
2042
      }
3430 rajveer 2043
      if (isSetGatewayId()) {
2044
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
2045
        if (lastComparison != 0) {
2046
          return lastComparison;
2047
        }
123 ashish 2048
      }
3430 rajveer 2049
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
123 ashish 2050
      if (lastComparison != 0) {
2051
        return lastComparison;
2052
      }
3430 rajveer 2053
      if (isSetTxnId()) {
2054
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
2055
        if (lastComparison != 0) {
2056
          return lastComparison;
2057
        }
123 ashish 2058
      }
2059
      return 0;
2060
    }
2061
 
3430 rajveer 2062
    public _Fields fieldForId(int fieldId) {
2063
      return _Fields.findByThriftId(fieldId);
2064
    }
2065
 
2066
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2067
      org.apache.thrift.protocol.TField field;
123 ashish 2068
      iprot.readStructBegin();
2069
      while (true)
2070
      {
2071
        field = iprot.readFieldBegin();
3430 rajveer 2072
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2073
          break;
2074
        }
3430 rajveer 2075
        switch (field.id) {
2076
          case 1: // USER_ID
2077
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2078
              this.userId = iprot.readI64();
2079
              setUserIdIsSet(true);
2080
            } else { 
2081
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2082
            }
2083
            break;
2084
          case 2: // AMOUNT
2085
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
2086
              this.amount = iprot.readDouble();
2087
              setAmountIsSet(true);
2088
            } else { 
2089
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2090
            }
2091
            break;
2092
          case 3: // GATEWAY_ID
2093
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2094
              this.gatewayId = iprot.readI64();
2095
              setGatewayIdIsSet(true);
2096
            } else { 
2097
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2098
            }
2099
            break;
2100
          case 4: // TXN_ID
2101
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2102
              this.txnId = iprot.readI64();
2103
              setTxnIdIsSet(true);
2104
            } else { 
2105
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2106
            }
2107
            break;
2108
          default:
2109
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2110
        }
3430 rajveer 2111
        iprot.readFieldEnd();
123 ashish 2112
      }
2113
      iprot.readStructEnd();
2114
      validate();
2115
    }
2116
 
3430 rajveer 2117
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2118
      validate();
2119
 
2120
      oprot.writeStructBegin(STRUCT_DESC);
2121
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 2122
      oprot.writeI64(this.userId);
123 ashish 2123
      oprot.writeFieldEnd();
2124
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
2125
      oprot.writeDouble(this.amount);
2126
      oprot.writeFieldEnd();
420 ashish 2127
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2128
      oprot.writeI64(this.gatewayId);
420 ashish 2129
      oprot.writeFieldEnd();
695 rajveer 2130
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
2131
      oprot.writeI64(this.txnId);
2132
      oprot.writeFieldEnd();
123 ashish 2133
      oprot.writeFieldStop();
2134
      oprot.writeStructEnd();
2135
    }
2136
 
2137
    @Override
2138
    public String toString() {
2139
      StringBuilder sb = new StringBuilder("createPayment_args(");
2140
      boolean first = true;
2141
 
695 rajveer 2142
      sb.append("userId:");
2143
      sb.append(this.userId);
123 ashish 2144
      first = false;
2145
      if (!first) sb.append(", ");
2146
      sb.append("amount:");
2147
      sb.append(this.amount);
2148
      first = false;
2149
      if (!first) sb.append(", ");
695 rajveer 2150
      sb.append("gatewayId:");
2151
      sb.append(this.gatewayId);
123 ashish 2152
      first = false;
695 rajveer 2153
      if (!first) sb.append(", ");
2154
      sb.append("txnId:");
2155
      sb.append(this.txnId);
2156
      first = false;
123 ashish 2157
      sb.append(")");
2158
      return sb.toString();
2159
    }
2160
 
3430 rajveer 2161
    public void validate() throws org.apache.thrift.TException {
123 ashish 2162
      // check for required fields
2163
    }
2164
 
3430 rajveer 2165
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2166
      try {
2167
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2168
      } catch (org.apache.thrift.TException te) {
2169
        throw new java.io.IOException(te);
2170
      }
2171
    }
2172
 
2173
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2174
      try {
4141 chandransh 2175
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2176
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2177
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2178
      } catch (org.apache.thrift.TException te) {
2179
        throw new java.io.IOException(te);
2180
      }
2181
    }
2182
 
123 ashish 2183
  }
2184
 
3430 rajveer 2185
  public static class createPayment_result implements org.apache.thrift.TBase<createPayment_result, createPayment_result._Fields>, java.io.Serializable, Cloneable   {
2186
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_result");
123 ashish 2187
 
3430 rajveer 2188
    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);
2189
    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 2190
 
3430 rajveer 2191
    private long success; // required
2192
    private PaymentException pe; // required
123 ashish 2193
 
2194
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2195
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 2196
      SUCCESS((short)0, "success"),
2197
      PE((short)1, "pe");
2198
 
2199
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2200
 
2201
      static {
2202
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2203
          byName.put(field.getFieldName(), field);
2204
        }
2205
      }
2206
 
2207
      /**
2208
       * Find the _Fields constant that matches fieldId, or null if its not found.
2209
       */
2210
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2211
        switch(fieldId) {
2212
          case 0: // SUCCESS
2213
            return SUCCESS;
2214
          case 1: // PE
2215
            return PE;
2216
          default:
2217
            return null;
2218
        }
123 ashish 2219
      }
2220
 
2221
      /**
2222
       * Find the _Fields constant that matches fieldId, throwing an exception
2223
       * if it is not found.
2224
       */
2225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2226
        _Fields fields = findByThriftId(fieldId);
2227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2228
        return fields;
2229
      }
2230
 
2231
      /**
2232
       * Find the _Fields constant that matches name, or null if its not found.
2233
       */
2234
      public static _Fields findByName(String name) {
2235
        return byName.get(name);
2236
      }
2237
 
2238
      private final short _thriftId;
2239
      private final String _fieldName;
2240
 
2241
      _Fields(short thriftId, String fieldName) {
2242
        _thriftId = thriftId;
2243
        _fieldName = fieldName;
2244
      }
2245
 
2246
      public short getThriftFieldId() {
2247
        return _thriftId;
2248
      }
2249
 
2250
      public String getFieldName() {
2251
        return _fieldName;
2252
      }
2253
    }
2254
 
2255
    // isset id assignments
420 ashish 2256
    private static final int __SUCCESS_ISSET_ID = 0;
2257
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 2258
 
3430 rajveer 2259
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2260
    static {
3430 rajveer 2261
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2262
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2263
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2264
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2265
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2266
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2267
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
123 ashish 2268
    }
2269
 
2270
    public createPayment_result() {
2271
    }
2272
 
2273
    public createPayment_result(
420 ashish 2274
      long success,
123 ashish 2275
      PaymentException pe)
2276
    {
2277
      this();
2278
      this.success = success;
420 ashish 2279
      setSuccessIsSet(true);
123 ashish 2280
      this.pe = pe;
2281
    }
2282
 
2283
    /**
2284
     * Performs a deep copy on <i>other</i>.
2285
     */
2286
    public createPayment_result(createPayment_result other) {
420 ashish 2287
      __isset_bit_vector.clear();
2288
      __isset_bit_vector.or(other.__isset_bit_vector);
2289
      this.success = other.success;
123 ashish 2290
      if (other.isSetPe()) {
2291
        this.pe = new PaymentException(other.pe);
2292
      }
2293
    }
2294
 
2295
    public createPayment_result deepCopy() {
2296
      return new createPayment_result(this);
2297
    }
2298
 
3430 rajveer 2299
    @Override
2300
    public void clear() {
2301
      setSuccessIsSet(false);
2302
      this.success = 0;
2303
      this.pe = null;
123 ashish 2304
    }
2305
 
420 ashish 2306
    public long getSuccess() {
123 ashish 2307
      return this.success;
2308
    }
2309
 
3430 rajveer 2310
    public void setSuccess(long success) {
123 ashish 2311
      this.success = success;
420 ashish 2312
      setSuccessIsSet(true);
123 ashish 2313
    }
2314
 
2315
    public void unsetSuccess() {
420 ashish 2316
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 2317
    }
2318
 
3430 rajveer 2319
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 2320
    public boolean isSetSuccess() {
420 ashish 2321
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 2322
    }
2323
 
2324
    public void setSuccessIsSet(boolean value) {
420 ashish 2325
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 2326
    }
2327
 
2328
    public PaymentException getPe() {
2329
      return this.pe;
2330
    }
2331
 
3430 rajveer 2332
    public void setPe(PaymentException pe) {
123 ashish 2333
      this.pe = pe;
2334
    }
2335
 
2336
    public void unsetPe() {
2337
      this.pe = null;
2338
    }
2339
 
3430 rajveer 2340
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 2341
    public boolean isSetPe() {
2342
      return this.pe != null;
2343
    }
2344
 
2345
    public void setPeIsSet(boolean value) {
2346
      if (!value) {
2347
        this.pe = null;
2348
      }
2349
    }
2350
 
2351
    public void setFieldValue(_Fields field, Object value) {
2352
      switch (field) {
2353
      case SUCCESS:
2354
        if (value == null) {
2355
          unsetSuccess();
2356
        } else {
420 ashish 2357
          setSuccess((Long)value);
123 ashish 2358
        }
2359
        break;
2360
 
2361
      case PE:
2362
        if (value == null) {
2363
          unsetPe();
2364
        } else {
2365
          setPe((PaymentException)value);
2366
        }
2367
        break;
2368
 
2369
      }
2370
    }
2371
 
2372
    public Object getFieldValue(_Fields field) {
2373
      switch (field) {
2374
      case SUCCESS:
3430 rajveer 2375
        return Long.valueOf(getSuccess());
123 ashish 2376
 
2377
      case PE:
2378
        return getPe();
2379
 
2380
      }
2381
      throw new IllegalStateException();
2382
    }
2383
 
3430 rajveer 2384
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2385
    public boolean isSet(_Fields field) {
2386
      if (field == null) {
2387
        throw new IllegalArgumentException();
2388
      }
123 ashish 2389
 
2390
      switch (field) {
2391
      case SUCCESS:
2392
        return isSetSuccess();
2393
      case PE:
2394
        return isSetPe();
2395
      }
2396
      throw new IllegalStateException();
2397
    }
2398
 
2399
    @Override
2400
    public boolean equals(Object that) {
2401
      if (that == null)
2402
        return false;
2403
      if (that instanceof createPayment_result)
2404
        return this.equals((createPayment_result)that);
2405
      return false;
2406
    }
2407
 
2408
    public boolean equals(createPayment_result that) {
2409
      if (that == null)
2410
        return false;
2411
 
420 ashish 2412
      boolean this_present_success = true;
2413
      boolean that_present_success = true;
123 ashish 2414
      if (this_present_success || that_present_success) {
2415
        if (!(this_present_success && that_present_success))
2416
          return false;
420 ashish 2417
        if (this.success != that.success)
123 ashish 2418
          return false;
2419
      }
2420
 
2421
      boolean this_present_pe = true && this.isSetPe();
2422
      boolean that_present_pe = true && that.isSetPe();
2423
      if (this_present_pe || that_present_pe) {
2424
        if (!(this_present_pe && that_present_pe))
2425
          return false;
2426
        if (!this.pe.equals(that.pe))
2427
          return false;
2428
      }
2429
 
2430
      return true;
2431
    }
2432
 
2433
    @Override
2434
    public int hashCode() {
2435
      return 0;
2436
    }
2437
 
420 ashish 2438
    public int compareTo(createPayment_result other) {
2439
      if (!getClass().equals(other.getClass())) {
2440
        return getClass().getName().compareTo(other.getClass().getName());
2441
      }
2442
 
2443
      int lastComparison = 0;
2444
      createPayment_result typedOther = (createPayment_result)other;
2445
 
3430 rajveer 2446
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 2447
      if (lastComparison != 0) {
2448
        return lastComparison;
2449
      }
3430 rajveer 2450
      if (isSetSuccess()) {
2451
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2452
        if (lastComparison != 0) {
2453
          return lastComparison;
2454
        }
420 ashish 2455
      }
3430 rajveer 2456
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 2457
      if (lastComparison != 0) {
2458
        return lastComparison;
2459
      }
3430 rajveer 2460
      if (isSetPe()) {
2461
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
2462
        if (lastComparison != 0) {
2463
          return lastComparison;
2464
        }
420 ashish 2465
      }
2466
      return 0;
2467
    }
2468
 
3430 rajveer 2469
    public _Fields fieldForId(int fieldId) {
2470
      return _Fields.findByThriftId(fieldId);
2471
    }
2472
 
2473
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2474
      org.apache.thrift.protocol.TField field;
123 ashish 2475
      iprot.readStructBegin();
2476
      while (true)
2477
      {
2478
        field = iprot.readFieldBegin();
3430 rajveer 2479
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2480
          break;
2481
        }
3430 rajveer 2482
        switch (field.id) {
2483
          case 0: // SUCCESS
2484
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2485
              this.success = iprot.readI64();
2486
              setSuccessIsSet(true);
2487
            } else { 
2488
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2489
            }
2490
            break;
2491
          case 1: // PE
2492
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2493
              this.pe = new PaymentException();
2494
              this.pe.read(iprot);
2495
            } else { 
2496
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2497
            }
2498
            break;
2499
          default:
2500
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2501
        }
3430 rajveer 2502
        iprot.readFieldEnd();
123 ashish 2503
      }
2504
      iprot.readStructEnd();
2505
      validate();
2506
    }
2507
 
3430 rajveer 2508
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2509
      oprot.writeStructBegin(STRUCT_DESC);
2510
 
2511
      if (this.isSetSuccess()) {
2512
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 2513
        oprot.writeI64(this.success);
123 ashish 2514
        oprot.writeFieldEnd();
2515
      } else if (this.isSetPe()) {
2516
        oprot.writeFieldBegin(PE_FIELD_DESC);
2517
        this.pe.write(oprot);
2518
        oprot.writeFieldEnd();
2519
      }
2520
      oprot.writeFieldStop();
2521
      oprot.writeStructEnd();
2522
    }
2523
 
2524
    @Override
2525
    public String toString() {
2526
      StringBuilder sb = new StringBuilder("createPayment_result(");
2527
      boolean first = true;
2528
 
2529
      sb.append("success:");
420 ashish 2530
      sb.append(this.success);
123 ashish 2531
      first = false;
2532
      if (!first) sb.append(", ");
2533
      sb.append("pe:");
2534
      if (this.pe == null) {
2535
        sb.append("null");
2536
      } else {
2537
        sb.append(this.pe);
2538
      }
2539
      first = false;
2540
      sb.append(")");
2541
      return sb.toString();
2542
    }
2543
 
3430 rajveer 2544
    public void validate() throws org.apache.thrift.TException {
123 ashish 2545
      // check for required fields
2546
    }
2547
 
3430 rajveer 2548
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2549
      try {
2550
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2551
      } catch (org.apache.thrift.TException te) {
2552
        throw new java.io.IOException(te);
2553
      }
2554
    }
2555
 
2556
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2557
      try {
2558
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2559
      } catch (org.apache.thrift.TException te) {
2560
        throw new java.io.IOException(te);
2561
      }
2562
    }
2563
 
123 ashish 2564
  }
2565
 
3430 rajveer 2566
  public static class getPaymentsForUser_args implements org.apache.thrift.TBase<getPaymentsForUser_args, getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable   {
2567
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_args");
123 ashish 2568
 
3430 rajveer 2569
    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);
2570
    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);
2571
    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);
2572
    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);
2573
    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 2574
 
3430 rajveer 2575
    private long userId; // required
2576
    private long fromTime; // required
2577
    private long toTime; // required
2578
    private PaymentStatus status; // required
2579
    private long gatewayId; // required
123 ashish 2580
 
2581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2582
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 2583
      USER_ID((short)1, "userId"),
695 rajveer 2584
      FROM_TIME((short)2, "fromTime"),
2585
      TO_TIME((short)3, "toTime"),
123 ashish 2586
      /**
2587
       * 
2588
       * @see PaymentStatus
2589
       */
2590
      STATUS((short)4, "status"),
695 rajveer 2591
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 2592
 
2593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2594
 
2595
      static {
2596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2597
          byName.put(field.getFieldName(), field);
2598
        }
2599
      }
2600
 
2601
      /**
2602
       * Find the _Fields constant that matches fieldId, or null if its not found.
2603
       */
2604
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2605
        switch(fieldId) {
2606
          case 1: // USER_ID
2607
            return USER_ID;
2608
          case 2: // FROM_TIME
2609
            return FROM_TIME;
2610
          case 3: // TO_TIME
2611
            return TO_TIME;
2612
          case 4: // STATUS
2613
            return STATUS;
2614
          case 5: // GATEWAY_ID
2615
            return GATEWAY_ID;
2616
          default:
2617
            return null;
2618
        }
123 ashish 2619
      }
2620
 
2621
      /**
2622
       * Find the _Fields constant that matches fieldId, throwing an exception
2623
       * if it is not found.
2624
       */
2625
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2626
        _Fields fields = findByThriftId(fieldId);
2627
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2628
        return fields;
2629
      }
2630
 
2631
      /**
2632
       * Find the _Fields constant that matches name, or null if its not found.
2633
       */
2634
      public static _Fields findByName(String name) {
2635
        return byName.get(name);
2636
      }
2637
 
2638
      private final short _thriftId;
2639
      private final String _fieldName;
2640
 
2641
      _Fields(short thriftId, String fieldName) {
2642
        _thriftId = thriftId;
2643
        _fieldName = fieldName;
2644
      }
2645
 
2646
      public short getThriftFieldId() {
2647
        return _thriftId;
2648
      }
2649
 
2650
      public String getFieldName() {
2651
        return _fieldName;
2652
      }
2653
    }
2654
 
2655
    // isset id assignments
2656
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 2657
    private static final int __FROMTIME_ISSET_ID = 1;
2658
    private static final int __TOTIME_ISSET_ID = 2;
2659
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 2660
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 2661
 
3430 rajveer 2662
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2663
    static {
3430 rajveer 2664
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2665
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2666
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2667
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2668
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2669
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2670
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2671
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2672
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
2673
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2674
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2675
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2676
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
123 ashish 2677
    }
2678
 
2679
    public getPaymentsForUser_args() {
2680
    }
2681
 
2682
    public getPaymentsForUser_args(
2683
      long userId,
695 rajveer 2684
      long fromTime,
2685
      long toTime,
123 ashish 2686
      PaymentStatus status,
695 rajveer 2687
      long gatewayId)
123 ashish 2688
    {
2689
      this();
2690
      this.userId = userId;
2691
      setUserIdIsSet(true);
695 rajveer 2692
      this.fromTime = fromTime;
2693
      setFromTimeIsSet(true);
2694
      this.toTime = toTime;
2695
      setToTimeIsSet(true);
123 ashish 2696
      this.status = status;
695 rajveer 2697
      this.gatewayId = gatewayId;
2698
      setGatewayIdIsSet(true);
123 ashish 2699
    }
2700
 
2701
    /**
2702
     * Performs a deep copy on <i>other</i>.
2703
     */
2704
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
2705
      __isset_bit_vector.clear();
2706
      __isset_bit_vector.or(other.__isset_bit_vector);
2707
      this.userId = other.userId;
695 rajveer 2708
      this.fromTime = other.fromTime;
2709
      this.toTime = other.toTime;
123 ashish 2710
      if (other.isSetStatus()) {
2711
        this.status = other.status;
2712
      }
695 rajveer 2713
      this.gatewayId = other.gatewayId;
123 ashish 2714
    }
2715
 
2716
    public getPaymentsForUser_args deepCopy() {
2717
      return new getPaymentsForUser_args(this);
2718
    }
2719
 
3430 rajveer 2720
    @Override
2721
    public void clear() {
2722
      setUserIdIsSet(false);
2723
      this.userId = 0;
2724
      setFromTimeIsSet(false);
2725
      this.fromTime = 0;
2726
      setToTimeIsSet(false);
2727
      this.toTime = 0;
2728
      this.status = null;
2729
      setGatewayIdIsSet(false);
2730
      this.gatewayId = 0;
123 ashish 2731
    }
2732
 
2733
    public long getUserId() {
2734
      return this.userId;
2735
    }
2736
 
3430 rajveer 2737
    public void setUserId(long userId) {
123 ashish 2738
      this.userId = userId;
2739
      setUserIdIsSet(true);
2740
    }
2741
 
2742
    public void unsetUserId() {
2743
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2744
    }
2745
 
3430 rajveer 2746
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
123 ashish 2747
    public boolean isSetUserId() {
2748
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2749
    }
2750
 
2751
    public void setUserIdIsSet(boolean value) {
2752
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2753
    }
2754
 
695 rajveer 2755
    public long getFromTime() {
2756
      return this.fromTime;
123 ashish 2757
    }
2758
 
3430 rajveer 2759
    public void setFromTime(long fromTime) {
695 rajveer 2760
      this.fromTime = fromTime;
2761
      setFromTimeIsSet(true);
123 ashish 2762
    }
2763
 
695 rajveer 2764
    public void unsetFromTime() {
2765
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 2766
    }
2767
 
3430 rajveer 2768
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 2769
    public boolean isSetFromTime() {
2770
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 2771
    }
2772
 
695 rajveer 2773
    public void setFromTimeIsSet(boolean value) {
2774
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 2775
    }
2776
 
695 rajveer 2777
    public long getToTime() {
2778
      return this.toTime;
123 ashish 2779
    }
2780
 
3430 rajveer 2781
    public void setToTime(long toTime) {
695 rajveer 2782
      this.toTime = toTime;
2783
      setToTimeIsSet(true);
123 ashish 2784
    }
2785
 
695 rajveer 2786
    public void unsetToTime() {
2787
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 2788
    }
2789
 
3430 rajveer 2790
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 2791
    public boolean isSetToTime() {
2792
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 2793
    }
2794
 
695 rajveer 2795
    public void setToTimeIsSet(boolean value) {
2796
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 2797
    }
2798
 
2799
    /**
2800
     * 
2801
     * @see PaymentStatus
2802
     */
2803
    public PaymentStatus getStatus() {
2804
      return this.status;
2805
    }
2806
 
2807
    /**
2808
     * 
2809
     * @see PaymentStatus
2810
     */
3430 rajveer 2811
    public void setStatus(PaymentStatus status) {
123 ashish 2812
      this.status = status;
2813
    }
2814
 
2815
    public void unsetStatus() {
2816
      this.status = null;
2817
    }
2818
 
3430 rajveer 2819
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 2820
    public boolean isSetStatus() {
2821
      return this.status != null;
2822
    }
2823
 
2824
    public void setStatusIsSet(boolean value) {
2825
      if (!value) {
2826
        this.status = null;
2827
      }
2828
    }
2829
 
695 rajveer 2830
    public long getGatewayId() {
2831
      return this.gatewayId;
123 ashish 2832
    }
2833
 
3430 rajveer 2834
    public void setGatewayId(long gatewayId) {
695 rajveer 2835
      this.gatewayId = gatewayId;
2836
      setGatewayIdIsSet(true);
123 ashish 2837
    }
2838
 
695 rajveer 2839
    public void unsetGatewayId() {
2840
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2841
    }
2842
 
3430 rajveer 2843
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 2844
    public boolean isSetGatewayId() {
2845
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2846
    }
2847
 
695 rajveer 2848
    public void setGatewayIdIsSet(boolean value) {
2849
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2850
    }
2851
 
2852
    public void setFieldValue(_Fields field, Object value) {
2853
      switch (field) {
2854
      case USER_ID:
2855
        if (value == null) {
2856
          unsetUserId();
2857
        } else {
2858
          setUserId((Long)value);
2859
        }
2860
        break;
2861
 
2862
      case FROM_TIME:
2863
        if (value == null) {
695 rajveer 2864
          unsetFromTime();
123 ashish 2865
        } else {
695 rajveer 2866
          setFromTime((Long)value);
123 ashish 2867
        }
2868
        break;
2869
 
2870
      case TO_TIME:
2871
        if (value == null) {
695 rajveer 2872
          unsetToTime();
123 ashish 2873
        } else {
695 rajveer 2874
          setToTime((Long)value);
123 ashish 2875
        }
2876
        break;
2877
 
2878
      case STATUS:
2879
        if (value == null) {
2880
          unsetStatus();
2881
        } else {
2882
          setStatus((PaymentStatus)value);
2883
        }
2884
        break;
2885
 
420 ashish 2886
      case GATEWAY_ID:
123 ashish 2887
        if (value == null) {
695 rajveer 2888
          unsetGatewayId();
123 ashish 2889
        } else {
695 rajveer 2890
          setGatewayId((Long)value);
123 ashish 2891
        }
2892
        break;
2893
 
2894
      }
2895
    }
2896
 
2897
    public Object getFieldValue(_Fields field) {
2898
      switch (field) {
2899
      case USER_ID:
3430 rajveer 2900
        return Long.valueOf(getUserId());
123 ashish 2901
 
2902
      case FROM_TIME:
3430 rajveer 2903
        return Long.valueOf(getFromTime());
123 ashish 2904
 
2905
      case TO_TIME:
3430 rajveer 2906
        return Long.valueOf(getToTime());
123 ashish 2907
 
2908
      case STATUS:
2909
        return getStatus();
2910
 
420 ashish 2911
      case GATEWAY_ID:
3430 rajveer 2912
        return Long.valueOf(getGatewayId());
123 ashish 2913
 
2914
      }
2915
      throw new IllegalStateException();
2916
    }
2917
 
3430 rajveer 2918
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2919
    public boolean isSet(_Fields field) {
2920
      if (field == null) {
2921
        throw new IllegalArgumentException();
2922
      }
123 ashish 2923
 
2924
      switch (field) {
2925
      case USER_ID:
2926
        return isSetUserId();
2927
      case FROM_TIME:
695 rajveer 2928
        return isSetFromTime();
123 ashish 2929
      case TO_TIME:
695 rajveer 2930
        return isSetToTime();
123 ashish 2931
      case STATUS:
2932
        return isSetStatus();
420 ashish 2933
      case GATEWAY_ID:
695 rajveer 2934
        return isSetGatewayId();
123 ashish 2935
      }
2936
      throw new IllegalStateException();
2937
    }
2938
 
2939
    @Override
2940
    public boolean equals(Object that) {
2941
      if (that == null)
2942
        return false;
2943
      if (that instanceof getPaymentsForUser_args)
2944
        return this.equals((getPaymentsForUser_args)that);
2945
      return false;
2946
    }
2947
 
2948
    public boolean equals(getPaymentsForUser_args that) {
2949
      if (that == null)
2950
        return false;
2951
 
2952
      boolean this_present_userId = true;
2953
      boolean that_present_userId = true;
2954
      if (this_present_userId || that_present_userId) {
2955
        if (!(this_present_userId && that_present_userId))
2956
          return false;
2957
        if (this.userId != that.userId)
2958
          return false;
2959
      }
2960
 
695 rajveer 2961
      boolean this_present_fromTime = true;
2962
      boolean that_present_fromTime = true;
2963
      if (this_present_fromTime || that_present_fromTime) {
2964
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 2965
          return false;
695 rajveer 2966
        if (this.fromTime != that.fromTime)
123 ashish 2967
          return false;
2968
      }
2969
 
695 rajveer 2970
      boolean this_present_toTime = true;
2971
      boolean that_present_toTime = true;
2972
      if (this_present_toTime || that_present_toTime) {
2973
        if (!(this_present_toTime && that_present_toTime))
123 ashish 2974
          return false;
695 rajveer 2975
        if (this.toTime != that.toTime)
123 ashish 2976
          return false;
2977
      }
2978
 
2979
      boolean this_present_status = true && this.isSetStatus();
2980
      boolean that_present_status = true && that.isSetStatus();
2981
      if (this_present_status || that_present_status) {
2982
        if (!(this_present_status && that_present_status))
2983
          return false;
2984
        if (!this.status.equals(that.status))
2985
          return false;
2986
      }
2987
 
695 rajveer 2988
      boolean this_present_gatewayId = true;
2989
      boolean that_present_gatewayId = true;
2990
      if (this_present_gatewayId || that_present_gatewayId) {
2991
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2992
          return false;
695 rajveer 2993
        if (this.gatewayId != that.gatewayId)
123 ashish 2994
          return false;
2995
      }
2996
 
2997
      return true;
2998
    }
2999
 
3000
    @Override
3001
    public int hashCode() {
3002
      return 0;
3003
    }
3004
 
3005
    public int compareTo(getPaymentsForUser_args other) {
3006
      if (!getClass().equals(other.getClass())) {
3007
        return getClass().getName().compareTo(other.getClass().getName());
3008
      }
3009
 
3010
      int lastComparison = 0;
3011
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
3012
 
3430 rajveer 3013
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 3014
      if (lastComparison != 0) {
3015
        return lastComparison;
3016
      }
3430 rajveer 3017
      if (isSetUserId()) {
3018
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
3019
        if (lastComparison != 0) {
3020
          return lastComparison;
3021
        }
123 ashish 3022
      }
3430 rajveer 3023
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 3024
      if (lastComparison != 0) {
3025
        return lastComparison;
3026
      }
3430 rajveer 3027
      if (isSetFromTime()) {
3028
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
3029
        if (lastComparison != 0) {
3030
          return lastComparison;
3031
        }
123 ashish 3032
      }
3430 rajveer 3033
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 3034
      if (lastComparison != 0) {
3035
        return lastComparison;
3036
      }
3430 rajveer 3037
      if (isSetToTime()) {
3038
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
3039
        if (lastComparison != 0) {
3040
          return lastComparison;
3041
        }
123 ashish 3042
      }
3430 rajveer 3043
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 3044
      if (lastComparison != 0) {
3045
        return lastComparison;
3046
      }
3430 rajveer 3047
      if (isSetStatus()) {
3048
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3049
        if (lastComparison != 0) {
3050
          return lastComparison;
3051
        }
123 ashish 3052
      }
3430 rajveer 3053
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 3054
      if (lastComparison != 0) {
3055
        return lastComparison;
3056
      }
3430 rajveer 3057
      if (isSetGatewayId()) {
3058
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
3059
        if (lastComparison != 0) {
3060
          return lastComparison;
3061
        }
123 ashish 3062
      }
3063
      return 0;
3064
    }
3065
 
3430 rajveer 3066
    public _Fields fieldForId(int fieldId) {
3067
      return _Fields.findByThriftId(fieldId);
3068
    }
3069
 
3070
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3071
      org.apache.thrift.protocol.TField field;
123 ashish 3072
      iprot.readStructBegin();
3073
      while (true)
3074
      {
3075
        field = iprot.readFieldBegin();
3430 rajveer 3076
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3077
          break;
3078
        }
3430 rajveer 3079
        switch (field.id) {
3080
          case 1: // USER_ID
3081
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3082
              this.userId = iprot.readI64();
3083
              setUserIdIsSet(true);
3084
            } else { 
3085
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3086
            }
3087
            break;
3088
          case 2: // FROM_TIME
3089
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3090
              this.fromTime = iprot.readI64();
3091
              setFromTimeIsSet(true);
3092
            } else { 
3093
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3094
            }
3095
            break;
3096
          case 3: // TO_TIME
3097
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3098
              this.toTime = iprot.readI64();
3099
              setToTimeIsSet(true);
3100
            } else { 
3101
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3102
            }
3103
            break;
3104
          case 4: // STATUS
3105
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3106
              this.status = PaymentStatus.findByValue(iprot.readI32());
3107
            } else { 
3108
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3109
            }
3110
            break;
3111
          case 5: // GATEWAY_ID
3112
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3113
              this.gatewayId = iprot.readI64();
3114
              setGatewayIdIsSet(true);
3115
            } else { 
3116
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3117
            }
3118
            break;
3119
          default:
3120
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3121
        }
3430 rajveer 3122
        iprot.readFieldEnd();
123 ashish 3123
      }
3124
      iprot.readStructEnd();
3125
      validate();
3126
    }
3127
 
3430 rajveer 3128
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3129
      validate();
3130
 
3131
      oprot.writeStructBegin(STRUCT_DESC);
3132
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3133
      oprot.writeI64(this.userId);
3134
      oprot.writeFieldEnd();
3135
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3136
      oprot.writeI64(this.fromTime);
123 ashish 3137
      oprot.writeFieldEnd();
3138
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3139
      oprot.writeI64(this.toTime);
123 ashish 3140
      oprot.writeFieldEnd();
3141
      if (this.status != null) {
3142
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3143
        oprot.writeI32(this.status.getValue());
3144
        oprot.writeFieldEnd();
3145
      }
420 ashish 3146
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3147
      oprot.writeI64(this.gatewayId);
420 ashish 3148
      oprot.writeFieldEnd();
123 ashish 3149
      oprot.writeFieldStop();
3150
      oprot.writeStructEnd();
3151
    }
3152
 
3153
    @Override
3154
    public String toString() {
3155
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
3156
      boolean first = true;
3157
 
3158
      sb.append("userId:");
3159
      sb.append(this.userId);
3160
      first = false;
3161
      if (!first) sb.append(", ");
695 rajveer 3162
      sb.append("fromTime:");
3163
      sb.append(this.fromTime);
123 ashish 3164
      first = false;
3165
      if (!first) sb.append(", ");
695 rajveer 3166
      sb.append("toTime:");
3167
      sb.append(this.toTime);
123 ashish 3168
      first = false;
3169
      if (!first) sb.append(", ");
3170
      sb.append("status:");
3171
      if (this.status == null) {
3172
        sb.append("null");
3173
      } else {
3174
        sb.append(this.status);
3175
      }
3176
      first = false;
3177
      if (!first) sb.append(", ");
695 rajveer 3178
      sb.append("gatewayId:");
3179
      sb.append(this.gatewayId);
123 ashish 3180
      first = false;
3181
      sb.append(")");
3182
      return sb.toString();
3183
    }
3184
 
3430 rajveer 3185
    public void validate() throws org.apache.thrift.TException {
123 ashish 3186
      // check for required fields
3187
    }
3188
 
3430 rajveer 3189
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3190
      try {
3191
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3192
      } catch (org.apache.thrift.TException te) {
3193
        throw new java.io.IOException(te);
3194
      }
3195
    }
3196
 
3197
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3198
      try {
3199
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3200
      } catch (org.apache.thrift.TException te) {
3201
        throw new java.io.IOException(te);
3202
      }
3203
    }
3204
 
123 ashish 3205
  }
3206
 
3430 rajveer 3207
  public static class getPaymentsForUser_result implements org.apache.thrift.TBase<getPaymentsForUser_result, getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable   {
3208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_result");
123 ashish 3209
 
3430 rajveer 3210
    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);
3211
    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 3212
 
3430 rajveer 3213
    private List<Payment> success; // required
3214
    private PaymentException pe; // required
123 ashish 3215
 
3216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3217
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3218
      SUCCESS((short)0, "success"),
3219
      PE((short)1, "pe");
3220
 
3221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3222
 
3223
      static {
3224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3225
          byName.put(field.getFieldName(), field);
3226
        }
3227
      }
3228
 
3229
      /**
3230
       * Find the _Fields constant that matches fieldId, or null if its not found.
3231
       */
3232
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3233
        switch(fieldId) {
3234
          case 0: // SUCCESS
3235
            return SUCCESS;
3236
          case 1: // PE
3237
            return PE;
3238
          default:
3239
            return null;
3240
        }
123 ashish 3241
      }
3242
 
3243
      /**
3244
       * Find the _Fields constant that matches fieldId, throwing an exception
3245
       * if it is not found.
3246
       */
3247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3248
        _Fields fields = findByThriftId(fieldId);
3249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3250
        return fields;
3251
      }
3252
 
3253
      /**
3254
       * Find the _Fields constant that matches name, or null if its not found.
3255
       */
3256
      public static _Fields findByName(String name) {
3257
        return byName.get(name);
3258
      }
3259
 
3260
      private final short _thriftId;
3261
      private final String _fieldName;
3262
 
3263
      _Fields(short thriftId, String fieldName) {
3264
        _thriftId = thriftId;
3265
        _fieldName = fieldName;
3266
      }
3267
 
3268
      public short getThriftFieldId() {
3269
        return _thriftId;
3270
      }
3271
 
3272
      public String getFieldName() {
3273
        return _fieldName;
3274
      }
3275
    }
3276
 
3277
    // isset id assignments
3278
 
3430 rajveer 3279
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3280
    static {
3430 rajveer 3281
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3282
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3283
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3284
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
3285
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3286
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3287
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3288
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
123 ashish 3289
    }
3290
 
3291
    public getPaymentsForUser_result() {
3292
    }
3293
 
3294
    public getPaymentsForUser_result(
3295
      List<Payment> success,
3296
      PaymentException pe)
3297
    {
3298
      this();
3299
      this.success = success;
3300
      this.pe = pe;
3301
    }
3302
 
3303
    /**
3304
     * Performs a deep copy on <i>other</i>.
3305
     */
3306
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
3307
      if (other.isSetSuccess()) {
3308
        List<Payment> __this__success = new ArrayList<Payment>();
3309
        for (Payment other_element : other.success) {
3310
          __this__success.add(new Payment(other_element));
3311
        }
3312
        this.success = __this__success;
3313
      }
3314
      if (other.isSetPe()) {
3315
        this.pe = new PaymentException(other.pe);
3316
      }
3317
    }
3318
 
3319
    public getPaymentsForUser_result deepCopy() {
3320
      return new getPaymentsForUser_result(this);
3321
    }
3322
 
3430 rajveer 3323
    @Override
3324
    public void clear() {
3325
      this.success = null;
3326
      this.pe = null;
123 ashish 3327
    }
3328
 
3329
    public int getSuccessSize() {
3330
      return (this.success == null) ? 0 : this.success.size();
3331
    }
3332
 
3333
    public java.util.Iterator<Payment> getSuccessIterator() {
3334
      return (this.success == null) ? null : this.success.iterator();
3335
    }
3336
 
3337
    public void addToSuccess(Payment elem) {
3338
      if (this.success == null) {
3339
        this.success = new ArrayList<Payment>();
3340
      }
3341
      this.success.add(elem);
3342
    }
3343
 
3344
    public List<Payment> getSuccess() {
3345
      return this.success;
3346
    }
3347
 
3430 rajveer 3348
    public void setSuccess(List<Payment> success) {
123 ashish 3349
      this.success = success;
3350
    }
3351
 
3352
    public void unsetSuccess() {
3353
      this.success = null;
3354
    }
3355
 
3430 rajveer 3356
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 3357
    public boolean isSetSuccess() {
3358
      return this.success != null;
3359
    }
3360
 
3361
    public void setSuccessIsSet(boolean value) {
3362
      if (!value) {
3363
        this.success = null;
3364
      }
3365
    }
3366
 
3367
    public PaymentException getPe() {
3368
      return this.pe;
3369
    }
3370
 
3430 rajveer 3371
    public void setPe(PaymentException pe) {
123 ashish 3372
      this.pe = pe;
3373
    }
3374
 
3375
    public void unsetPe() {
3376
      this.pe = null;
3377
    }
3378
 
3430 rajveer 3379
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 3380
    public boolean isSetPe() {
3381
      return this.pe != null;
3382
    }
3383
 
3384
    public void setPeIsSet(boolean value) {
3385
      if (!value) {
3386
        this.pe = null;
3387
      }
3388
    }
3389
 
3390
    public void setFieldValue(_Fields field, Object value) {
3391
      switch (field) {
3392
      case SUCCESS:
3393
        if (value == null) {
3394
          unsetSuccess();
3395
        } else {
3396
          setSuccess((List<Payment>)value);
3397
        }
3398
        break;
3399
 
3400
      case PE:
3401
        if (value == null) {
3402
          unsetPe();
3403
        } else {
3404
          setPe((PaymentException)value);
3405
        }
3406
        break;
3407
 
3408
      }
3409
    }
3410
 
3411
    public Object getFieldValue(_Fields field) {
3412
      switch (field) {
3413
      case SUCCESS:
3414
        return getSuccess();
3415
 
3416
      case PE:
3417
        return getPe();
3418
 
3419
      }
3420
      throw new IllegalStateException();
3421
    }
3422
 
3430 rajveer 3423
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3424
    public boolean isSet(_Fields field) {
3425
      if (field == null) {
3426
        throw new IllegalArgumentException();
3427
      }
123 ashish 3428
 
3429
      switch (field) {
3430
      case SUCCESS:
3431
        return isSetSuccess();
3432
      case PE:
3433
        return isSetPe();
3434
      }
3435
      throw new IllegalStateException();
3436
    }
3437
 
3438
    @Override
3439
    public boolean equals(Object that) {
3440
      if (that == null)
3441
        return false;
3442
      if (that instanceof getPaymentsForUser_result)
3443
        return this.equals((getPaymentsForUser_result)that);
3444
      return false;
3445
    }
3446
 
3447
    public boolean equals(getPaymentsForUser_result that) {
3448
      if (that == null)
3449
        return false;
3450
 
3451
      boolean this_present_success = true && this.isSetSuccess();
3452
      boolean that_present_success = true && that.isSetSuccess();
3453
      if (this_present_success || that_present_success) {
3454
        if (!(this_present_success && that_present_success))
3455
          return false;
3456
        if (!this.success.equals(that.success))
3457
          return false;
3458
      }
3459
 
3460
      boolean this_present_pe = true && this.isSetPe();
3461
      boolean that_present_pe = true && that.isSetPe();
3462
      if (this_present_pe || that_present_pe) {
3463
        if (!(this_present_pe && that_present_pe))
3464
          return false;
3465
        if (!this.pe.equals(that.pe))
3466
          return false;
3467
      }
3468
 
3469
      return true;
3470
    }
3471
 
3472
    @Override
3473
    public int hashCode() {
3474
      return 0;
3475
    }
3476
 
695 rajveer 3477
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 3478
      if (!getClass().equals(other.getClass())) {
3479
        return getClass().getName().compareTo(other.getClass().getName());
3480
      }
3481
 
3482
      int lastComparison = 0;
695 rajveer 3483
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 3484
 
3430 rajveer 3485
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 3486
      if (lastComparison != 0) {
3487
        return lastComparison;
3488
      }
3430 rajveer 3489
      if (isSetSuccess()) {
3490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3491
        if (lastComparison != 0) {
3492
          return lastComparison;
3493
        }
123 ashish 3494
      }
3430 rajveer 3495
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
123 ashish 3496
      if (lastComparison != 0) {
3497
        return lastComparison;
3498
      }
3430 rajveer 3499
      if (isSetPe()) {
3500
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
3501
        if (lastComparison != 0) {
3502
          return lastComparison;
3503
        }
123 ashish 3504
      }
3505
      return 0;
3506
    }
3507
 
3430 rajveer 3508
    public _Fields fieldForId(int fieldId) {
3509
      return _Fields.findByThriftId(fieldId);
3510
    }
3511
 
3512
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3513
      org.apache.thrift.protocol.TField field;
123 ashish 3514
      iprot.readStructBegin();
3515
      while (true)
3516
      {
3517
        field = iprot.readFieldBegin();
3430 rajveer 3518
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3519
          break;
3520
        }
3430 rajveer 3521
        switch (field.id) {
3522
          case 0: // SUCCESS
3523
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
3524
              {
3525
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
3526
                this.success = new ArrayList<Payment>(_list12.size);
3527
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
123 ashish 3528
                {
3430 rajveer 3529
                  Payment _elem14; // required
3530
                  _elem14 = new Payment();
3531
                  _elem14.read(iprot);
3532
                  this.success.add(_elem14);
123 ashish 3533
                }
3430 rajveer 3534
                iprot.readListEnd();
123 ashish 3535
              }
3430 rajveer 3536
            } else { 
3537
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3538
            }
3539
            break;
3540
          case 1: // PE
3541
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3542
              this.pe = new PaymentException();
3543
              this.pe.read(iprot);
3544
            } else { 
3545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3546
            }
3547
            break;
3548
          default:
3549
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3550
        }
3430 rajveer 3551
        iprot.readFieldEnd();
123 ashish 3552
      }
3553
      iprot.readStructEnd();
3554
      validate();
3555
    }
3556
 
3430 rajveer 3557
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3558
      oprot.writeStructBegin(STRUCT_DESC);
3559
 
3560
      if (this.isSetSuccess()) {
3561
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3562
        {
3430 rajveer 3563
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 3564
          for (Payment _iter15 : this.success)
123 ashish 3565
          {
2747 chandransh 3566
            _iter15.write(oprot);
123 ashish 3567
          }
3568
          oprot.writeListEnd();
3569
        }
3570
        oprot.writeFieldEnd();
3571
      } else if (this.isSetPe()) {
3572
        oprot.writeFieldBegin(PE_FIELD_DESC);
3573
        this.pe.write(oprot);
3574
        oprot.writeFieldEnd();
3575
      }
3576
      oprot.writeFieldStop();
3577
      oprot.writeStructEnd();
3578
    }
3579
 
3580
    @Override
3581
    public String toString() {
695 rajveer 3582
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 3583
      boolean first = true;
3584
 
3585
      sb.append("success:");
3586
      if (this.success == null) {
3587
        sb.append("null");
3588
      } else {
3589
        sb.append(this.success);
3590
      }
3591
      first = false;
3592
      if (!first) sb.append(", ");
3593
      sb.append("pe:");
3594
      if (this.pe == null) {
3595
        sb.append("null");
3596
      } else {
3597
        sb.append(this.pe);
3598
      }
3599
      first = false;
3600
      sb.append(")");
3601
      return sb.toString();
3602
    }
3603
 
3430 rajveer 3604
    public void validate() throws org.apache.thrift.TException {
123 ashish 3605
      // check for required fields
3606
    }
3607
 
3430 rajveer 3608
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3609
      try {
3610
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3611
      } catch (org.apache.thrift.TException te) {
3612
        throw new java.io.IOException(te);
3613
      }
3614
    }
3615
 
3616
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3617
      try {
3618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3619
      } catch (org.apache.thrift.TException te) {
3620
        throw new java.io.IOException(te);
3621
      }
3622
    }
3623
 
123 ashish 3624
  }
3625
 
3430 rajveer 3626
  public static class getPayments_args implements org.apache.thrift.TBase<getPayments_args, getPayments_args._Fields>, java.io.Serializable, Cloneable   {
3627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_args");
123 ashish 3628
 
3430 rajveer 3629
    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);
3630
    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);
3631
    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);
3632
    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 3633
 
3430 rajveer 3634
    private long fromTime; // required
3635
    private long toTime; // required
3636
    private PaymentStatus status; // required
3637
    private long gatewayId; // required
123 ashish 3638
 
3639
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3640
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 3641
      FROM_TIME((short)1, "fromTime"),
3642
      TO_TIME((short)2, "toTime"),
123 ashish 3643
      /**
3644
       * 
3645
       * @see PaymentStatus
3646
       */
3647
      STATUS((short)3, "status"),
695 rajveer 3648
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 3649
 
3650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3651
 
3652
      static {
3653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3654
          byName.put(field.getFieldName(), field);
3655
        }
3656
      }
3657
 
3658
      /**
3659
       * Find the _Fields constant that matches fieldId, or null if its not found.
3660
       */
3661
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3662
        switch(fieldId) {
3663
          case 1: // FROM_TIME
3664
            return FROM_TIME;
3665
          case 2: // TO_TIME
3666
            return TO_TIME;
3667
          case 3: // STATUS
3668
            return STATUS;
3669
          case 4: // GATEWAY_ID
3670
            return GATEWAY_ID;
3671
          default:
3672
            return null;
3673
        }
123 ashish 3674
      }
3675
 
3676
      /**
3677
       * Find the _Fields constant that matches fieldId, throwing an exception
3678
       * if it is not found.
3679
       */
3680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3681
        _Fields fields = findByThriftId(fieldId);
3682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3683
        return fields;
3684
      }
3685
 
3686
      /**
3687
       * Find the _Fields constant that matches name, or null if its not found.
3688
       */
3689
      public static _Fields findByName(String name) {
3690
        return byName.get(name);
3691
      }
3692
 
3693
      private final short _thriftId;
3694
      private final String _fieldName;
3695
 
3696
      _Fields(short thriftId, String fieldName) {
3697
        _thriftId = thriftId;
3698
        _fieldName = fieldName;
3699
      }
3700
 
3701
      public short getThriftFieldId() {
3702
        return _thriftId;
3703
      }
3704
 
3705
      public String getFieldName() {
3706
        return _fieldName;
3707
      }
3708
    }
3709
 
3710
    // isset id assignments
695 rajveer 3711
    private static final int __FROMTIME_ISSET_ID = 0;
3712
    private static final int __TOTIME_ISSET_ID = 1;
3713
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 3714
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 3715
 
3430 rajveer 3716
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3717
    static {
3430 rajveer 3718
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3719
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3720
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3721
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3722
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3723
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3724
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
3725
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3726
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3727
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3728
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
123 ashish 3729
    }
3730
 
3731
    public getPayments_args() {
3732
    }
3733
 
3734
    public getPayments_args(
695 rajveer 3735
      long fromTime,
3736
      long toTime,
123 ashish 3737
      PaymentStatus status,
695 rajveer 3738
      long gatewayId)
123 ashish 3739
    {
3740
      this();
695 rajveer 3741
      this.fromTime = fromTime;
3742
      setFromTimeIsSet(true);
3743
      this.toTime = toTime;
3744
      setToTimeIsSet(true);
123 ashish 3745
      this.status = status;
695 rajveer 3746
      this.gatewayId = gatewayId;
3747
      setGatewayIdIsSet(true);
123 ashish 3748
    }
3749
 
3750
    /**
3751
     * Performs a deep copy on <i>other</i>.
3752
     */
3753
    public getPayments_args(getPayments_args other) {
3754
      __isset_bit_vector.clear();
3755
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 3756
      this.fromTime = other.fromTime;
3757
      this.toTime = other.toTime;
123 ashish 3758
      if (other.isSetStatus()) {
3759
        this.status = other.status;
3760
      }
695 rajveer 3761
      this.gatewayId = other.gatewayId;
123 ashish 3762
    }
3763
 
3764
    public getPayments_args deepCopy() {
3765
      return new getPayments_args(this);
3766
    }
3767
 
3430 rajveer 3768
    @Override
3769
    public void clear() {
3770
      setFromTimeIsSet(false);
3771
      this.fromTime = 0;
3772
      setToTimeIsSet(false);
3773
      this.toTime = 0;
3774
      this.status = null;
3775
      setGatewayIdIsSet(false);
3776
      this.gatewayId = 0;
123 ashish 3777
    }
3778
 
695 rajveer 3779
    public long getFromTime() {
3780
      return this.fromTime;
123 ashish 3781
    }
3782
 
3430 rajveer 3783
    public void setFromTime(long fromTime) {
695 rajveer 3784
      this.fromTime = fromTime;
3785
      setFromTimeIsSet(true);
123 ashish 3786
    }
3787
 
695 rajveer 3788
    public void unsetFromTime() {
3789
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3790
    }
3791
 
3430 rajveer 3792
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 3793
    public boolean isSetFromTime() {
3794
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3795
    }
3796
 
695 rajveer 3797
    public void setFromTimeIsSet(boolean value) {
3798
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3799
    }
3800
 
695 rajveer 3801
    public long getToTime() {
3802
      return this.toTime;
123 ashish 3803
    }
3804
 
3430 rajveer 3805
    public void setToTime(long toTime) {
695 rajveer 3806
      this.toTime = toTime;
3807
      setToTimeIsSet(true);
123 ashish 3808
    }
3809
 
695 rajveer 3810
    public void unsetToTime() {
3811
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3812
    }
3813
 
3430 rajveer 3814
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 3815
    public boolean isSetToTime() {
3816
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3817
    }
3818
 
695 rajveer 3819
    public void setToTimeIsSet(boolean value) {
3820
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3821
    }
3822
 
3823
    /**
3824
     * 
3825
     * @see PaymentStatus
3826
     */
3827
    public PaymentStatus getStatus() {
3828
      return this.status;
3829
    }
3830
 
3831
    /**
3832
     * 
3833
     * @see PaymentStatus
3834
     */
3430 rajveer 3835
    public void setStatus(PaymentStatus status) {
123 ashish 3836
      this.status = status;
3837
    }
3838
 
3839
    public void unsetStatus() {
3840
      this.status = null;
3841
    }
3842
 
3430 rajveer 3843
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 3844
    public boolean isSetStatus() {
3845
      return this.status != null;
3846
    }
3847
 
3848
    public void setStatusIsSet(boolean value) {
3849
      if (!value) {
3850
        this.status = null;
3851
      }
3852
    }
3853
 
695 rajveer 3854
    public long getGatewayId() {
3855
      return this.gatewayId;
123 ashish 3856
    }
3857
 
3430 rajveer 3858
    public void setGatewayId(long gatewayId) {
695 rajveer 3859
      this.gatewayId = gatewayId;
3860
      setGatewayIdIsSet(true);
123 ashish 3861
    }
3862
 
695 rajveer 3863
    public void unsetGatewayId() {
3864
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3865
    }
3866
 
3430 rajveer 3867
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 3868
    public boolean isSetGatewayId() {
3869
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3870
    }
3871
 
695 rajveer 3872
    public void setGatewayIdIsSet(boolean value) {
3873
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3874
    }
3875
 
3876
    public void setFieldValue(_Fields field, Object value) {
3877
      switch (field) {
3878
      case FROM_TIME:
3879
        if (value == null) {
695 rajveer 3880
          unsetFromTime();
123 ashish 3881
        } else {
695 rajveer 3882
          setFromTime((Long)value);
123 ashish 3883
        }
3884
        break;
3885
 
3886
      case TO_TIME:
3887
        if (value == null) {
695 rajveer 3888
          unsetToTime();
123 ashish 3889
        } else {
695 rajveer 3890
          setToTime((Long)value);
123 ashish 3891
        }
3892
        break;
3893
 
3894
      case STATUS:
3895
        if (value == null) {
3896
          unsetStatus();
3897
        } else {
3898
          setStatus((PaymentStatus)value);
3899
        }
3900
        break;
3901
 
420 ashish 3902
      case GATEWAY_ID:
123 ashish 3903
        if (value == null) {
695 rajveer 3904
          unsetGatewayId();
123 ashish 3905
        } else {
695 rajveer 3906
          setGatewayId((Long)value);
123 ashish 3907
        }
3908
        break;
3909
 
3910
      }
3911
    }
3912
 
3913
    public Object getFieldValue(_Fields field) {
3914
      switch (field) {
3915
      case FROM_TIME:
3430 rajveer 3916
        return Long.valueOf(getFromTime());
123 ashish 3917
 
3918
      case TO_TIME:
3430 rajveer 3919
        return Long.valueOf(getToTime());
123 ashish 3920
 
3921
      case STATUS:
3922
        return getStatus();
3923
 
420 ashish 3924
      case GATEWAY_ID:
3430 rajveer 3925
        return Long.valueOf(getGatewayId());
123 ashish 3926
 
3927
      }
3928
      throw new IllegalStateException();
3929
    }
3930
 
3430 rajveer 3931
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3932
    public boolean isSet(_Fields field) {
3933
      if (field == null) {
3934
        throw new IllegalArgumentException();
3935
      }
123 ashish 3936
 
3937
      switch (field) {
3938
      case FROM_TIME:
695 rajveer 3939
        return isSetFromTime();
123 ashish 3940
      case TO_TIME:
695 rajveer 3941
        return isSetToTime();
123 ashish 3942
      case STATUS:
3943
        return isSetStatus();
420 ashish 3944
      case GATEWAY_ID:
695 rajveer 3945
        return isSetGatewayId();
123 ashish 3946
      }
3947
      throw new IllegalStateException();
3948
    }
3949
 
3950
    @Override
3951
    public boolean equals(Object that) {
3952
      if (that == null)
3953
        return false;
3954
      if (that instanceof getPayments_args)
3955
        return this.equals((getPayments_args)that);
3956
      return false;
3957
    }
3958
 
3959
    public boolean equals(getPayments_args that) {
3960
      if (that == null)
3961
        return false;
3962
 
695 rajveer 3963
      boolean this_present_fromTime = true;
3964
      boolean that_present_fromTime = true;
3965
      if (this_present_fromTime || that_present_fromTime) {
3966
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3967
          return false;
695 rajveer 3968
        if (this.fromTime != that.fromTime)
123 ashish 3969
          return false;
3970
      }
3971
 
695 rajveer 3972
      boolean this_present_toTime = true;
3973
      boolean that_present_toTime = true;
3974
      if (this_present_toTime || that_present_toTime) {
3975
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3976
          return false;
695 rajveer 3977
        if (this.toTime != that.toTime)
123 ashish 3978
          return false;
3979
      }
3980
 
3981
      boolean this_present_status = true && this.isSetStatus();
3982
      boolean that_present_status = true && that.isSetStatus();
3983
      if (this_present_status || that_present_status) {
3984
        if (!(this_present_status && that_present_status))
3985
          return false;
3986
        if (!this.status.equals(that.status))
3987
          return false;
3988
      }
3989
 
695 rajveer 3990
      boolean this_present_gatewayId = true;
3991
      boolean that_present_gatewayId = true;
3992
      if (this_present_gatewayId || that_present_gatewayId) {
3993
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3994
          return false;
695 rajveer 3995
        if (this.gatewayId != that.gatewayId)
123 ashish 3996
          return false;
3997
      }
3998
 
3999
      return true;
4000
    }
4001
 
4002
    @Override
4003
    public int hashCode() {
4004
      return 0;
4005
    }
4006
 
4007
    public int compareTo(getPayments_args other) {
4008
      if (!getClass().equals(other.getClass())) {
4009
        return getClass().getName().compareTo(other.getClass().getName());
4010
      }
4011
 
4012
      int lastComparison = 0;
4013
      getPayments_args typedOther = (getPayments_args)other;
4014
 
3430 rajveer 4015
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 4016
      if (lastComparison != 0) {
4017
        return lastComparison;
4018
      }
3430 rajveer 4019
      if (isSetFromTime()) {
4020
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
4021
        if (lastComparison != 0) {
4022
          return lastComparison;
4023
        }
123 ashish 4024
      }
3430 rajveer 4025
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 4026
      if (lastComparison != 0) {
4027
        return lastComparison;
4028
      }
3430 rajveer 4029
      if (isSetToTime()) {
4030
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
4031
        if (lastComparison != 0) {
4032
          return lastComparison;
4033
        }
123 ashish 4034
      }
3430 rajveer 4035
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 4036
      if (lastComparison != 0) {
4037
        return lastComparison;
4038
      }
3430 rajveer 4039
      if (isSetStatus()) {
4040
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4041
        if (lastComparison != 0) {
4042
          return lastComparison;
4043
        }
123 ashish 4044
      }
3430 rajveer 4045
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 4046
      if (lastComparison != 0) {
4047
        return lastComparison;
4048
      }
3430 rajveer 4049
      if (isSetGatewayId()) {
4050
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
4051
        if (lastComparison != 0) {
4052
          return lastComparison;
4053
        }
123 ashish 4054
      }
4055
      return 0;
4056
    }
4057
 
3430 rajveer 4058
    public _Fields fieldForId(int fieldId) {
4059
      return _Fields.findByThriftId(fieldId);
4060
    }
4061
 
4062
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4063
      org.apache.thrift.protocol.TField field;
123 ashish 4064
      iprot.readStructBegin();
4065
      while (true)
4066
      {
4067
        field = iprot.readFieldBegin();
3430 rajveer 4068
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4069
          break;
4070
        }
3430 rajveer 4071
        switch (field.id) {
4072
          case 1: // FROM_TIME
4073
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4074
              this.fromTime = iprot.readI64();
4075
              setFromTimeIsSet(true);
4076
            } else { 
4077
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4078
            }
4079
            break;
4080
          case 2: // TO_TIME
4081
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4082
              this.toTime = iprot.readI64();
4083
              setToTimeIsSet(true);
4084
            } else { 
4085
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4086
            }
4087
            break;
4088
          case 3: // STATUS
4089
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4090
              this.status = PaymentStatus.findByValue(iprot.readI32());
4091
            } else { 
4092
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4093
            }
4094
            break;
4095
          case 4: // GATEWAY_ID
4096
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4097
              this.gatewayId = iprot.readI64();
4098
              setGatewayIdIsSet(true);
4099
            } else { 
4100
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4101
            }
4102
            break;
4103
          default:
4104
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4105
        }
3430 rajveer 4106
        iprot.readFieldEnd();
123 ashish 4107
      }
4108
      iprot.readStructEnd();
4109
      validate();
4110
    }
4111
 
3430 rajveer 4112
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4113
      validate();
4114
 
4115
      oprot.writeStructBegin(STRUCT_DESC);
4116
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 4117
      oprot.writeI64(this.fromTime);
123 ashish 4118
      oprot.writeFieldEnd();
4119
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 4120
      oprot.writeI64(this.toTime);
123 ashish 4121
      oprot.writeFieldEnd();
4122
      if (this.status != null) {
4123
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4124
        oprot.writeI32(this.status.getValue());
4125
        oprot.writeFieldEnd();
4126
      }
420 ashish 4127
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 4128
      oprot.writeI64(this.gatewayId);
420 ashish 4129
      oprot.writeFieldEnd();
123 ashish 4130
      oprot.writeFieldStop();
4131
      oprot.writeStructEnd();
4132
    }
4133
 
4134
    @Override
4135
    public String toString() {
4136
      StringBuilder sb = new StringBuilder("getPayments_args(");
4137
      boolean first = true;
4138
 
695 rajveer 4139
      sb.append("fromTime:");
4140
      sb.append(this.fromTime);
123 ashish 4141
      first = false;
4142
      if (!first) sb.append(", ");
695 rajveer 4143
      sb.append("toTime:");
4144
      sb.append(this.toTime);
123 ashish 4145
      first = false;
4146
      if (!first) sb.append(", ");
4147
      sb.append("status:");
4148
      if (this.status == null) {
4149
        sb.append("null");
4150
      } else {
4151
        sb.append(this.status);
4152
      }
4153
      first = false;
4154
      if (!first) sb.append(", ");
695 rajveer 4155
      sb.append("gatewayId:");
4156
      sb.append(this.gatewayId);
123 ashish 4157
      first = false;
4158
      sb.append(")");
4159
      return sb.toString();
4160
    }
4161
 
3430 rajveer 4162
    public void validate() throws org.apache.thrift.TException {
123 ashish 4163
      // check for required fields
4164
    }
4165
 
3430 rajveer 4166
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4167
      try {
4168
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4169
      } catch (org.apache.thrift.TException te) {
4170
        throw new java.io.IOException(te);
4171
      }
4172
    }
4173
 
4174
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4175
      try {
4176
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4177
      } catch (org.apache.thrift.TException te) {
4178
        throw new java.io.IOException(te);
4179
      }
4180
    }
4181
 
123 ashish 4182
  }
4183
 
3430 rajveer 4184
  public static class getPayments_result implements org.apache.thrift.TBase<getPayments_result, getPayments_result._Fields>, java.io.Serializable, Cloneable   {
4185
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_result");
123 ashish 4186
 
3430 rajveer 4187
    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);
4188
    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 4189
 
3430 rajveer 4190
    private List<Payment> success; // required
4191
    private PaymentException pe; // required
123 ashish 4192
 
4193
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4194
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 4195
      SUCCESS((short)0, "success"),
4196
      PE((short)1, "pe");
4197
 
4198
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4199
 
4200
      static {
4201
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4202
          byName.put(field.getFieldName(), field);
4203
        }
4204
      }
4205
 
4206
      /**
4207
       * Find the _Fields constant that matches fieldId, or null if its not found.
4208
       */
4209
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4210
        switch(fieldId) {
4211
          case 0: // SUCCESS
4212
            return SUCCESS;
4213
          case 1: // PE
4214
            return PE;
4215
          default:
4216
            return null;
4217
        }
123 ashish 4218
      }
4219
 
4220
      /**
4221
       * Find the _Fields constant that matches fieldId, throwing an exception
4222
       * if it is not found.
4223
       */
4224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4225
        _Fields fields = findByThriftId(fieldId);
4226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4227
        return fields;
4228
      }
4229
 
4230
      /**
4231
       * Find the _Fields constant that matches name, or null if its not found.
4232
       */
4233
      public static _Fields findByName(String name) {
4234
        return byName.get(name);
4235
      }
4236
 
4237
      private final short _thriftId;
4238
      private final String _fieldName;
4239
 
4240
      _Fields(short thriftId, String fieldName) {
4241
        _thriftId = thriftId;
4242
        _fieldName = fieldName;
4243
      }
4244
 
4245
      public short getThriftFieldId() {
4246
        return _thriftId;
4247
      }
4248
 
4249
      public String getFieldName() {
4250
        return _fieldName;
4251
      }
4252
    }
4253
 
4254
    // isset id assignments
4255
 
3430 rajveer 4256
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4257
    static {
3430 rajveer 4258
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4259
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4260
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4261
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
4262
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4263
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4264
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4265
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
123 ashish 4266
    }
4267
 
4268
    public getPayments_result() {
4269
    }
4270
 
4271
    public getPayments_result(
4272
      List<Payment> success,
4273
      PaymentException pe)
4274
    {
4275
      this();
4276
      this.success = success;
4277
      this.pe = pe;
4278
    }
4279
 
4280
    /**
4281
     * Performs a deep copy on <i>other</i>.
4282
     */
4283
    public getPayments_result(getPayments_result other) {
4284
      if (other.isSetSuccess()) {
4285
        List<Payment> __this__success = new ArrayList<Payment>();
4286
        for (Payment other_element : other.success) {
4287
          __this__success.add(new Payment(other_element));
4288
        }
4289
        this.success = __this__success;
4290
      }
4291
      if (other.isSetPe()) {
4292
        this.pe = new PaymentException(other.pe);
4293
      }
4294
    }
4295
 
4296
    public getPayments_result deepCopy() {
4297
      return new getPayments_result(this);
4298
    }
4299
 
3430 rajveer 4300
    @Override
4301
    public void clear() {
4302
      this.success = null;
4303
      this.pe = null;
123 ashish 4304
    }
4305
 
4306
    public int getSuccessSize() {
4307
      return (this.success == null) ? 0 : this.success.size();
4308
    }
4309
 
4310
    public java.util.Iterator<Payment> getSuccessIterator() {
4311
      return (this.success == null) ? null : this.success.iterator();
4312
    }
4313
 
4314
    public void addToSuccess(Payment elem) {
4315
      if (this.success == null) {
4316
        this.success = new ArrayList<Payment>();
4317
      }
4318
      this.success.add(elem);
4319
    }
4320
 
4321
    public List<Payment> getSuccess() {
4322
      return this.success;
4323
    }
4324
 
3430 rajveer 4325
    public void setSuccess(List<Payment> success) {
123 ashish 4326
      this.success = success;
4327
    }
4328
 
4329
    public void unsetSuccess() {
4330
      this.success = null;
4331
    }
4332
 
3430 rajveer 4333
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4334
    public boolean isSetSuccess() {
4335
      return this.success != null;
4336
    }
4337
 
4338
    public void setSuccessIsSet(boolean value) {
4339
      if (!value) {
4340
        this.success = null;
4341
      }
4342
    }
4343
 
4344
    public PaymentException getPe() {
4345
      return this.pe;
4346
    }
4347
 
3430 rajveer 4348
    public void setPe(PaymentException pe) {
123 ashish 4349
      this.pe = pe;
4350
    }
4351
 
4352
    public void unsetPe() {
4353
      this.pe = null;
4354
    }
4355
 
3430 rajveer 4356
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 4357
    public boolean isSetPe() {
4358
      return this.pe != null;
4359
    }
4360
 
4361
    public void setPeIsSet(boolean value) {
4362
      if (!value) {
4363
        this.pe = null;
4364
      }
4365
    }
4366
 
4367
    public void setFieldValue(_Fields field, Object value) {
4368
      switch (field) {
4369
      case SUCCESS:
4370
        if (value == null) {
4371
          unsetSuccess();
4372
        } else {
4373
          setSuccess((List<Payment>)value);
4374
        }
4375
        break;
4376
 
4377
      case PE:
4378
        if (value == null) {
4379
          unsetPe();
4380
        } else {
4381
          setPe((PaymentException)value);
4382
        }
4383
        break;
4384
 
4385
      }
4386
    }
4387
 
4388
    public Object getFieldValue(_Fields field) {
4389
      switch (field) {
4390
      case SUCCESS:
4391
        return getSuccess();
4392
 
4393
      case PE:
4394
        return getPe();
4395
 
4396
      }
4397
      throw new IllegalStateException();
4398
    }
4399
 
3430 rajveer 4400
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4401
    public boolean isSet(_Fields field) {
4402
      if (field == null) {
4403
        throw new IllegalArgumentException();
4404
      }
123 ashish 4405
 
4406
      switch (field) {
4407
      case SUCCESS:
4408
        return isSetSuccess();
4409
      case PE:
4410
        return isSetPe();
4411
      }
4412
      throw new IllegalStateException();
4413
    }
4414
 
4415
    @Override
4416
    public boolean equals(Object that) {
4417
      if (that == null)
4418
        return false;
4419
      if (that instanceof getPayments_result)
4420
        return this.equals((getPayments_result)that);
4421
      return false;
4422
    }
4423
 
4424
    public boolean equals(getPayments_result that) {
4425
      if (that == null)
4426
        return false;
4427
 
4428
      boolean this_present_success = true && this.isSetSuccess();
4429
      boolean that_present_success = true && that.isSetSuccess();
4430
      if (this_present_success || that_present_success) {
4431
        if (!(this_present_success && that_present_success))
4432
          return false;
4433
        if (!this.success.equals(that.success))
4434
          return false;
4435
      }
4436
 
4437
      boolean this_present_pe = true && this.isSetPe();
4438
      boolean that_present_pe = true && that.isSetPe();
4439
      if (this_present_pe || that_present_pe) {
4440
        if (!(this_present_pe && that_present_pe))
4441
          return false;
4442
        if (!this.pe.equals(that.pe))
4443
          return false;
4444
      }
4445
 
4446
      return true;
4447
    }
4448
 
4449
    @Override
4450
    public int hashCode() {
4451
      return 0;
4452
    }
4453
 
695 rajveer 4454
    public int compareTo(getPayments_result other) {
123 ashish 4455
      if (!getClass().equals(other.getClass())) {
4456
        return getClass().getName().compareTo(other.getClass().getName());
4457
      }
4458
 
4459
      int lastComparison = 0;
695 rajveer 4460
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 4461
 
3430 rajveer 4462
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 4463
      if (lastComparison != 0) {
4464
        return lastComparison;
4465
      }
3430 rajveer 4466
      if (isSetSuccess()) {
4467
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4468
        if (lastComparison != 0) {
4469
          return lastComparison;
4470
        }
123 ashish 4471
      }
3430 rajveer 4472
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 4473
      if (lastComparison != 0) {
4474
        return lastComparison;
123 ashish 4475
      }
3430 rajveer 4476
      if (isSetPe()) {
4477
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
4478
        if (lastComparison != 0) {
4479
          return lastComparison;
4480
        }
123 ashish 4481
      }
4482
      return 0;
4483
    }
4484
 
3430 rajveer 4485
    public _Fields fieldForId(int fieldId) {
4486
      return _Fields.findByThriftId(fieldId);
4487
    }
4488
 
4489
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4490
      org.apache.thrift.protocol.TField field;
123 ashish 4491
      iprot.readStructBegin();
4492
      while (true)
4493
      {
4494
        field = iprot.readFieldBegin();
3430 rajveer 4495
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4496
          break;
4497
        }
3430 rajveer 4498
        switch (field.id) {
4499
          case 0: // SUCCESS
4500
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4501
              {
4502
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
4503
                this.success = new ArrayList<Payment>(_list16.size);
4504
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
420 ashish 4505
                {
3430 rajveer 4506
                  Payment _elem18; // required
4507
                  _elem18 = new Payment();
4508
                  _elem18.read(iprot);
4509
                  this.success.add(_elem18);
420 ashish 4510
                }
3430 rajveer 4511
                iprot.readListEnd();
123 ashish 4512
              }
3430 rajveer 4513
            } else { 
4514
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4515
            }
4516
            break;
4517
          case 1: // PE
4518
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4519
              this.pe = new PaymentException();
4520
              this.pe.read(iprot);
4521
            } else { 
4522
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4523
            }
4524
            break;
4525
          default:
4526
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4527
        }
3430 rajveer 4528
        iprot.readFieldEnd();
123 ashish 4529
      }
4530
      iprot.readStructEnd();
4531
      validate();
4532
    }
4533
 
3430 rajveer 4534
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4535
      oprot.writeStructBegin(STRUCT_DESC);
4536
 
4537
      if (this.isSetSuccess()) {
4538
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 4539
        {
3430 rajveer 4540
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 4541
          for (Payment _iter19 : this.success)
420 ashish 4542
          {
2747 chandransh 4543
            _iter19.write(oprot);
420 ashish 4544
          }
4545
          oprot.writeListEnd();
4546
        }
123 ashish 4547
        oprot.writeFieldEnd();
4548
      } else if (this.isSetPe()) {
4549
        oprot.writeFieldBegin(PE_FIELD_DESC);
4550
        this.pe.write(oprot);
4551
        oprot.writeFieldEnd();
4552
      }
4553
      oprot.writeFieldStop();
4554
      oprot.writeStructEnd();
4555
    }
4556
 
4557
    @Override
4558
    public String toString() {
695 rajveer 4559
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 4560
      boolean first = true;
4561
 
4562
      sb.append("success:");
4563
      if (this.success == null) {
4564
        sb.append("null");
4565
      } else {
4566
        sb.append(this.success);
4567
      }
4568
      first = false;
4569
      if (!first) sb.append(", ");
4570
      sb.append("pe:");
4571
      if (this.pe == null) {
4572
        sb.append("null");
4573
      } else {
4574
        sb.append(this.pe);
4575
      }
4576
      first = false;
4577
      sb.append(")");
4578
      return sb.toString();
4579
    }
4580
 
3430 rajveer 4581
    public void validate() throws org.apache.thrift.TException {
123 ashish 4582
      // check for required fields
4583
    }
4584
 
3430 rajveer 4585
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4586
      try {
4587
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4588
      } catch (org.apache.thrift.TException te) {
4589
        throw new java.io.IOException(te);
4590
      }
4591
    }
4592
 
4593
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4594
      try {
4595
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4596
      } catch (org.apache.thrift.TException te) {
4597
        throw new java.io.IOException(te);
4598
      }
4599
    }
4600
 
123 ashish 4601
  }
4602
 
4141 chandransh 4603
  public static class getPaymentsByCapturedDate_args implements org.apache.thrift.TBase<getPaymentsByCapturedDate_args, getPaymentsByCapturedDate_args._Fields>, java.io.Serializable, Cloneable   {
4604
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_args");
4605
 
4606
    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);
4607
    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);
4608
    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);
4609
 
4610
    private long fromTime; // required
4611
    private long toTime; // required
4612
    private long gatewayId; // required
4613
 
4614
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4615
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4616
      FROM_TIME((short)1, "fromTime"),
4617
      TO_TIME((short)2, "toTime"),
4618
      GATEWAY_ID((short)3, "gatewayId");
4619
 
4620
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4621
 
4622
      static {
4623
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4624
          byName.put(field.getFieldName(), field);
4625
        }
4626
      }
4627
 
4628
      /**
4629
       * Find the _Fields constant that matches fieldId, or null if its not found.
4630
       */
4631
      public static _Fields findByThriftId(int fieldId) {
4632
        switch(fieldId) {
4633
          case 1: // FROM_TIME
4634
            return FROM_TIME;
4635
          case 2: // TO_TIME
4636
            return TO_TIME;
4637
          case 3: // GATEWAY_ID
4638
            return GATEWAY_ID;
4639
          default:
4640
            return null;
4641
        }
4642
      }
4643
 
4644
      /**
4645
       * Find the _Fields constant that matches fieldId, throwing an exception
4646
       * if it is not found.
4647
       */
4648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4649
        _Fields fields = findByThriftId(fieldId);
4650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4651
        return fields;
4652
      }
4653
 
4654
      /**
4655
       * Find the _Fields constant that matches name, or null if its not found.
4656
       */
4657
      public static _Fields findByName(String name) {
4658
        return byName.get(name);
4659
      }
4660
 
4661
      private final short _thriftId;
4662
      private final String _fieldName;
4663
 
4664
      _Fields(short thriftId, String fieldName) {
4665
        _thriftId = thriftId;
4666
        _fieldName = fieldName;
4667
      }
4668
 
4669
      public short getThriftFieldId() {
4670
        return _thriftId;
4671
      }
4672
 
4673
      public String getFieldName() {
4674
        return _fieldName;
4675
      }
4676
    }
4677
 
4678
    // isset id assignments
4679
    private static final int __FROMTIME_ISSET_ID = 0;
4680
    private static final int __TOTIME_ISSET_ID = 1;
4681
    private static final int __GATEWAYID_ISSET_ID = 2;
4682
    private BitSet __isset_bit_vector = new BitSet(3);
4683
 
4684
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
4685
    static {
4686
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4687
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4688
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4689
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4690
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4691
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4692
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4693
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4694
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_args.class, metaDataMap);
4695
    }
4696
 
4697
    public getPaymentsByCapturedDate_args() {
4698
    }
4699
 
4700
    public getPaymentsByCapturedDate_args(
4701
      long fromTime,
4702
      long toTime,
4703
      long gatewayId)
4704
    {
4705
      this();
4706
      this.fromTime = fromTime;
4707
      setFromTimeIsSet(true);
4708
      this.toTime = toTime;
4709
      setToTimeIsSet(true);
4710
      this.gatewayId = gatewayId;
4711
      setGatewayIdIsSet(true);
4712
    }
4713
 
4714
    /**
4715
     * Performs a deep copy on <i>other</i>.
4716
     */
4717
    public getPaymentsByCapturedDate_args(getPaymentsByCapturedDate_args other) {
4718
      __isset_bit_vector.clear();
4719
      __isset_bit_vector.or(other.__isset_bit_vector);
4720
      this.fromTime = other.fromTime;
4721
      this.toTime = other.toTime;
4722
      this.gatewayId = other.gatewayId;
4723
    }
4724
 
4725
    public getPaymentsByCapturedDate_args deepCopy() {
4726
      return new getPaymentsByCapturedDate_args(this);
4727
    }
4728
 
4729
    @Override
4730
    public void clear() {
4731
      setFromTimeIsSet(false);
4732
      this.fromTime = 0;
4733
      setToTimeIsSet(false);
4734
      this.toTime = 0;
4735
      setGatewayIdIsSet(false);
4736
      this.gatewayId = 0;
4737
    }
4738
 
4739
    public long getFromTime() {
4740
      return this.fromTime;
4741
    }
4742
 
4743
    public void setFromTime(long fromTime) {
4744
      this.fromTime = fromTime;
4745
      setFromTimeIsSet(true);
4746
    }
4747
 
4748
    public void unsetFromTime() {
4749
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
4750
    }
4751
 
4752
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
4753
    public boolean isSetFromTime() {
4754
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
4755
    }
4756
 
4757
    public void setFromTimeIsSet(boolean value) {
4758
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
4759
    }
4760
 
4761
    public long getToTime() {
4762
      return this.toTime;
4763
    }
4764
 
4765
    public void setToTime(long toTime) {
4766
      this.toTime = toTime;
4767
      setToTimeIsSet(true);
4768
    }
4769
 
4770
    public void unsetToTime() {
4771
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
4772
    }
4773
 
4774
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
4775
    public boolean isSetToTime() {
4776
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
4777
    }
4778
 
4779
    public void setToTimeIsSet(boolean value) {
4780
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
4781
    }
4782
 
4783
    public long getGatewayId() {
4784
      return this.gatewayId;
4785
    }
4786
 
4787
    public void setGatewayId(long gatewayId) {
4788
      this.gatewayId = gatewayId;
4789
      setGatewayIdIsSet(true);
4790
    }
4791
 
4792
    public void unsetGatewayId() {
4793
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
4794
    }
4795
 
4796
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
4797
    public boolean isSetGatewayId() {
4798
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
4799
    }
4800
 
4801
    public void setGatewayIdIsSet(boolean value) {
4802
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
4803
    }
4804
 
4805
    public void setFieldValue(_Fields field, Object value) {
4806
      switch (field) {
4807
      case FROM_TIME:
4808
        if (value == null) {
4809
          unsetFromTime();
4810
        } else {
4811
          setFromTime((Long)value);
4812
        }
4813
        break;
4814
 
4815
      case TO_TIME:
4816
        if (value == null) {
4817
          unsetToTime();
4818
        } else {
4819
          setToTime((Long)value);
4820
        }
4821
        break;
4822
 
4823
      case GATEWAY_ID:
4824
        if (value == null) {
4825
          unsetGatewayId();
4826
        } else {
4827
          setGatewayId((Long)value);
4828
        }
4829
        break;
4830
 
4831
      }
4832
    }
4833
 
4834
    public Object getFieldValue(_Fields field) {
4835
      switch (field) {
4836
      case FROM_TIME:
4837
        return Long.valueOf(getFromTime());
4838
 
4839
      case TO_TIME:
4840
        return Long.valueOf(getToTime());
4841
 
4842
      case GATEWAY_ID:
4843
        return Long.valueOf(getGatewayId());
4844
 
4845
      }
4846
      throw new IllegalStateException();
4847
    }
4848
 
4849
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4850
    public boolean isSet(_Fields field) {
4851
      if (field == null) {
4852
        throw new IllegalArgumentException();
4853
      }
4854
 
4855
      switch (field) {
4856
      case FROM_TIME:
4857
        return isSetFromTime();
4858
      case TO_TIME:
4859
        return isSetToTime();
4860
      case GATEWAY_ID:
4861
        return isSetGatewayId();
4862
      }
4863
      throw new IllegalStateException();
4864
    }
4865
 
4866
    @Override
4867
    public boolean equals(Object that) {
4868
      if (that == null)
4869
        return false;
4870
      if (that instanceof getPaymentsByCapturedDate_args)
4871
        return this.equals((getPaymentsByCapturedDate_args)that);
4872
      return false;
4873
    }
4874
 
4875
    public boolean equals(getPaymentsByCapturedDate_args that) {
4876
      if (that == null)
4877
        return false;
4878
 
4879
      boolean this_present_fromTime = true;
4880
      boolean that_present_fromTime = true;
4881
      if (this_present_fromTime || that_present_fromTime) {
4882
        if (!(this_present_fromTime && that_present_fromTime))
4883
          return false;
4884
        if (this.fromTime != that.fromTime)
4885
          return false;
4886
      }
4887
 
4888
      boolean this_present_toTime = true;
4889
      boolean that_present_toTime = true;
4890
      if (this_present_toTime || that_present_toTime) {
4891
        if (!(this_present_toTime && that_present_toTime))
4892
          return false;
4893
        if (this.toTime != that.toTime)
4894
          return false;
4895
      }
4896
 
4897
      boolean this_present_gatewayId = true;
4898
      boolean that_present_gatewayId = true;
4899
      if (this_present_gatewayId || that_present_gatewayId) {
4900
        if (!(this_present_gatewayId && that_present_gatewayId))
4901
          return false;
4902
        if (this.gatewayId != that.gatewayId)
4903
          return false;
4904
      }
4905
 
4906
      return true;
4907
    }
4908
 
4909
    @Override
4910
    public int hashCode() {
4911
      return 0;
4912
    }
4913
 
4914
    public int compareTo(getPaymentsByCapturedDate_args other) {
4915
      if (!getClass().equals(other.getClass())) {
4916
        return getClass().getName().compareTo(other.getClass().getName());
4917
      }
4918
 
4919
      int lastComparison = 0;
4920
      getPaymentsByCapturedDate_args typedOther = (getPaymentsByCapturedDate_args)other;
4921
 
4922
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
4923
      if (lastComparison != 0) {
4924
        return lastComparison;
4925
      }
4926
      if (isSetFromTime()) {
4927
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
4928
        if (lastComparison != 0) {
4929
          return lastComparison;
4930
        }
4931
      }
4932
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
4933
      if (lastComparison != 0) {
4934
        return lastComparison;
4935
      }
4936
      if (isSetToTime()) {
4937
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
4938
        if (lastComparison != 0) {
4939
          return lastComparison;
4940
        }
4941
      }
4942
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
4943
      if (lastComparison != 0) {
4944
        return lastComparison;
4945
      }
4946
      if (isSetGatewayId()) {
4947
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
4948
        if (lastComparison != 0) {
4949
          return lastComparison;
4950
        }
4951
      }
4952
      return 0;
4953
    }
4954
 
4955
    public _Fields fieldForId(int fieldId) {
4956
      return _Fields.findByThriftId(fieldId);
4957
    }
4958
 
4959
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4960
      org.apache.thrift.protocol.TField field;
4961
      iprot.readStructBegin();
4962
      while (true)
4963
      {
4964
        field = iprot.readFieldBegin();
4965
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
4966
          break;
4967
        }
4968
        switch (field.id) {
4969
          case 1: // FROM_TIME
4970
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4971
              this.fromTime = iprot.readI64();
4972
              setFromTimeIsSet(true);
4973
            } else { 
4974
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4975
            }
4976
            break;
4977
          case 2: // TO_TIME
4978
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4979
              this.toTime = iprot.readI64();
4980
              setToTimeIsSet(true);
4981
            } else { 
4982
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4983
            }
4984
            break;
4985
          case 3: // GATEWAY_ID
4986
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4987
              this.gatewayId = iprot.readI64();
4988
              setGatewayIdIsSet(true);
4989
            } else { 
4990
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4991
            }
4992
            break;
4993
          default:
4994
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4995
        }
4996
        iprot.readFieldEnd();
4997
      }
4998
      iprot.readStructEnd();
4999
      validate();
5000
    }
5001
 
5002
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5003
      validate();
5004
 
5005
      oprot.writeStructBegin(STRUCT_DESC);
5006
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
5007
      oprot.writeI64(this.fromTime);
5008
      oprot.writeFieldEnd();
5009
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
5010
      oprot.writeI64(this.toTime);
5011
      oprot.writeFieldEnd();
5012
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
5013
      oprot.writeI64(this.gatewayId);
5014
      oprot.writeFieldEnd();
5015
      oprot.writeFieldStop();
5016
      oprot.writeStructEnd();
5017
    }
5018
 
5019
    @Override
5020
    public String toString() {
5021
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_args(");
5022
      boolean first = true;
5023
 
5024
      sb.append("fromTime:");
5025
      sb.append(this.fromTime);
5026
      first = false;
5027
      if (!first) sb.append(", ");
5028
      sb.append("toTime:");
5029
      sb.append(this.toTime);
5030
      first = false;
5031
      if (!first) sb.append(", ");
5032
      sb.append("gatewayId:");
5033
      sb.append(this.gatewayId);
5034
      first = false;
5035
      sb.append(")");
5036
      return sb.toString();
5037
    }
5038
 
5039
    public void validate() throws org.apache.thrift.TException {
5040
      // check for required fields
5041
    }
5042
 
5043
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5044
      try {
5045
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5046
      } catch (org.apache.thrift.TException te) {
5047
        throw new java.io.IOException(te);
5048
      }
5049
    }
5050
 
5051
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5052
      try {
5053
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5054
      } catch (org.apache.thrift.TException te) {
5055
        throw new java.io.IOException(te);
5056
      }
5057
    }
5058
 
5059
  }
5060
 
5061
  public static class getPaymentsByCapturedDate_result implements org.apache.thrift.TBase<getPaymentsByCapturedDate_result, getPaymentsByCapturedDate_result._Fields>, java.io.Serializable, Cloneable   {
5062
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_result");
5063
 
5064
    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);
5065
    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);
5066
 
5067
    private List<Payment> success; // required
5068
    private PaymentException pe; // required
5069
 
5070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5071
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5072
      SUCCESS((short)0, "success"),
5073
      PE((short)1, "pe");
5074
 
5075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5076
 
5077
      static {
5078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5079
          byName.put(field.getFieldName(), field);
5080
        }
5081
      }
5082
 
5083
      /**
5084
       * Find the _Fields constant that matches fieldId, or null if its not found.
5085
       */
5086
      public static _Fields findByThriftId(int fieldId) {
5087
        switch(fieldId) {
5088
          case 0: // SUCCESS
5089
            return SUCCESS;
5090
          case 1: // PE
5091
            return PE;
5092
          default:
5093
            return null;
5094
        }
5095
      }
5096
 
5097
      /**
5098
       * Find the _Fields constant that matches fieldId, throwing an exception
5099
       * if it is not found.
5100
       */
5101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5102
        _Fields fields = findByThriftId(fieldId);
5103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5104
        return fields;
5105
      }
5106
 
5107
      /**
5108
       * Find the _Fields constant that matches name, or null if its not found.
5109
       */
5110
      public static _Fields findByName(String name) {
5111
        return byName.get(name);
5112
      }
5113
 
5114
      private final short _thriftId;
5115
      private final String _fieldName;
5116
 
5117
      _Fields(short thriftId, String fieldName) {
5118
        _thriftId = thriftId;
5119
        _fieldName = fieldName;
5120
      }
5121
 
5122
      public short getThriftFieldId() {
5123
        return _thriftId;
5124
      }
5125
 
5126
      public String getFieldName() {
5127
        return _fieldName;
5128
      }
5129
    }
5130
 
5131
    // isset id assignments
5132
 
5133
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5134
    static {
5135
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5136
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5137
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5138
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
5139
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5140
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5141
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5142
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_result.class, metaDataMap);
5143
    }
5144
 
5145
    public getPaymentsByCapturedDate_result() {
5146
    }
5147
 
5148
    public getPaymentsByCapturedDate_result(
5149
      List<Payment> success,
5150
      PaymentException pe)
5151
    {
5152
      this();
5153
      this.success = success;
5154
      this.pe = pe;
5155
    }
5156
 
5157
    /**
5158
     * Performs a deep copy on <i>other</i>.
5159
     */
5160
    public getPaymentsByCapturedDate_result(getPaymentsByCapturedDate_result other) {
5161
      if (other.isSetSuccess()) {
5162
        List<Payment> __this__success = new ArrayList<Payment>();
5163
        for (Payment other_element : other.success) {
5164
          __this__success.add(new Payment(other_element));
5165
        }
5166
        this.success = __this__success;
5167
      }
5168
      if (other.isSetPe()) {
5169
        this.pe = new PaymentException(other.pe);
5170
      }
5171
    }
5172
 
5173
    public getPaymentsByCapturedDate_result deepCopy() {
5174
      return new getPaymentsByCapturedDate_result(this);
5175
    }
5176
 
5177
    @Override
5178
    public void clear() {
5179
      this.success = null;
5180
      this.pe = null;
5181
    }
5182
 
5183
    public int getSuccessSize() {
5184
      return (this.success == null) ? 0 : this.success.size();
5185
    }
5186
 
5187
    public java.util.Iterator<Payment> getSuccessIterator() {
5188
      return (this.success == null) ? null : this.success.iterator();
5189
    }
5190
 
5191
    public void addToSuccess(Payment elem) {
5192
      if (this.success == null) {
5193
        this.success = new ArrayList<Payment>();
5194
      }
5195
      this.success.add(elem);
5196
    }
5197
 
5198
    public List<Payment> getSuccess() {
5199
      return this.success;
5200
    }
5201
 
5202
    public void setSuccess(List<Payment> success) {
5203
      this.success = success;
5204
    }
5205
 
5206
    public void unsetSuccess() {
5207
      this.success = null;
5208
    }
5209
 
5210
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5211
    public boolean isSetSuccess() {
5212
      return this.success != null;
5213
    }
5214
 
5215
    public void setSuccessIsSet(boolean value) {
5216
      if (!value) {
5217
        this.success = null;
5218
      }
5219
    }
5220
 
5221
    public PaymentException getPe() {
5222
      return this.pe;
5223
    }
5224
 
5225
    public void setPe(PaymentException pe) {
5226
      this.pe = pe;
5227
    }
5228
 
5229
    public void unsetPe() {
5230
      this.pe = null;
5231
    }
5232
 
5233
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
5234
    public boolean isSetPe() {
5235
      return this.pe != null;
5236
    }
5237
 
5238
    public void setPeIsSet(boolean value) {
5239
      if (!value) {
5240
        this.pe = null;
5241
      }
5242
    }
5243
 
5244
    public void setFieldValue(_Fields field, Object value) {
5245
      switch (field) {
5246
      case SUCCESS:
5247
        if (value == null) {
5248
          unsetSuccess();
5249
        } else {
5250
          setSuccess((List<Payment>)value);
5251
        }
5252
        break;
5253
 
5254
      case PE:
5255
        if (value == null) {
5256
          unsetPe();
5257
        } else {
5258
          setPe((PaymentException)value);
5259
        }
5260
        break;
5261
 
5262
      }
5263
    }
5264
 
5265
    public Object getFieldValue(_Fields field) {
5266
      switch (field) {
5267
      case SUCCESS:
5268
        return getSuccess();
5269
 
5270
      case PE:
5271
        return getPe();
5272
 
5273
      }
5274
      throw new IllegalStateException();
5275
    }
5276
 
5277
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5278
    public boolean isSet(_Fields field) {
5279
      if (field == null) {
5280
        throw new IllegalArgumentException();
5281
      }
5282
 
5283
      switch (field) {
5284
      case SUCCESS:
5285
        return isSetSuccess();
5286
      case PE:
5287
        return isSetPe();
5288
      }
5289
      throw new IllegalStateException();
5290
    }
5291
 
5292
    @Override
5293
    public boolean equals(Object that) {
5294
      if (that == null)
5295
        return false;
5296
      if (that instanceof getPaymentsByCapturedDate_result)
5297
        return this.equals((getPaymentsByCapturedDate_result)that);
5298
      return false;
5299
    }
5300
 
5301
    public boolean equals(getPaymentsByCapturedDate_result that) {
5302
      if (that == null)
5303
        return false;
5304
 
5305
      boolean this_present_success = true && this.isSetSuccess();
5306
      boolean that_present_success = true && that.isSetSuccess();
5307
      if (this_present_success || that_present_success) {
5308
        if (!(this_present_success && that_present_success))
5309
          return false;
5310
        if (!this.success.equals(that.success))
5311
          return false;
5312
      }
5313
 
5314
      boolean this_present_pe = true && this.isSetPe();
5315
      boolean that_present_pe = true && that.isSetPe();
5316
      if (this_present_pe || that_present_pe) {
5317
        if (!(this_present_pe && that_present_pe))
5318
          return false;
5319
        if (!this.pe.equals(that.pe))
5320
          return false;
5321
      }
5322
 
5323
      return true;
5324
    }
5325
 
5326
    @Override
5327
    public int hashCode() {
5328
      return 0;
5329
    }
5330
 
5331
    public int compareTo(getPaymentsByCapturedDate_result other) {
5332
      if (!getClass().equals(other.getClass())) {
5333
        return getClass().getName().compareTo(other.getClass().getName());
5334
      }
5335
 
5336
      int lastComparison = 0;
5337
      getPaymentsByCapturedDate_result typedOther = (getPaymentsByCapturedDate_result)other;
5338
 
5339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5340
      if (lastComparison != 0) {
5341
        return lastComparison;
5342
      }
5343
      if (isSetSuccess()) {
5344
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5345
        if (lastComparison != 0) {
5346
          return lastComparison;
5347
        }
5348
      }
5349
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
5350
      if (lastComparison != 0) {
5351
        return lastComparison;
5352
      }
5353
      if (isSetPe()) {
5354
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
5355
        if (lastComparison != 0) {
5356
          return lastComparison;
5357
        }
5358
      }
5359
      return 0;
5360
    }
5361
 
5362
    public _Fields fieldForId(int fieldId) {
5363
      return _Fields.findByThriftId(fieldId);
5364
    }
5365
 
5366
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5367
      org.apache.thrift.protocol.TField field;
5368
      iprot.readStructBegin();
5369
      while (true)
5370
      {
5371
        field = iprot.readFieldBegin();
5372
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5373
          break;
5374
        }
5375
        switch (field.id) {
5376
          case 0: // SUCCESS
5377
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5378
              {
5379
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
5380
                this.success = new ArrayList<Payment>(_list20.size);
5381
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
5382
                {
5383
                  Payment _elem22; // required
5384
                  _elem22 = new Payment();
5385
                  _elem22.read(iprot);
5386
                  this.success.add(_elem22);
5387
                }
5388
                iprot.readListEnd();
5389
              }
5390
            } else { 
5391
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5392
            }
5393
            break;
5394
          case 1: // PE
5395
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5396
              this.pe = new PaymentException();
5397
              this.pe.read(iprot);
5398
            } else { 
5399
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5400
            }
5401
            break;
5402
          default:
5403
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5404
        }
5405
        iprot.readFieldEnd();
5406
      }
5407
      iprot.readStructEnd();
5408
      validate();
5409
    }
5410
 
5411
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5412
      oprot.writeStructBegin(STRUCT_DESC);
5413
 
5414
      if (this.isSetSuccess()) {
5415
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5416
        {
5417
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5418
          for (Payment _iter23 : this.success)
5419
          {
5420
            _iter23.write(oprot);
5421
          }
5422
          oprot.writeListEnd();
5423
        }
5424
        oprot.writeFieldEnd();
5425
      } else if (this.isSetPe()) {
5426
        oprot.writeFieldBegin(PE_FIELD_DESC);
5427
        this.pe.write(oprot);
5428
        oprot.writeFieldEnd();
5429
      }
5430
      oprot.writeFieldStop();
5431
      oprot.writeStructEnd();
5432
    }
5433
 
5434
    @Override
5435
    public String toString() {
5436
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_result(");
5437
      boolean first = true;
5438
 
5439
      sb.append("success:");
5440
      if (this.success == null) {
5441
        sb.append("null");
5442
      } else {
5443
        sb.append(this.success);
5444
      }
5445
      first = false;
5446
      if (!first) sb.append(", ");
5447
      sb.append("pe:");
5448
      if (this.pe == null) {
5449
        sb.append("null");
5450
      } else {
5451
        sb.append(this.pe);
5452
      }
5453
      first = false;
5454
      sb.append(")");
5455
      return sb.toString();
5456
    }
5457
 
5458
    public void validate() throws org.apache.thrift.TException {
5459
      // check for required fields
5460
    }
5461
 
5462
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5463
      try {
5464
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5465
      } catch (org.apache.thrift.TException te) {
5466
        throw new java.io.IOException(te);
5467
      }
5468
    }
5469
 
5470
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5471
      try {
5472
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5473
      } catch (org.apache.thrift.TException te) {
5474
        throw new java.io.IOException(te);
5475
      }
5476
    }
5477
 
5478
  }
5479
 
3430 rajveer 5480
  public static class getPaymentGateway_args implements org.apache.thrift.TBase<getPaymentGateway_args, getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable   {
5481
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_args");
123 ashish 5482
 
3430 rajveer 5483
    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 5484
 
3430 rajveer 5485
    private long id; // required
123 ashish 5486
 
5487
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5488
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 5489
      ID((short)1, "id");
123 ashish 5490
 
5491
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5492
 
5493
      static {
5494
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5495
          byName.put(field.getFieldName(), field);
5496
        }
5497
      }
5498
 
5499
      /**
5500
       * Find the _Fields constant that matches fieldId, or null if its not found.
5501
       */
5502
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5503
        switch(fieldId) {
5504
          case 1: // ID
5505
            return ID;
5506
          default:
5507
            return null;
5508
        }
123 ashish 5509
      }
5510
 
5511
      /**
5512
       * Find the _Fields constant that matches fieldId, throwing an exception
5513
       * if it is not found.
5514
       */
5515
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5516
        _Fields fields = findByThriftId(fieldId);
5517
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5518
        return fields;
5519
      }
5520
 
5521
      /**
5522
       * Find the _Fields constant that matches name, or null if its not found.
5523
       */
5524
      public static _Fields findByName(String name) {
5525
        return byName.get(name);
5526
      }
5527
 
5528
      private final short _thriftId;
5529
      private final String _fieldName;
5530
 
5531
      _Fields(short thriftId, String fieldName) {
5532
        _thriftId = thriftId;
5533
        _fieldName = fieldName;
5534
      }
5535
 
5536
      public short getThriftFieldId() {
5537
        return _thriftId;
5538
      }
5539
 
5540
      public String getFieldName() {
5541
        return _fieldName;
5542
      }
5543
    }
5544
 
5545
    // isset id assignments
420 ashish 5546
    private static final int __ID_ISSET_ID = 0;
123 ashish 5547
    private BitSet __isset_bit_vector = new BitSet(1);
5548
 
3430 rajveer 5549
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 5550
    static {
3430 rajveer 5551
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5552
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5553
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5554
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5555
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 5556
    }
5557
 
695 rajveer 5558
    public getPaymentGateway_args() {
123 ashish 5559
    }
5560
 
695 rajveer 5561
    public getPaymentGateway_args(
5562
      long id)
123 ashish 5563
    {
5564
      this();
420 ashish 5565
      this.id = id;
5566
      setIdIsSet(true);
123 ashish 5567
    }
5568
 
5569
    /**
5570
     * Performs a deep copy on <i>other</i>.
5571
     */
695 rajveer 5572
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 5573
      __isset_bit_vector.clear();
5574
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 5575
      this.id = other.id;
123 ashish 5576
    }
5577
 
695 rajveer 5578
    public getPaymentGateway_args deepCopy() {
5579
      return new getPaymentGateway_args(this);
123 ashish 5580
    }
5581
 
3430 rajveer 5582
    @Override
5583
    public void clear() {
5584
      setIdIsSet(false);
5585
      this.id = 0;
123 ashish 5586
    }
5587
 
420 ashish 5588
    public long getId() {
5589
      return this.id;
123 ashish 5590
    }
5591
 
3430 rajveer 5592
    public void setId(long id) {
420 ashish 5593
      this.id = id;
5594
      setIdIsSet(true);
123 ashish 5595
    }
5596
 
420 ashish 5597
    public void unsetId() {
5598
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 5599
    }
5600
 
3430 rajveer 5601
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 5602
    public boolean isSetId() {
5603
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 5604
    }
5605
 
420 ashish 5606
    public void setIdIsSet(boolean value) {
5607
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 5608
    }
5609
 
5610
    public void setFieldValue(_Fields field, Object value) {
5611
      switch (field) {
420 ashish 5612
      case ID:
123 ashish 5613
        if (value == null) {
420 ashish 5614
          unsetId();
123 ashish 5615
        } else {
420 ashish 5616
          setId((Long)value);
123 ashish 5617
        }
5618
        break;
5619
 
5620
      }
5621
    }
5622
 
5623
    public Object getFieldValue(_Fields field) {
5624
      switch (field) {
420 ashish 5625
      case ID:
3430 rajveer 5626
        return Long.valueOf(getId());
123 ashish 5627
 
5628
      }
5629
      throw new IllegalStateException();
5630
    }
5631
 
3430 rajveer 5632
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5633
    public boolean isSet(_Fields field) {
5634
      if (field == null) {
5635
        throw new IllegalArgumentException();
5636
      }
123 ashish 5637
 
5638
      switch (field) {
420 ashish 5639
      case ID:
5640
        return isSetId();
123 ashish 5641
      }
5642
      throw new IllegalStateException();
5643
    }
5644
 
5645
    @Override
5646
    public boolean equals(Object that) {
5647
      if (that == null)
5648
        return false;
695 rajveer 5649
      if (that instanceof getPaymentGateway_args)
5650
        return this.equals((getPaymentGateway_args)that);
123 ashish 5651
      return false;
5652
    }
5653
 
695 rajveer 5654
    public boolean equals(getPaymentGateway_args that) {
123 ashish 5655
      if (that == null)
5656
        return false;
5657
 
420 ashish 5658
      boolean this_present_id = true;
5659
      boolean that_present_id = true;
5660
      if (this_present_id || that_present_id) {
5661
        if (!(this_present_id && that_present_id))
123 ashish 5662
          return false;
420 ashish 5663
        if (this.id != that.id)
123 ashish 5664
          return false;
5665
      }
5666
 
5667
      return true;
5668
    }
5669
 
5670
    @Override
5671
    public int hashCode() {
5672
      return 0;
5673
    }
5674
 
695 rajveer 5675
    public int compareTo(getPaymentGateway_args other) {
123 ashish 5676
      if (!getClass().equals(other.getClass())) {
5677
        return getClass().getName().compareTo(other.getClass().getName());
5678
      }
5679
 
5680
      int lastComparison = 0;
695 rajveer 5681
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 5682
 
3430 rajveer 5683
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
123 ashish 5684
      if (lastComparison != 0) {
5685
        return lastComparison;
5686
      }
3430 rajveer 5687
      if (isSetId()) {
5688
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
5689
        if (lastComparison != 0) {
5690
          return lastComparison;
5691
        }
123 ashish 5692
      }
5693
      return 0;
5694
    }
5695
 
3430 rajveer 5696
    public _Fields fieldForId(int fieldId) {
5697
      return _Fields.findByThriftId(fieldId);
5698
    }
5699
 
5700
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5701
      org.apache.thrift.protocol.TField field;
123 ashish 5702
      iprot.readStructBegin();
5703
      while (true)
5704
      {
5705
        field = iprot.readFieldBegin();
3430 rajveer 5706
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 5707
          break;
5708
        }
3430 rajveer 5709
        switch (field.id) {
5710
          case 1: // ID
5711
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5712
              this.id = iprot.readI64();
5713
              setIdIsSet(true);
5714
            } else { 
5715
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5716
            }
5717
            break;
5718
          default:
5719
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 5720
        }
3430 rajveer 5721
        iprot.readFieldEnd();
123 ashish 5722
      }
5723
      iprot.readStructEnd();
5724
      validate();
5725
    }
5726
 
3430 rajveer 5727
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 5728
      validate();
5729
 
5730
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 5731
      oprot.writeFieldBegin(ID_FIELD_DESC);
5732
      oprot.writeI64(this.id);
123 ashish 5733
      oprot.writeFieldEnd();
5734
      oprot.writeFieldStop();
5735
      oprot.writeStructEnd();
5736
    }
5737
 
5738
    @Override
5739
    public String toString() {
695 rajveer 5740
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 5741
      boolean first = true;
5742
 
420 ashish 5743
      sb.append("id:");
5744
      sb.append(this.id);
123 ashish 5745
      first = false;
5746
      sb.append(")");
5747
      return sb.toString();
5748
    }
5749
 
3430 rajveer 5750
    public void validate() throws org.apache.thrift.TException {
123 ashish 5751
      // check for required fields
5752
    }
5753
 
3430 rajveer 5754
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5755
      try {
5756
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5757
      } catch (org.apache.thrift.TException te) {
5758
        throw new java.io.IOException(te);
5759
      }
5760
    }
5761
 
5762
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5763
      try {
5764
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5765
        __isset_bit_vector = new BitSet(1);
5766
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5767
      } catch (org.apache.thrift.TException te) {
5768
        throw new java.io.IOException(te);
5769
      }
5770
    }
5771
 
123 ashish 5772
  }
5773
 
3430 rajveer 5774
  public static class getPaymentGateway_result implements org.apache.thrift.TBase<getPaymentGateway_result, getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable   {
5775
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_result");
123 ashish 5776
 
3430 rajveer 5777
    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);
5778
    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 5779
 
3430 rajveer 5780
    private PaymentGateway success; // required
5781
    private PaymentException pe; // required
123 ashish 5782
 
5783
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5784
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 5785
      SUCCESS((short)0, "success"),
5786
      PE((short)1, "pe");
5787
 
5788
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5789
 
5790
      static {
5791
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5792
          byName.put(field.getFieldName(), field);
5793
        }
5794
      }
5795
 
5796
      /**
5797
       * Find the _Fields constant that matches fieldId, or null if its not found.
5798
       */
5799
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5800
        switch(fieldId) {
5801
          case 0: // SUCCESS
5802
            return SUCCESS;
5803
          case 1: // PE
5804
            return PE;
5805
          default:
5806
            return null;
5807
        }
420 ashish 5808
      }
5809
 
5810
      /**
5811
       * Find the _Fields constant that matches fieldId, throwing an exception
5812
       * if it is not found.
5813
       */
5814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5815
        _Fields fields = findByThriftId(fieldId);
5816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5817
        return fields;
5818
      }
5819
 
5820
      /**
5821
       * Find the _Fields constant that matches name, or null if its not found.
5822
       */
5823
      public static _Fields findByName(String name) {
5824
        return byName.get(name);
5825
      }
5826
 
5827
      private final short _thriftId;
5828
      private final String _fieldName;
5829
 
5830
      _Fields(short thriftId, String fieldName) {
5831
        _thriftId = thriftId;
5832
        _fieldName = fieldName;
5833
      }
5834
 
5835
      public short getThriftFieldId() {
5836
        return _thriftId;
5837
      }
5838
 
5839
      public String getFieldName() {
5840
        return _fieldName;
5841
      }
5842
    }
5843
 
5844
    // isset id assignments
5845
 
3430 rajveer 5846
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 5847
    static {
3430 rajveer 5848
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5849
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5850
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class)));
5851
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5852
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5853
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5854
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 5855
    }
5856
 
695 rajveer 5857
    public getPaymentGateway_result() {
420 ashish 5858
    }
5859
 
695 rajveer 5860
    public getPaymentGateway_result(
5861
      PaymentGateway success,
420 ashish 5862
      PaymentException pe)
5863
    {
5864
      this();
5865
      this.success = success;
5866
      this.pe = pe;
5867
    }
5868
 
5869
    /**
5870
     * Performs a deep copy on <i>other</i>.
5871
     */
695 rajveer 5872
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 5873
      if (other.isSetSuccess()) {
695 rajveer 5874
        this.success = new PaymentGateway(other.success);
420 ashish 5875
      }
5876
      if (other.isSetPe()) {
5877
        this.pe = new PaymentException(other.pe);
5878
      }
5879
    }
5880
 
695 rajveer 5881
    public getPaymentGateway_result deepCopy() {
5882
      return new getPaymentGateway_result(this);
420 ashish 5883
    }
5884
 
3430 rajveer 5885
    @Override
5886
    public void clear() {
5887
      this.success = null;
5888
      this.pe = null;
420 ashish 5889
    }
5890
 
695 rajveer 5891
    public PaymentGateway getSuccess() {
420 ashish 5892
      return this.success;
5893
    }
5894
 
3430 rajveer 5895
    public void setSuccess(PaymentGateway success) {
420 ashish 5896
      this.success = success;
5897
    }
5898
 
5899
    public void unsetSuccess() {
5900
      this.success = null;
5901
    }
5902
 
3430 rajveer 5903
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 5904
    public boolean isSetSuccess() {
5905
      return this.success != null;
5906
    }
5907
 
5908
    public void setSuccessIsSet(boolean value) {
5909
      if (!value) {
5910
        this.success = null;
5911
      }
5912
    }
5913
 
5914
    public PaymentException getPe() {
5915
      return this.pe;
5916
    }
5917
 
3430 rajveer 5918
    public void setPe(PaymentException pe) {
420 ashish 5919
      this.pe = pe;
5920
    }
5921
 
5922
    public void unsetPe() {
5923
      this.pe = null;
5924
    }
5925
 
3430 rajveer 5926
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 5927
    public boolean isSetPe() {
5928
      return this.pe != null;
5929
    }
5930
 
5931
    public void setPeIsSet(boolean value) {
5932
      if (!value) {
5933
        this.pe = null;
5934
      }
5935
    }
5936
 
5937
    public void setFieldValue(_Fields field, Object value) {
5938
      switch (field) {
5939
      case SUCCESS:
5940
        if (value == null) {
5941
          unsetSuccess();
5942
        } else {
695 rajveer 5943
          setSuccess((PaymentGateway)value);
420 ashish 5944
        }
5945
        break;
5946
 
5947
      case PE:
5948
        if (value == null) {
5949
          unsetPe();
5950
        } else {
5951
          setPe((PaymentException)value);
5952
        }
5953
        break;
5954
 
5955
      }
5956
    }
5957
 
5958
    public Object getFieldValue(_Fields field) {
5959
      switch (field) {
5960
      case SUCCESS:
5961
        return getSuccess();
5962
 
5963
      case PE:
5964
        return getPe();
5965
 
5966
      }
5967
      throw new IllegalStateException();
5968
    }
5969
 
3430 rajveer 5970
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5971
    public boolean isSet(_Fields field) {
5972
      if (field == null) {
5973
        throw new IllegalArgumentException();
5974
      }
420 ashish 5975
 
5976
      switch (field) {
5977
      case SUCCESS:
5978
        return isSetSuccess();
5979
      case PE:
5980
        return isSetPe();
5981
      }
5982
      throw new IllegalStateException();
5983
    }
5984
 
5985
    @Override
5986
    public boolean equals(Object that) {
5987
      if (that == null)
5988
        return false;
695 rajveer 5989
      if (that instanceof getPaymentGateway_result)
5990
        return this.equals((getPaymentGateway_result)that);
420 ashish 5991
      return false;
5992
    }
5993
 
695 rajveer 5994
    public boolean equals(getPaymentGateway_result that) {
420 ashish 5995
      if (that == null)
5996
        return false;
5997
 
5998
      boolean this_present_success = true && this.isSetSuccess();
5999
      boolean that_present_success = true && that.isSetSuccess();
6000
      if (this_present_success || that_present_success) {
6001
        if (!(this_present_success && that_present_success))
6002
          return false;
6003
        if (!this.success.equals(that.success))
6004
          return false;
6005
      }
6006
 
6007
      boolean this_present_pe = true && this.isSetPe();
6008
      boolean that_present_pe = true && that.isSetPe();
6009
      if (this_present_pe || that_present_pe) {
6010
        if (!(this_present_pe && that_present_pe))
6011
          return false;
6012
        if (!this.pe.equals(that.pe))
6013
          return false;
6014
      }
6015
 
6016
      return true;
6017
    }
6018
 
6019
    @Override
6020
    public int hashCode() {
6021
      return 0;
6022
    }
6023
 
695 rajveer 6024
    public int compareTo(getPaymentGateway_result other) {
6025
      if (!getClass().equals(other.getClass())) {
6026
        return getClass().getName().compareTo(other.getClass().getName());
6027
      }
6028
 
6029
      int lastComparison = 0;
6030
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
6031
 
3430 rajveer 6032
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 6033
      if (lastComparison != 0) {
6034
        return lastComparison;
6035
      }
3430 rajveer 6036
      if (isSetSuccess()) {
6037
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6038
        if (lastComparison != 0) {
6039
          return lastComparison;
6040
        }
695 rajveer 6041
      }
3430 rajveer 6042
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 6043
      if (lastComparison != 0) {
6044
        return lastComparison;
6045
      }
3430 rajveer 6046
      if (isSetPe()) {
6047
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6048
        if (lastComparison != 0) {
6049
          return lastComparison;
6050
        }
695 rajveer 6051
      }
6052
      return 0;
6053
    }
6054
 
3430 rajveer 6055
    public _Fields fieldForId(int fieldId) {
6056
      return _Fields.findByThriftId(fieldId);
6057
    }
6058
 
6059
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6060
      org.apache.thrift.protocol.TField field;
420 ashish 6061
      iprot.readStructBegin();
6062
      while (true)
6063
      {
6064
        field = iprot.readFieldBegin();
3430 rajveer 6065
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6066
          break;
6067
        }
3430 rajveer 6068
        switch (field.id) {
6069
          case 0: // SUCCESS
6070
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6071
              this.success = new PaymentGateway();
6072
              this.success.read(iprot);
6073
            } else { 
6074
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6075
            }
6076
            break;
6077
          case 1: // PE
6078
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6079
              this.pe = new PaymentException();
6080
              this.pe.read(iprot);
6081
            } else { 
6082
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6083
            }
6084
            break;
6085
          default:
6086
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6087
        }
3430 rajveer 6088
        iprot.readFieldEnd();
420 ashish 6089
      }
6090
      iprot.readStructEnd();
6091
      validate();
6092
    }
6093
 
3430 rajveer 6094
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6095
      oprot.writeStructBegin(STRUCT_DESC);
6096
 
6097
      if (this.isSetSuccess()) {
6098
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 6099
        this.success.write(oprot);
420 ashish 6100
        oprot.writeFieldEnd();
6101
      } else if (this.isSetPe()) {
6102
        oprot.writeFieldBegin(PE_FIELD_DESC);
6103
        this.pe.write(oprot);
6104
        oprot.writeFieldEnd();
6105
      }
6106
      oprot.writeFieldStop();
6107
      oprot.writeStructEnd();
6108
    }
6109
 
6110
    @Override
6111
    public String toString() {
695 rajveer 6112
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 6113
      boolean first = true;
6114
 
6115
      sb.append("success:");
6116
      if (this.success == null) {
6117
        sb.append("null");
6118
      } else {
6119
        sb.append(this.success);
6120
      }
6121
      first = false;
6122
      if (!first) sb.append(", ");
6123
      sb.append("pe:");
6124
      if (this.pe == null) {
6125
        sb.append("null");
6126
      } else {
6127
        sb.append(this.pe);
6128
      }
6129
      first = false;
6130
      sb.append(")");
6131
      return sb.toString();
6132
    }
6133
 
3430 rajveer 6134
    public void validate() throws org.apache.thrift.TException {
420 ashish 6135
      // check for required fields
6136
    }
6137
 
3430 rajveer 6138
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6139
      try {
6140
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6141
      } catch (org.apache.thrift.TException te) {
6142
        throw new java.io.IOException(te);
6143
      }
6144
    }
6145
 
6146
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6147
      try {
6148
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6149
      } catch (org.apache.thrift.TException te) {
6150
        throw new java.io.IOException(te);
6151
      }
6152
    }
6153
 
420 ashish 6154
  }
6155
 
3430 rajveer 6156
  public static class getPayment_args implements org.apache.thrift.TBase<getPayment_args, getPayment_args._Fields>, java.io.Serializable, Cloneable   {
6157
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_args");
420 ashish 6158
 
3430 rajveer 6159
    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 6160
 
3430 rajveer 6161
    private long id; // required
420 ashish 6162
 
6163
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6164
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 6165
      ID((short)1, "id");
6166
 
6167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6168
 
6169
      static {
6170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6171
          byName.put(field.getFieldName(), field);
6172
        }
6173
      }
6174
 
6175
      /**
6176
       * Find the _Fields constant that matches fieldId, or null if its not found.
6177
       */
6178
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6179
        switch(fieldId) {
6180
          case 1: // ID
6181
            return ID;
6182
          default:
6183
            return null;
6184
        }
420 ashish 6185
      }
6186
 
6187
      /**
6188
       * Find the _Fields constant that matches fieldId, throwing an exception
6189
       * if it is not found.
6190
       */
6191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6192
        _Fields fields = findByThriftId(fieldId);
6193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6194
        return fields;
6195
      }
6196
 
6197
      /**
6198
       * Find the _Fields constant that matches name, or null if its not found.
6199
       */
6200
      public static _Fields findByName(String name) {
6201
        return byName.get(name);
6202
      }
6203
 
6204
      private final short _thriftId;
6205
      private final String _fieldName;
6206
 
6207
      _Fields(short thriftId, String fieldName) {
6208
        _thriftId = thriftId;
6209
        _fieldName = fieldName;
6210
      }
6211
 
6212
      public short getThriftFieldId() {
6213
        return _thriftId;
6214
      }
6215
 
6216
      public String getFieldName() {
6217
        return _fieldName;
6218
      }
6219
    }
6220
 
6221
    // isset id assignments
6222
    private static final int __ID_ISSET_ID = 0;
6223
    private BitSet __isset_bit_vector = new BitSet(1);
6224
 
3430 rajveer 6225
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6226
    static {
3430 rajveer 6227
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6228
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6229
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6230
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6231
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 6232
    }
6233
 
695 rajveer 6234
    public getPayment_args() {
420 ashish 6235
    }
6236
 
695 rajveer 6237
    public getPayment_args(
420 ashish 6238
      long id)
6239
    {
6240
      this();
6241
      this.id = id;
6242
      setIdIsSet(true);
6243
    }
6244
 
6245
    /**
6246
     * Performs a deep copy on <i>other</i>.
6247
     */
695 rajveer 6248
    public getPayment_args(getPayment_args other) {
420 ashish 6249
      __isset_bit_vector.clear();
6250
      __isset_bit_vector.or(other.__isset_bit_vector);
6251
      this.id = other.id;
6252
    }
6253
 
695 rajveer 6254
    public getPayment_args deepCopy() {
6255
      return new getPayment_args(this);
420 ashish 6256
    }
6257
 
3430 rajveer 6258
    @Override
6259
    public void clear() {
6260
      setIdIsSet(false);
6261
      this.id = 0;
420 ashish 6262
    }
6263
 
6264
    public long getId() {
6265
      return this.id;
6266
    }
6267
 
3430 rajveer 6268
    public void setId(long id) {
420 ashish 6269
      this.id = id;
6270
      setIdIsSet(true);
6271
    }
6272
 
6273
    public void unsetId() {
6274
      __isset_bit_vector.clear(__ID_ISSET_ID);
6275
    }
6276
 
3430 rajveer 6277
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 6278
    public boolean isSetId() {
6279
      return __isset_bit_vector.get(__ID_ISSET_ID);
6280
    }
6281
 
6282
    public void setIdIsSet(boolean value) {
6283
      __isset_bit_vector.set(__ID_ISSET_ID, value);
6284
    }
6285
 
6286
    public void setFieldValue(_Fields field, Object value) {
6287
      switch (field) {
6288
      case ID:
6289
        if (value == null) {
6290
          unsetId();
6291
        } else {
6292
          setId((Long)value);
6293
        }
6294
        break;
6295
 
6296
      }
6297
    }
6298
 
6299
    public Object getFieldValue(_Fields field) {
6300
      switch (field) {
6301
      case ID:
3430 rajveer 6302
        return Long.valueOf(getId());
420 ashish 6303
 
6304
      }
6305
      throw new IllegalStateException();
6306
    }
6307
 
3430 rajveer 6308
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6309
    public boolean isSet(_Fields field) {
6310
      if (field == null) {
6311
        throw new IllegalArgumentException();
6312
      }
420 ashish 6313
 
6314
      switch (field) {
6315
      case ID:
6316
        return isSetId();
6317
      }
6318
      throw new IllegalStateException();
6319
    }
6320
 
6321
    @Override
6322
    public boolean equals(Object that) {
6323
      if (that == null)
6324
        return false;
695 rajveer 6325
      if (that instanceof getPayment_args)
6326
        return this.equals((getPayment_args)that);
420 ashish 6327
      return false;
6328
    }
6329
 
695 rajveer 6330
    public boolean equals(getPayment_args that) {
420 ashish 6331
      if (that == null)
6332
        return false;
6333
 
6334
      boolean this_present_id = true;
6335
      boolean that_present_id = true;
6336
      if (this_present_id || that_present_id) {
6337
        if (!(this_present_id && that_present_id))
6338
          return false;
6339
        if (this.id != that.id)
6340
          return false;
6341
      }
6342
 
6343
      return true;
6344
    }
6345
 
6346
    @Override
6347
    public int hashCode() {
6348
      return 0;
6349
    }
6350
 
695 rajveer 6351
    public int compareTo(getPayment_args other) {
420 ashish 6352
      if (!getClass().equals(other.getClass())) {
6353
        return getClass().getName().compareTo(other.getClass().getName());
6354
      }
6355
 
6356
      int lastComparison = 0;
695 rajveer 6357
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 6358
 
3430 rajveer 6359
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 6360
      if (lastComparison != 0) {
6361
        return lastComparison;
6362
      }
3430 rajveer 6363
      if (isSetId()) {
6364
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
6365
        if (lastComparison != 0) {
6366
          return lastComparison;
6367
        }
420 ashish 6368
      }
6369
      return 0;
6370
    }
6371
 
3430 rajveer 6372
    public _Fields fieldForId(int fieldId) {
6373
      return _Fields.findByThriftId(fieldId);
6374
    }
6375
 
6376
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6377
      org.apache.thrift.protocol.TField field;
420 ashish 6378
      iprot.readStructBegin();
6379
      while (true)
6380
      {
6381
        field = iprot.readFieldBegin();
3430 rajveer 6382
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6383
          break;
6384
        }
3430 rajveer 6385
        switch (field.id) {
6386
          case 1: // ID
6387
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6388
              this.id = iprot.readI64();
6389
              setIdIsSet(true);
6390
            } else { 
6391
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6392
            }
6393
            break;
6394
          default:
6395
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6396
        }
3430 rajveer 6397
        iprot.readFieldEnd();
420 ashish 6398
      }
6399
      iprot.readStructEnd();
6400
      validate();
6401
    }
6402
 
3430 rajveer 6403
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6404
      validate();
6405
 
6406
      oprot.writeStructBegin(STRUCT_DESC);
6407
      oprot.writeFieldBegin(ID_FIELD_DESC);
6408
      oprot.writeI64(this.id);
6409
      oprot.writeFieldEnd();
6410
      oprot.writeFieldStop();
6411
      oprot.writeStructEnd();
6412
    }
6413
 
6414
    @Override
6415
    public String toString() {
695 rajveer 6416
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 6417
      boolean first = true;
6418
 
6419
      sb.append("id:");
6420
      sb.append(this.id);
6421
      first = false;
6422
      sb.append(")");
6423
      return sb.toString();
6424
    }
6425
 
3430 rajveer 6426
    public void validate() throws org.apache.thrift.TException {
420 ashish 6427
      // check for required fields
6428
    }
6429
 
3430 rajveer 6430
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6431
      try {
6432
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6433
      } catch (org.apache.thrift.TException te) {
6434
        throw new java.io.IOException(te);
6435
      }
6436
    }
6437
 
6438
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6439
      try {
6440
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6441
        __isset_bit_vector = new BitSet(1);
6442
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6443
      } catch (org.apache.thrift.TException te) {
6444
        throw new java.io.IOException(te);
6445
      }
6446
    }
6447
 
420 ashish 6448
  }
6449
 
3430 rajveer 6450
  public static class getPayment_result implements org.apache.thrift.TBase<getPayment_result, getPayment_result._Fields>, java.io.Serializable, Cloneable   {
6451
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_result");
420 ashish 6452
 
3430 rajveer 6453
    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);
6454
    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 6455
 
3430 rajveer 6456
    private Payment success; // required
6457
    private PaymentException pe; // required
420 ashish 6458
 
6459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6460
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 6461
      SUCCESS((short)0, "success"),
6462
      PE((short)1, "pe");
6463
 
6464
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6465
 
6466
      static {
6467
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6468
          byName.put(field.getFieldName(), field);
6469
        }
6470
      }
6471
 
6472
      /**
6473
       * Find the _Fields constant that matches fieldId, or null if its not found.
6474
       */
6475
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6476
        switch(fieldId) {
6477
          case 0: // SUCCESS
6478
            return SUCCESS;
6479
          case 1: // PE
6480
            return PE;
6481
          default:
6482
            return null;
6483
        }
420 ashish 6484
      }
6485
 
6486
      /**
6487
       * Find the _Fields constant that matches fieldId, throwing an exception
6488
       * if it is not found.
6489
       */
6490
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6491
        _Fields fields = findByThriftId(fieldId);
6492
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6493
        return fields;
6494
      }
6495
 
6496
      /**
6497
       * Find the _Fields constant that matches name, or null if its not found.
6498
       */
6499
      public static _Fields findByName(String name) {
6500
        return byName.get(name);
6501
      }
6502
 
6503
      private final short _thriftId;
6504
      private final String _fieldName;
6505
 
6506
      _Fields(short thriftId, String fieldName) {
6507
        _thriftId = thriftId;
6508
        _fieldName = fieldName;
6509
      }
6510
 
6511
      public short getThriftFieldId() {
6512
        return _thriftId;
6513
      }
6514
 
6515
      public String getFieldName() {
6516
        return _fieldName;
6517
      }
6518
    }
6519
 
6520
    // isset id assignments
6521
 
3430 rajveer 6522
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6523
    static {
3430 rajveer 6524
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6525
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6526
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
6527
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6528
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6529
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6530
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 6531
    }
6532
 
695 rajveer 6533
    public getPayment_result() {
420 ashish 6534
    }
6535
 
695 rajveer 6536
    public getPayment_result(
6537
      Payment success,
420 ashish 6538
      PaymentException pe)
6539
    {
6540
      this();
6541
      this.success = success;
6542
      this.pe = pe;
6543
    }
6544
 
6545
    /**
6546
     * Performs a deep copy on <i>other</i>.
6547
     */
695 rajveer 6548
    public getPayment_result(getPayment_result other) {
420 ashish 6549
      if (other.isSetSuccess()) {
695 rajveer 6550
        this.success = new Payment(other.success);
420 ashish 6551
      }
6552
      if (other.isSetPe()) {
6553
        this.pe = new PaymentException(other.pe);
6554
      }
6555
    }
6556
 
695 rajveer 6557
    public getPayment_result deepCopy() {
6558
      return new getPayment_result(this);
420 ashish 6559
    }
6560
 
3430 rajveer 6561
    @Override
6562
    public void clear() {
6563
      this.success = null;
6564
      this.pe = null;
420 ashish 6565
    }
6566
 
695 rajveer 6567
    public Payment getSuccess() {
420 ashish 6568
      return this.success;
6569
    }
6570
 
3430 rajveer 6571
    public void setSuccess(Payment success) {
420 ashish 6572
      this.success = success;
6573
    }
6574
 
6575
    public void unsetSuccess() {
6576
      this.success = null;
6577
    }
6578
 
3430 rajveer 6579
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 6580
    public boolean isSetSuccess() {
6581
      return this.success != null;
6582
    }
6583
 
6584
    public void setSuccessIsSet(boolean value) {
6585
      if (!value) {
6586
        this.success = null;
6587
      }
6588
    }
6589
 
6590
    public PaymentException getPe() {
6591
      return this.pe;
6592
    }
6593
 
3430 rajveer 6594
    public void setPe(PaymentException pe) {
420 ashish 6595
      this.pe = pe;
6596
    }
6597
 
6598
    public void unsetPe() {
6599
      this.pe = null;
6600
    }
6601
 
3430 rajveer 6602
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 6603
    public boolean isSetPe() {
6604
      return this.pe != null;
6605
    }
6606
 
6607
    public void setPeIsSet(boolean value) {
6608
      if (!value) {
6609
        this.pe = null;
6610
      }
6611
    }
6612
 
6613
    public void setFieldValue(_Fields field, Object value) {
6614
      switch (field) {
6615
      case SUCCESS:
6616
        if (value == null) {
6617
          unsetSuccess();
6618
        } else {
695 rajveer 6619
          setSuccess((Payment)value);
420 ashish 6620
        }
6621
        break;
6622
 
6623
      case PE:
6624
        if (value == null) {
6625
          unsetPe();
6626
        } else {
6627
          setPe((PaymentException)value);
6628
        }
6629
        break;
6630
 
6631
      }
6632
    }
6633
 
6634
    public Object getFieldValue(_Fields field) {
6635
      switch (field) {
6636
      case SUCCESS:
6637
        return getSuccess();
6638
 
6639
      case PE:
6640
        return getPe();
6641
 
6642
      }
6643
      throw new IllegalStateException();
6644
    }
6645
 
3430 rajveer 6646
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6647
    public boolean isSet(_Fields field) {
6648
      if (field == null) {
6649
        throw new IllegalArgumentException();
6650
      }
420 ashish 6651
 
6652
      switch (field) {
6653
      case SUCCESS:
6654
        return isSetSuccess();
6655
      case PE:
6656
        return isSetPe();
6657
      }
6658
      throw new IllegalStateException();
6659
    }
6660
 
6661
    @Override
6662
    public boolean equals(Object that) {
6663
      if (that == null)
6664
        return false;
695 rajveer 6665
      if (that instanceof getPayment_result)
6666
        return this.equals((getPayment_result)that);
420 ashish 6667
      return false;
6668
    }
6669
 
695 rajveer 6670
    public boolean equals(getPayment_result that) {
420 ashish 6671
      if (that == null)
6672
        return false;
6673
 
6674
      boolean this_present_success = true && this.isSetSuccess();
6675
      boolean that_present_success = true && that.isSetSuccess();
6676
      if (this_present_success || that_present_success) {
6677
        if (!(this_present_success && that_present_success))
6678
          return false;
6679
        if (!this.success.equals(that.success))
6680
          return false;
6681
      }
6682
 
6683
      boolean this_present_pe = true && this.isSetPe();
6684
      boolean that_present_pe = true && that.isSetPe();
6685
      if (this_present_pe || that_present_pe) {
6686
        if (!(this_present_pe && that_present_pe))
6687
          return false;
6688
        if (!this.pe.equals(that.pe))
6689
          return false;
6690
      }
6691
 
6692
      return true;
6693
    }
6694
 
6695
    @Override
6696
    public int hashCode() {
6697
      return 0;
6698
    }
6699
 
695 rajveer 6700
    public int compareTo(getPayment_result other) {
420 ashish 6701
      if (!getClass().equals(other.getClass())) {
6702
        return getClass().getName().compareTo(other.getClass().getName());
6703
      }
6704
 
6705
      int lastComparison = 0;
695 rajveer 6706
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 6707
 
3430 rajveer 6708
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 6709
      if (lastComparison != 0) {
6710
        return lastComparison;
6711
      }
3430 rajveer 6712
      if (isSetSuccess()) {
6713
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6714
        if (lastComparison != 0) {
6715
          return lastComparison;
6716
        }
420 ashish 6717
      }
3430 rajveer 6718
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 6719
      if (lastComparison != 0) {
6720
        return lastComparison;
6721
      }
3430 rajveer 6722
      if (isSetPe()) {
6723
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6724
        if (lastComparison != 0) {
6725
          return lastComparison;
6726
        }
420 ashish 6727
      }
6728
      return 0;
6729
    }
6730
 
3430 rajveer 6731
    public _Fields fieldForId(int fieldId) {
6732
      return _Fields.findByThriftId(fieldId);
6733
    }
6734
 
6735
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6736
      org.apache.thrift.protocol.TField field;
420 ashish 6737
      iprot.readStructBegin();
6738
      while (true)
6739
      {
6740
        field = iprot.readFieldBegin();
3430 rajveer 6741
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6742
          break;
6743
        }
3430 rajveer 6744
        switch (field.id) {
6745
          case 0: // SUCCESS
6746
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6747
              this.success = new Payment();
6748
              this.success.read(iprot);
6749
            } else { 
6750
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6751
            }
6752
            break;
6753
          case 1: // PE
6754
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6755
              this.pe = new PaymentException();
6756
              this.pe.read(iprot);
6757
            } else { 
6758
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6759
            }
6760
            break;
6761
          default:
6762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6763
        }
3430 rajveer 6764
        iprot.readFieldEnd();
420 ashish 6765
      }
6766
      iprot.readStructEnd();
6767
      validate();
6768
    }
6769
 
3430 rajveer 6770
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6771
      oprot.writeStructBegin(STRUCT_DESC);
6772
 
695 rajveer 6773
      if (this.isSetSuccess()) {
6774
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6775
        this.success.write(oprot);
6776
        oprot.writeFieldEnd();
6777
      } else if (this.isSetPe()) {
420 ashish 6778
        oprot.writeFieldBegin(PE_FIELD_DESC);
6779
        this.pe.write(oprot);
6780
        oprot.writeFieldEnd();
6781
      }
6782
      oprot.writeFieldStop();
6783
      oprot.writeStructEnd();
6784
    }
6785
 
6786
    @Override
6787
    public String toString() {
695 rajveer 6788
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 6789
      boolean first = true;
6790
 
695 rajveer 6791
      sb.append("success:");
6792
      if (this.success == null) {
6793
        sb.append("null");
6794
      } else {
6795
        sb.append(this.success);
6796
      }
6797
      first = false;
6798
      if (!first) sb.append(", ");
420 ashish 6799
      sb.append("pe:");
6800
      if (this.pe == null) {
6801
        sb.append("null");
6802
      } else {
6803
        sb.append(this.pe);
6804
      }
6805
      first = false;
6806
      sb.append(")");
6807
      return sb.toString();
6808
    }
6809
 
3430 rajveer 6810
    public void validate() throws org.apache.thrift.TException {
420 ashish 6811
      // check for required fields
6812
    }
6813
 
3430 rajveer 6814
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6815
      try {
6816
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6817
      } catch (org.apache.thrift.TException te) {
6818
        throw new java.io.IOException(te);
6819
      }
6820
    }
6821
 
6822
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6823
      try {
6824
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6825
      } catch (org.apache.thrift.TException te) {
6826
        throw new java.io.IOException(te);
6827
      }
6828
    }
6829
 
420 ashish 6830
  }
6831
 
3430 rajveer 6832
  public static class getPaymentForTxnId_args implements org.apache.thrift.TBase<getPaymentForTxnId_args, getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
6833
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_args");
420 ashish 6834
 
3430 rajveer 6835
    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 6836
 
3430 rajveer 6837
    private long txnId; // required
420 ashish 6838
 
6839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6840
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 6841
      TXN_ID((short)1, "txnId");
420 ashish 6842
 
6843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6844
 
6845
      static {
6846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6847
          byName.put(field.getFieldName(), field);
6848
        }
6849
      }
6850
 
6851
      /**
6852
       * Find the _Fields constant that matches fieldId, or null if its not found.
6853
       */
6854
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6855
        switch(fieldId) {
6856
          case 1: // TXN_ID
6857
            return TXN_ID;
6858
          default:
6859
            return null;
6860
        }
420 ashish 6861
      }
6862
 
6863
      /**
6864
       * Find the _Fields constant that matches fieldId, throwing an exception
6865
       * if it is not found.
6866
       */
6867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6868
        _Fields fields = findByThriftId(fieldId);
6869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6870
        return fields;
6871
      }
6872
 
6873
      /**
6874
       * Find the _Fields constant that matches name, or null if its not found.
6875
       */
6876
      public static _Fields findByName(String name) {
6877
        return byName.get(name);
6878
      }
6879
 
6880
      private final short _thriftId;
6881
      private final String _fieldName;
6882
 
6883
      _Fields(short thriftId, String fieldName) {
6884
        _thriftId = thriftId;
6885
        _fieldName = fieldName;
6886
      }
6887
 
6888
      public short getThriftFieldId() {
6889
        return _thriftId;
6890
      }
6891
 
6892
      public String getFieldName() {
6893
        return _fieldName;
6894
      }
6895
    }
6896
 
6897
    // isset id assignments
695 rajveer 6898
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 6899
    private BitSet __isset_bit_vector = new BitSet(1);
6900
 
3430 rajveer 6901
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6902
    static {
3430 rajveer 6903
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6904
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6905
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6906
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6907
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 6908
    }
6909
 
695 rajveer 6910
    public getPaymentForTxnId_args() {
420 ashish 6911
    }
6912
 
695 rajveer 6913
    public getPaymentForTxnId_args(
6914
      long txnId)
420 ashish 6915
    {
6916
      this();
695 rajveer 6917
      this.txnId = txnId;
6918
      setTxnIdIsSet(true);
420 ashish 6919
    }
6920
 
6921
    /**
6922
     * Performs a deep copy on <i>other</i>.
6923
     */
695 rajveer 6924
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 6925
      __isset_bit_vector.clear();
6926
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 6927
      this.txnId = other.txnId;
420 ashish 6928
    }
6929
 
695 rajveer 6930
    public getPaymentForTxnId_args deepCopy() {
6931
      return new getPaymentForTxnId_args(this);
420 ashish 6932
    }
6933
 
3430 rajveer 6934
    @Override
6935
    public void clear() {
6936
      setTxnIdIsSet(false);
6937
      this.txnId = 0;
420 ashish 6938
    }
6939
 
695 rajveer 6940
    public long getTxnId() {
6941
      return this.txnId;
420 ashish 6942
    }
6943
 
3430 rajveer 6944
    public void setTxnId(long txnId) {
695 rajveer 6945
      this.txnId = txnId;
6946
      setTxnIdIsSet(true);
420 ashish 6947
    }
6948
 
695 rajveer 6949
    public void unsetTxnId() {
6950
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 6951
    }
6952
 
3430 rajveer 6953
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 6954
    public boolean isSetTxnId() {
6955
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 6956
    }
6957
 
695 rajveer 6958
    public void setTxnIdIsSet(boolean value) {
6959
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 6960
    }
6961
 
6962
    public void setFieldValue(_Fields field, Object value) {
6963
      switch (field) {
695 rajveer 6964
      case TXN_ID:
420 ashish 6965
        if (value == null) {
695 rajveer 6966
          unsetTxnId();
420 ashish 6967
        } else {
695 rajveer 6968
          setTxnId((Long)value);
420 ashish 6969
        }
6970
        break;
6971
 
6972
      }
6973
    }
6974
 
6975
    public Object getFieldValue(_Fields field) {
6976
      switch (field) {
695 rajveer 6977
      case TXN_ID:
3430 rajveer 6978
        return Long.valueOf(getTxnId());
420 ashish 6979
 
6980
      }
6981
      throw new IllegalStateException();
6982
    }
6983
 
3430 rajveer 6984
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6985
    public boolean isSet(_Fields field) {
6986
      if (field == null) {
6987
        throw new IllegalArgumentException();
6988
      }
420 ashish 6989
 
6990
      switch (field) {
695 rajveer 6991
      case TXN_ID:
6992
        return isSetTxnId();
420 ashish 6993
      }
6994
      throw new IllegalStateException();
6995
    }
6996
 
6997
    @Override
6998
    public boolean equals(Object that) {
6999
      if (that == null)
7000
        return false;
695 rajveer 7001
      if (that instanceof getPaymentForTxnId_args)
7002
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 7003
      return false;
7004
    }
7005
 
695 rajveer 7006
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 7007
      if (that == null)
7008
        return false;
7009
 
695 rajveer 7010
      boolean this_present_txnId = true;
7011
      boolean that_present_txnId = true;
7012
      if (this_present_txnId || that_present_txnId) {
7013
        if (!(this_present_txnId && that_present_txnId))
420 ashish 7014
          return false;
695 rajveer 7015
        if (this.txnId != that.txnId)
420 ashish 7016
          return false;
7017
      }
7018
 
7019
      return true;
7020
    }
7021
 
7022
    @Override
7023
    public int hashCode() {
7024
      return 0;
7025
    }
7026
 
695 rajveer 7027
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 7028
      if (!getClass().equals(other.getClass())) {
7029
        return getClass().getName().compareTo(other.getClass().getName());
7030
      }
7031
 
7032
      int lastComparison = 0;
695 rajveer 7033
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 7034
 
3430 rajveer 7035
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
420 ashish 7036
      if (lastComparison != 0) {
7037
        return lastComparison;
7038
      }
3430 rajveer 7039
      if (isSetTxnId()) {
7040
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
7041
        if (lastComparison != 0) {
7042
          return lastComparison;
7043
        }
420 ashish 7044
      }
7045
      return 0;
7046
    }
7047
 
3430 rajveer 7048
    public _Fields fieldForId(int fieldId) {
7049
      return _Fields.findByThriftId(fieldId);
7050
    }
7051
 
7052
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7053
      org.apache.thrift.protocol.TField field;
420 ashish 7054
      iprot.readStructBegin();
7055
      while (true)
7056
      {
7057
        field = iprot.readFieldBegin();
3430 rajveer 7058
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7059
          break;
7060
        }
3430 rajveer 7061
        switch (field.id) {
7062
          case 1: // TXN_ID
7063
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7064
              this.txnId = iprot.readI64();
7065
              setTxnIdIsSet(true);
7066
            } else { 
7067
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7068
            }
7069
            break;
7070
          default:
7071
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7072
        }
3430 rajveer 7073
        iprot.readFieldEnd();
420 ashish 7074
      }
7075
      iprot.readStructEnd();
7076
      validate();
7077
    }
7078
 
3430 rajveer 7079
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7080
      validate();
7081
 
7082
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 7083
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
7084
      oprot.writeI64(this.txnId);
420 ashish 7085
      oprot.writeFieldEnd();
7086
      oprot.writeFieldStop();
7087
      oprot.writeStructEnd();
7088
    }
7089
 
7090
    @Override
7091
    public String toString() {
695 rajveer 7092
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 7093
      boolean first = true;
7094
 
695 rajveer 7095
      sb.append("txnId:");
7096
      sb.append(this.txnId);
420 ashish 7097
      first = false;
7098
      sb.append(")");
7099
      return sb.toString();
7100
    }
7101
 
3430 rajveer 7102
    public void validate() throws org.apache.thrift.TException {
420 ashish 7103
      // check for required fields
7104
    }
7105
 
3430 rajveer 7106
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7107
      try {
7108
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7109
      } catch (org.apache.thrift.TException te) {
7110
        throw new java.io.IOException(te);
7111
      }
7112
    }
7113
 
7114
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7115
      try {
7116
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7117
        __isset_bit_vector = new BitSet(1);
7118
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7119
      } catch (org.apache.thrift.TException te) {
7120
        throw new java.io.IOException(te);
7121
      }
7122
    }
7123
 
420 ashish 7124
  }
7125
 
3430 rajveer 7126
  public static class getPaymentForTxnId_result implements org.apache.thrift.TBase<getPaymentForTxnId_result, getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
7127
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_result");
420 ashish 7128
 
3430 rajveer 7129
    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);
7130
    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 7131
 
3430 rajveer 7132
    private List<Payment> success; // required
7133
    private PaymentException pe; // required
420 ashish 7134
 
7135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7136
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7137
      SUCCESS((short)0, "success"),
7138
      PE((short)1, "pe");
7139
 
7140
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7141
 
7142
      static {
7143
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7144
          byName.put(field.getFieldName(), field);
7145
        }
7146
      }
7147
 
7148
      /**
7149
       * Find the _Fields constant that matches fieldId, or null if its not found.
7150
       */
7151
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7152
        switch(fieldId) {
7153
          case 0: // SUCCESS
7154
            return SUCCESS;
7155
          case 1: // PE
7156
            return PE;
7157
          default:
7158
            return null;
7159
        }
420 ashish 7160
      }
7161
 
7162
      /**
7163
       * Find the _Fields constant that matches fieldId, throwing an exception
7164
       * if it is not found.
7165
       */
7166
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7167
        _Fields fields = findByThriftId(fieldId);
7168
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7169
        return fields;
7170
      }
7171
 
7172
      /**
7173
       * Find the _Fields constant that matches name, or null if its not found.
7174
       */
7175
      public static _Fields findByName(String name) {
7176
        return byName.get(name);
7177
      }
7178
 
7179
      private final short _thriftId;
7180
      private final String _fieldName;
7181
 
7182
      _Fields(short thriftId, String fieldName) {
7183
        _thriftId = thriftId;
7184
        _fieldName = fieldName;
7185
      }
7186
 
7187
      public short getThriftFieldId() {
7188
        return _thriftId;
7189
      }
7190
 
7191
      public String getFieldName() {
7192
        return _fieldName;
7193
      }
7194
    }
7195
 
7196
    // isset id assignments
7197
 
3430 rajveer 7198
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7199
    static {
3430 rajveer 7200
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7201
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7202
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7203
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
7204
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7205
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7206
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7207
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 7208
    }
7209
 
695 rajveer 7210
    public getPaymentForTxnId_result() {
420 ashish 7211
    }
7212
 
695 rajveer 7213
    public getPaymentForTxnId_result(
7214
      List<Payment> success,
420 ashish 7215
      PaymentException pe)
7216
    {
7217
      this();
7218
      this.success = success;
7219
      this.pe = pe;
7220
    }
7221
 
7222
    /**
7223
     * Performs a deep copy on <i>other</i>.
7224
     */
695 rajveer 7225
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 7226
      if (other.isSetSuccess()) {
695 rajveer 7227
        List<Payment> __this__success = new ArrayList<Payment>();
7228
        for (Payment other_element : other.success) {
7229
          __this__success.add(new Payment(other_element));
7230
        }
7231
        this.success = __this__success;
420 ashish 7232
      }
7233
      if (other.isSetPe()) {
7234
        this.pe = new PaymentException(other.pe);
7235
      }
7236
    }
7237
 
695 rajveer 7238
    public getPaymentForTxnId_result deepCopy() {
7239
      return new getPaymentForTxnId_result(this);
420 ashish 7240
    }
7241
 
3430 rajveer 7242
    @Override
7243
    public void clear() {
7244
      this.success = null;
7245
      this.pe = null;
420 ashish 7246
    }
7247
 
695 rajveer 7248
    public int getSuccessSize() {
7249
      return (this.success == null) ? 0 : this.success.size();
7250
    }
7251
 
7252
    public java.util.Iterator<Payment> getSuccessIterator() {
7253
      return (this.success == null) ? null : this.success.iterator();
7254
    }
7255
 
7256
    public void addToSuccess(Payment elem) {
7257
      if (this.success == null) {
7258
        this.success = new ArrayList<Payment>();
7259
      }
7260
      this.success.add(elem);
7261
    }
7262
 
7263
    public List<Payment> getSuccess() {
420 ashish 7264
      return this.success;
7265
    }
7266
 
3430 rajveer 7267
    public void setSuccess(List<Payment> success) {
420 ashish 7268
      this.success = success;
7269
    }
7270
 
7271
    public void unsetSuccess() {
7272
      this.success = null;
7273
    }
7274
 
3430 rajveer 7275
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 7276
    public boolean isSetSuccess() {
7277
      return this.success != null;
7278
    }
7279
 
7280
    public void setSuccessIsSet(boolean value) {
7281
      if (!value) {
7282
        this.success = null;
7283
      }
7284
    }
7285
 
7286
    public PaymentException getPe() {
7287
      return this.pe;
7288
    }
7289
 
3430 rajveer 7290
    public void setPe(PaymentException pe) {
420 ashish 7291
      this.pe = pe;
7292
    }
7293
 
7294
    public void unsetPe() {
7295
      this.pe = null;
7296
    }
7297
 
3430 rajveer 7298
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 7299
    public boolean isSetPe() {
7300
      return this.pe != null;
7301
    }
7302
 
7303
    public void setPeIsSet(boolean value) {
7304
      if (!value) {
7305
        this.pe = null;
7306
      }
7307
    }
7308
 
7309
    public void setFieldValue(_Fields field, Object value) {
7310
      switch (field) {
7311
      case SUCCESS:
7312
        if (value == null) {
7313
          unsetSuccess();
7314
        } else {
695 rajveer 7315
          setSuccess((List<Payment>)value);
420 ashish 7316
        }
7317
        break;
7318
 
7319
      case PE:
7320
        if (value == null) {
7321
          unsetPe();
7322
        } else {
7323
          setPe((PaymentException)value);
7324
        }
7325
        break;
7326
 
7327
      }
7328
    }
7329
 
7330
    public Object getFieldValue(_Fields field) {
7331
      switch (field) {
7332
      case SUCCESS:
7333
        return getSuccess();
7334
 
7335
      case PE:
7336
        return getPe();
7337
 
7338
      }
7339
      throw new IllegalStateException();
7340
    }
7341
 
3430 rajveer 7342
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7343
    public boolean isSet(_Fields field) {
7344
      if (field == null) {
7345
        throw new IllegalArgumentException();
7346
      }
420 ashish 7347
 
7348
      switch (field) {
7349
      case SUCCESS:
7350
        return isSetSuccess();
7351
      case PE:
7352
        return isSetPe();
7353
      }
7354
      throw new IllegalStateException();
7355
    }
7356
 
7357
    @Override
7358
    public boolean equals(Object that) {
7359
      if (that == null)
7360
        return false;
695 rajveer 7361
      if (that instanceof getPaymentForTxnId_result)
7362
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 7363
      return false;
7364
    }
7365
 
695 rajveer 7366
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 7367
      if (that == null)
7368
        return false;
7369
 
7370
      boolean this_present_success = true && this.isSetSuccess();
7371
      boolean that_present_success = true && that.isSetSuccess();
7372
      if (this_present_success || that_present_success) {
7373
        if (!(this_present_success && that_present_success))
7374
          return false;
7375
        if (!this.success.equals(that.success))
7376
          return false;
7377
      }
7378
 
7379
      boolean this_present_pe = true && this.isSetPe();
7380
      boolean that_present_pe = true && that.isSetPe();
7381
      if (this_present_pe || that_present_pe) {
7382
        if (!(this_present_pe && that_present_pe))
7383
          return false;
7384
        if (!this.pe.equals(that.pe))
7385
          return false;
7386
      }
7387
 
7388
      return true;
7389
    }
7390
 
7391
    @Override
7392
    public int hashCode() {
7393
      return 0;
7394
    }
7395
 
695 rajveer 7396
    public int compareTo(getPaymentForTxnId_result other) {
7397
      if (!getClass().equals(other.getClass())) {
7398
        return getClass().getName().compareTo(other.getClass().getName());
7399
      }
7400
 
7401
      int lastComparison = 0;
7402
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
7403
 
3430 rajveer 7404
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 7405
      if (lastComparison != 0) {
7406
        return lastComparison;
7407
      }
3430 rajveer 7408
      if (isSetSuccess()) {
7409
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7410
        if (lastComparison != 0) {
7411
          return lastComparison;
7412
        }
695 rajveer 7413
      }
3430 rajveer 7414
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 7415
      if (lastComparison != 0) {
7416
        return lastComparison;
7417
      }
3430 rajveer 7418
      if (isSetPe()) {
7419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7420
        if (lastComparison != 0) {
7421
          return lastComparison;
7422
        }
695 rajveer 7423
      }
7424
      return 0;
7425
    }
7426
 
3430 rajveer 7427
    public _Fields fieldForId(int fieldId) {
7428
      return _Fields.findByThriftId(fieldId);
7429
    }
7430
 
7431
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7432
      org.apache.thrift.protocol.TField field;
420 ashish 7433
      iprot.readStructBegin();
7434
      while (true)
7435
      {
7436
        field = iprot.readFieldBegin();
3430 rajveer 7437
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7438
          break;
7439
        }
3430 rajveer 7440
        switch (field.id) {
7441
          case 0: // SUCCESS
7442
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7443
              {
4141 chandransh 7444
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
7445
                this.success = new ArrayList<Payment>(_list24.size);
7446
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
695 rajveer 7447
                {
4141 chandransh 7448
                  Payment _elem26; // required
7449
                  _elem26 = new Payment();
7450
                  _elem26.read(iprot);
7451
                  this.success.add(_elem26);
695 rajveer 7452
                }
3430 rajveer 7453
                iprot.readListEnd();
420 ashish 7454
              }
3430 rajveer 7455
            } else { 
7456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7457
            }
7458
            break;
7459
          case 1: // PE
7460
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7461
              this.pe = new PaymentException();
7462
              this.pe.read(iprot);
7463
            } else { 
7464
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7465
            }
7466
            break;
7467
          default:
7468
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7469
        }
3430 rajveer 7470
        iprot.readFieldEnd();
420 ashish 7471
      }
7472
      iprot.readStructEnd();
7473
      validate();
7474
    }
7475
 
3430 rajveer 7476
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7477
      oprot.writeStructBegin(STRUCT_DESC);
7478
 
7479
      if (this.isSetSuccess()) {
7480
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 7481
        {
3430 rajveer 7482
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4141 chandransh 7483
          for (Payment _iter27 : this.success)
695 rajveer 7484
          {
4141 chandransh 7485
            _iter27.write(oprot);
695 rajveer 7486
          }
7487
          oprot.writeListEnd();
7488
        }
420 ashish 7489
        oprot.writeFieldEnd();
7490
      } else if (this.isSetPe()) {
7491
        oprot.writeFieldBegin(PE_FIELD_DESC);
7492
        this.pe.write(oprot);
7493
        oprot.writeFieldEnd();
7494
      }
7495
      oprot.writeFieldStop();
7496
      oprot.writeStructEnd();
7497
    }
7498
 
7499
    @Override
7500
    public String toString() {
695 rajveer 7501
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 7502
      boolean first = true;
7503
 
7504
      sb.append("success:");
7505
      if (this.success == null) {
7506
        sb.append("null");
7507
      } else {
7508
        sb.append(this.success);
7509
      }
7510
      first = false;
7511
      if (!first) sb.append(", ");
7512
      sb.append("pe:");
7513
      if (this.pe == null) {
7514
        sb.append("null");
7515
      } else {
7516
        sb.append(this.pe);
7517
      }
7518
      first = false;
7519
      sb.append(")");
7520
      return sb.toString();
7521
    }
7522
 
3430 rajveer 7523
    public void validate() throws org.apache.thrift.TException {
420 ashish 7524
      // check for required fields
7525
    }
7526
 
3430 rajveer 7527
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7528
      try {
7529
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7530
      } catch (org.apache.thrift.TException te) {
7531
        throw new java.io.IOException(te);
7532
      }
7533
    }
7534
 
7535
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7536
      try {
7537
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7538
      } catch (org.apache.thrift.TException te) {
7539
        throw new java.io.IOException(te);
7540
      }
7541
    }
7542
 
420 ashish 7543
  }
7544
 
3430 rajveer 7545
  public static class updatePaymentDetails_args implements org.apache.thrift.TBase<updatePaymentDetails_args, updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable   {
7546
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_args");
420 ashish 7547
 
3430 rajveer 7548
    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);
7549
    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);
7550
    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);
7551
    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);
7552
    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);
7553
    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);
7554
    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);
7555
    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);
7556
    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);
7557
    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);
7558
    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);
7559
    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 7560
 
3430 rajveer 7561
    private long id; // required
7562
    private String gatewayPaymentId; // required
7563
    private String sessionId; // required
7564
    private String gatewayTxnStatus; // required
7565
    private String description; // required
7566
    private String gatewayTxnId; // required
7567
    private String authCode; // required
7568
    private String referenceCode; // required
7569
    private String errorCode; // required
7570
    private PaymentStatus status; // required
7571
    private String gatewayTxnDate; // required
7572
    private List<Attribute> attributes; // required
420 ashish 7573
 
7574
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7575
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7576
      ID((short)1, "id"),
695 rajveer 7577
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
7578
      SESSION_ID((short)3, "sessionId"),
7579
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
7580
      DESCRIPTION((short)5, "description"),
7581
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
7582
      AUTH_CODE((short)7, "authCode"),
7583
      REFERENCE_CODE((short)8, "referenceCode"),
7584
      ERROR_CODE((short)9, "errorCode"),
7585
      /**
7586
       * 
7587
       * @see PaymentStatus
7588
       */
7589
      STATUS((short)10, "status"),
1119 rajveer 7590
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
7591
      ATTRIBUTES((short)12, "attributes");
420 ashish 7592
 
7593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7594
 
7595
      static {
7596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7597
          byName.put(field.getFieldName(), field);
7598
        }
7599
      }
7600
 
7601
      /**
7602
       * Find the _Fields constant that matches fieldId, or null if its not found.
7603
       */
7604
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7605
        switch(fieldId) {
7606
          case 1: // ID
7607
            return ID;
7608
          case 2: // GATEWAY_PAYMENT_ID
7609
            return GATEWAY_PAYMENT_ID;
7610
          case 3: // SESSION_ID
7611
            return SESSION_ID;
7612
          case 4: // GATEWAY_TXN_STATUS
7613
            return GATEWAY_TXN_STATUS;
7614
          case 5: // DESCRIPTION
7615
            return DESCRIPTION;
7616
          case 6: // GATEWAY_TXN_ID
7617
            return GATEWAY_TXN_ID;
7618
          case 7: // AUTH_CODE
7619
            return AUTH_CODE;
7620
          case 8: // REFERENCE_CODE
7621
            return REFERENCE_CODE;
7622
          case 9: // ERROR_CODE
7623
            return ERROR_CODE;
7624
          case 10: // STATUS
7625
            return STATUS;
7626
          case 11: // GATEWAY_TXN_DATE
7627
            return GATEWAY_TXN_DATE;
7628
          case 12: // ATTRIBUTES
7629
            return ATTRIBUTES;
7630
          default:
7631
            return null;
7632
        }
420 ashish 7633
      }
7634
 
7635
      /**
7636
       * Find the _Fields constant that matches fieldId, throwing an exception
7637
       * if it is not found.
7638
       */
7639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7640
        _Fields fields = findByThriftId(fieldId);
7641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7642
        return fields;
7643
      }
7644
 
7645
      /**
7646
       * Find the _Fields constant that matches name, or null if its not found.
7647
       */
7648
      public static _Fields findByName(String name) {
7649
        return byName.get(name);
7650
      }
7651
 
7652
      private final short _thriftId;
7653
      private final String _fieldName;
7654
 
7655
      _Fields(short thriftId, String fieldName) {
7656
        _thriftId = thriftId;
7657
        _fieldName = fieldName;
7658
      }
7659
 
7660
      public short getThriftFieldId() {
7661
        return _thriftId;
7662
      }
7663
 
7664
      public String getFieldName() {
7665
        return _fieldName;
7666
      }
7667
    }
7668
 
7669
    // isset id assignments
7670
    private static final int __ID_ISSET_ID = 0;
7671
    private BitSet __isset_bit_vector = new BitSet(1);
7672
 
3430 rajveer 7673
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7674
    static {
3430 rajveer 7675
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7676
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7677
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7678
      tmpMap.put(_Fields.GATEWAY_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7679
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7680
      tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7681
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7682
      tmpMap.put(_Fields.GATEWAY_TXN_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7683
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7684
      tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7685
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7686
      tmpMap.put(_Fields.GATEWAY_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7687
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7688
      tmpMap.put(_Fields.AUTH_CODE, new org.apache.thrift.meta_data.FieldMetaData("authCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7689
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7690
      tmpMap.put(_Fields.REFERENCE_CODE, new org.apache.thrift.meta_data.FieldMetaData("referenceCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7691
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7692
      tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7693
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7694
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7695
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
7696
      tmpMap.put(_Fields.GATEWAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7697
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7698
      tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7699
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7700
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
7701
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7702
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 7703
    }
7704
 
695 rajveer 7705
    public updatePaymentDetails_args() {
420 ashish 7706
    }
7707
 
695 rajveer 7708
    public updatePaymentDetails_args(
420 ashish 7709
      long id,
695 rajveer 7710
      String gatewayPaymentId,
7711
      String sessionId,
7712
      String gatewayTxnStatus,
7713
      String description,
7714
      String gatewayTxnId,
7715
      String authCode,
7716
      String referenceCode,
7717
      String errorCode,
7718
      PaymentStatus status,
1119 rajveer 7719
      String gatewayTxnDate,
695 rajveer 7720
      List<Attribute> attributes)
420 ashish 7721
    {
7722
      this();
7723
      this.id = id;
7724
      setIdIsSet(true);
695 rajveer 7725
      this.gatewayPaymentId = gatewayPaymentId;
7726
      this.sessionId = sessionId;
7727
      this.gatewayTxnStatus = gatewayTxnStatus;
7728
      this.description = description;
7729
      this.gatewayTxnId = gatewayTxnId;
7730
      this.authCode = authCode;
7731
      this.referenceCode = referenceCode;
7732
      this.errorCode = errorCode;
7733
      this.status = status;
1119 rajveer 7734
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 7735
      this.attributes = attributes;
420 ashish 7736
    }
7737
 
7738
    /**
7739
     * Performs a deep copy on <i>other</i>.
7740
     */
695 rajveer 7741
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 7742
      __isset_bit_vector.clear();
7743
      __isset_bit_vector.or(other.__isset_bit_vector);
7744
      this.id = other.id;
695 rajveer 7745
      if (other.isSetGatewayPaymentId()) {
7746
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 7747
      }
695 rajveer 7748
      if (other.isSetSessionId()) {
7749
        this.sessionId = other.sessionId;
420 ashish 7750
      }
695 rajveer 7751
      if (other.isSetGatewayTxnStatus()) {
7752
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 7753
      }
695 rajveer 7754
      if (other.isSetDescription()) {
7755
        this.description = other.description;
420 ashish 7756
      }
695 rajveer 7757
      if (other.isSetGatewayTxnId()) {
7758
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 7759
      }
695 rajveer 7760
      if (other.isSetAuthCode()) {
7761
        this.authCode = other.authCode;
420 ashish 7762
      }
695 rajveer 7763
      if (other.isSetReferenceCode()) {
7764
        this.referenceCode = other.referenceCode;
420 ashish 7765
      }
695 rajveer 7766
      if (other.isSetErrorCode()) {
7767
        this.errorCode = other.errorCode;
7768
      }
7769
      if (other.isSetStatus()) {
7770
        this.status = other.status;
7771
      }
1119 rajveer 7772
      if (other.isSetGatewayTxnDate()) {
7773
        this.gatewayTxnDate = other.gatewayTxnDate;
7774
      }
695 rajveer 7775
      if (other.isSetAttributes()) {
7776
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
7777
        for (Attribute other_element : other.attributes) {
7778
          __this__attributes.add(new Attribute(other_element));
7779
        }
7780
        this.attributes = __this__attributes;
7781
      }
420 ashish 7782
    }
7783
 
695 rajveer 7784
    public updatePaymentDetails_args deepCopy() {
7785
      return new updatePaymentDetails_args(this);
420 ashish 7786
    }
7787
 
3430 rajveer 7788
    @Override
7789
    public void clear() {
7790
      setIdIsSet(false);
7791
      this.id = 0;
7792
      this.gatewayPaymentId = null;
7793
      this.sessionId = null;
7794
      this.gatewayTxnStatus = null;
7795
      this.description = null;
7796
      this.gatewayTxnId = null;
7797
      this.authCode = null;
7798
      this.referenceCode = null;
7799
      this.errorCode = null;
7800
      this.status = null;
7801
      this.gatewayTxnDate = null;
7802
      this.attributes = null;
420 ashish 7803
    }
7804
 
7805
    public long getId() {
7806
      return this.id;
7807
    }
7808
 
3430 rajveer 7809
    public void setId(long id) {
420 ashish 7810
      this.id = id;
7811
      setIdIsSet(true);
7812
    }
7813
 
7814
    public void unsetId() {
7815
      __isset_bit_vector.clear(__ID_ISSET_ID);
7816
    }
7817
 
3430 rajveer 7818
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 7819
    public boolean isSetId() {
7820
      return __isset_bit_vector.get(__ID_ISSET_ID);
7821
    }
7822
 
7823
    public void setIdIsSet(boolean value) {
7824
      __isset_bit_vector.set(__ID_ISSET_ID, value);
7825
    }
7826
 
695 rajveer 7827
    public String getGatewayPaymentId() {
7828
      return this.gatewayPaymentId;
420 ashish 7829
    }
7830
 
3430 rajveer 7831
    public void setGatewayPaymentId(String gatewayPaymentId) {
695 rajveer 7832
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 7833
    }
7834
 
695 rajveer 7835
    public void unsetGatewayPaymentId() {
7836
      this.gatewayPaymentId = null;
420 ashish 7837
    }
7838
 
3430 rajveer 7839
    /** Returns true if field gatewayPaymentId is set (has been assigned a value) and false otherwise */
695 rajveer 7840
    public boolean isSetGatewayPaymentId() {
7841
      return this.gatewayPaymentId != null;
420 ashish 7842
    }
7843
 
695 rajveer 7844
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 7845
      if (!value) {
695 rajveer 7846
        this.gatewayPaymentId = null;
420 ashish 7847
      }
7848
    }
7849
 
695 rajveer 7850
    public String getSessionId() {
7851
      return this.sessionId;
420 ashish 7852
    }
7853
 
3430 rajveer 7854
    public void setSessionId(String sessionId) {
695 rajveer 7855
      this.sessionId = sessionId;
420 ashish 7856
    }
7857
 
695 rajveer 7858
    public void unsetSessionId() {
7859
      this.sessionId = null;
420 ashish 7860
    }
7861
 
3430 rajveer 7862
    /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
695 rajveer 7863
    public boolean isSetSessionId() {
7864
      return this.sessionId != null;
420 ashish 7865
    }
7866
 
695 rajveer 7867
    public void setSessionIdIsSet(boolean value) {
420 ashish 7868
      if (!value) {
695 rajveer 7869
        this.sessionId = null;
420 ashish 7870
      }
7871
    }
7872
 
695 rajveer 7873
    public String getGatewayTxnStatus() {
7874
      return this.gatewayTxnStatus;
420 ashish 7875
    }
7876
 
3430 rajveer 7877
    public void setGatewayTxnStatus(String gatewayTxnStatus) {
695 rajveer 7878
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 7879
    }
7880
 
695 rajveer 7881
    public void unsetGatewayTxnStatus() {
7882
      this.gatewayTxnStatus = null;
420 ashish 7883
    }
7884
 
3430 rajveer 7885
    /** Returns true if field gatewayTxnStatus is set (has been assigned a value) and false otherwise */
695 rajveer 7886
    public boolean isSetGatewayTxnStatus() {
7887
      return this.gatewayTxnStatus != null;
420 ashish 7888
    }
7889
 
695 rajveer 7890
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 7891
      if (!value) {
695 rajveer 7892
        this.gatewayTxnStatus = null;
420 ashish 7893
      }
7894
    }
7895
 
695 rajveer 7896
    public String getDescription() {
7897
      return this.description;
420 ashish 7898
    }
7899
 
3430 rajveer 7900
    public void setDescription(String description) {
695 rajveer 7901
      this.description = description;
420 ashish 7902
    }
7903
 
695 rajveer 7904
    public void unsetDescription() {
7905
      this.description = null;
420 ashish 7906
    }
7907
 
3430 rajveer 7908
    /** Returns true if field description is set (has been assigned a value) and false otherwise */
695 rajveer 7909
    public boolean isSetDescription() {
7910
      return this.description != null;
420 ashish 7911
    }
7912
 
695 rajveer 7913
    public void setDescriptionIsSet(boolean value) {
420 ashish 7914
      if (!value) {
695 rajveer 7915
        this.description = null;
420 ashish 7916
      }
7917
    }
7918
 
695 rajveer 7919
    public String getGatewayTxnId() {
7920
      return this.gatewayTxnId;
420 ashish 7921
    }
7922
 
3430 rajveer 7923
    public void setGatewayTxnId(String gatewayTxnId) {
695 rajveer 7924
      this.gatewayTxnId = gatewayTxnId;
420 ashish 7925
    }
7926
 
695 rajveer 7927
    public void unsetGatewayTxnId() {
7928
      this.gatewayTxnId = null;
420 ashish 7929
    }
7930
 
3430 rajveer 7931
    /** Returns true if field gatewayTxnId is set (has been assigned a value) and false otherwise */
695 rajveer 7932
    public boolean isSetGatewayTxnId() {
7933
      return this.gatewayTxnId != null;
420 ashish 7934
    }
7935
 
695 rajveer 7936
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 7937
      if (!value) {
695 rajveer 7938
        this.gatewayTxnId = null;
420 ashish 7939
      }
7940
    }
7941
 
695 rajveer 7942
    public String getAuthCode() {
7943
      return this.authCode;
420 ashish 7944
    }
7945
 
3430 rajveer 7946
    public void setAuthCode(String authCode) {
695 rajveer 7947
      this.authCode = authCode;
420 ashish 7948
    }
7949
 
695 rajveer 7950
    public void unsetAuthCode() {
7951
      this.authCode = null;
420 ashish 7952
    }
7953
 
3430 rajveer 7954
    /** Returns true if field authCode is set (has been assigned a value) and false otherwise */
695 rajveer 7955
    public boolean isSetAuthCode() {
7956
      return this.authCode != null;
420 ashish 7957
    }
7958
 
695 rajveer 7959
    public void setAuthCodeIsSet(boolean value) {
420 ashish 7960
      if (!value) {
695 rajveer 7961
        this.authCode = null;
420 ashish 7962
      }
7963
    }
7964
 
695 rajveer 7965
    public String getReferenceCode() {
7966
      return this.referenceCode;
420 ashish 7967
    }
7968
 
3430 rajveer 7969
    public void setReferenceCode(String referenceCode) {
695 rajveer 7970
      this.referenceCode = referenceCode;
420 ashish 7971
    }
7972
 
695 rajveer 7973
    public void unsetReferenceCode() {
7974
      this.referenceCode = null;
420 ashish 7975
    }
7976
 
3430 rajveer 7977
    /** Returns true if field referenceCode is set (has been assigned a value) and false otherwise */
695 rajveer 7978
    public boolean isSetReferenceCode() {
7979
      return this.referenceCode != null;
420 ashish 7980
    }
7981
 
695 rajveer 7982
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 7983
      if (!value) {
695 rajveer 7984
        this.referenceCode = null;
420 ashish 7985
      }
7986
    }
7987
 
695 rajveer 7988
    public String getErrorCode() {
7989
      return this.errorCode;
7990
    }
7991
 
3430 rajveer 7992
    public void setErrorCode(String errorCode) {
695 rajveer 7993
      this.errorCode = errorCode;
7994
    }
7995
 
7996
    public void unsetErrorCode() {
7997
      this.errorCode = null;
7998
    }
7999
 
3430 rajveer 8000
    /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
695 rajveer 8001
    public boolean isSetErrorCode() {
8002
      return this.errorCode != null;
8003
    }
8004
 
8005
    public void setErrorCodeIsSet(boolean value) {
8006
      if (!value) {
8007
        this.errorCode = null;
8008
      }
8009
    }
8010
 
8011
    /**
8012
     * 
8013
     * @see PaymentStatus
8014
     */
8015
    public PaymentStatus getStatus() {
8016
      return this.status;
8017
    }
8018
 
8019
    /**
8020
     * 
8021
     * @see PaymentStatus
8022
     */
3430 rajveer 8023
    public void setStatus(PaymentStatus status) {
695 rajveer 8024
      this.status = status;
8025
    }
8026
 
8027
    public void unsetStatus() {
8028
      this.status = null;
8029
    }
8030
 
3430 rajveer 8031
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
695 rajveer 8032
    public boolean isSetStatus() {
8033
      return this.status != null;
8034
    }
8035
 
8036
    public void setStatusIsSet(boolean value) {
8037
      if (!value) {
8038
        this.status = null;
8039
      }
8040
    }
8041
 
1119 rajveer 8042
    public String getGatewayTxnDate() {
8043
      return this.gatewayTxnDate;
8044
    }
8045
 
3430 rajveer 8046
    public void setGatewayTxnDate(String gatewayTxnDate) {
1119 rajveer 8047
      this.gatewayTxnDate = gatewayTxnDate;
8048
    }
8049
 
8050
    public void unsetGatewayTxnDate() {
8051
      this.gatewayTxnDate = null;
8052
    }
8053
 
3430 rajveer 8054
    /** Returns true if field gatewayTxnDate is set (has been assigned a value) and false otherwise */
1119 rajveer 8055
    public boolean isSetGatewayTxnDate() {
8056
      return this.gatewayTxnDate != null;
8057
    }
8058
 
8059
    public void setGatewayTxnDateIsSet(boolean value) {
8060
      if (!value) {
8061
        this.gatewayTxnDate = null;
8062
      }
8063
    }
8064
 
695 rajveer 8065
    public int getAttributesSize() {
8066
      return (this.attributes == null) ? 0 : this.attributes.size();
8067
    }
8068
 
8069
    public java.util.Iterator<Attribute> getAttributesIterator() {
8070
      return (this.attributes == null) ? null : this.attributes.iterator();
8071
    }
8072
 
8073
    public void addToAttributes(Attribute elem) {
8074
      if (this.attributes == null) {
8075
        this.attributes = new ArrayList<Attribute>();
8076
      }
8077
      this.attributes.add(elem);
8078
    }
8079
 
8080
    public List<Attribute> getAttributes() {
8081
      return this.attributes;
8082
    }
8083
 
3430 rajveer 8084
    public void setAttributes(List<Attribute> attributes) {
695 rajveer 8085
      this.attributes = attributes;
8086
    }
8087
 
8088
    public void unsetAttributes() {
8089
      this.attributes = null;
8090
    }
8091
 
3430 rajveer 8092
    /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
695 rajveer 8093
    public boolean isSetAttributes() {
8094
      return this.attributes != null;
8095
    }
8096
 
8097
    public void setAttributesIsSet(boolean value) {
8098
      if (!value) {
8099
        this.attributes = null;
8100
      }
8101
    }
8102
 
420 ashish 8103
    public void setFieldValue(_Fields field, Object value) {
8104
      switch (field) {
8105
      case ID:
8106
        if (value == null) {
8107
          unsetId();
8108
        } else {
8109
          setId((Long)value);
8110
        }
8111
        break;
8112
 
695 rajveer 8113
      case GATEWAY_PAYMENT_ID:
420 ashish 8114
        if (value == null) {
695 rajveer 8115
          unsetGatewayPaymentId();
420 ashish 8116
        } else {
695 rajveer 8117
          setGatewayPaymentId((String)value);
420 ashish 8118
        }
8119
        break;
8120
 
695 rajveer 8121
      case SESSION_ID:
420 ashish 8122
        if (value == null) {
695 rajveer 8123
          unsetSessionId();
420 ashish 8124
        } else {
695 rajveer 8125
          setSessionId((String)value);
420 ashish 8126
        }
8127
        break;
8128
 
695 rajveer 8129
      case GATEWAY_TXN_STATUS:
420 ashish 8130
        if (value == null) {
695 rajveer 8131
          unsetGatewayTxnStatus();
420 ashish 8132
        } else {
695 rajveer 8133
          setGatewayTxnStatus((String)value);
420 ashish 8134
        }
8135
        break;
8136
 
695 rajveer 8137
      case DESCRIPTION:
420 ashish 8138
        if (value == null) {
695 rajveer 8139
          unsetDescription();
420 ashish 8140
        } else {
695 rajveer 8141
          setDescription((String)value);
420 ashish 8142
        }
8143
        break;
8144
 
695 rajveer 8145
      case GATEWAY_TXN_ID:
420 ashish 8146
        if (value == null) {
695 rajveer 8147
          unsetGatewayTxnId();
420 ashish 8148
        } else {
695 rajveer 8149
          setGatewayTxnId((String)value);
420 ashish 8150
        }
8151
        break;
8152
 
8153
      case AUTH_CODE:
8154
        if (value == null) {
695 rajveer 8155
          unsetAuthCode();
420 ashish 8156
        } else {
695 rajveer 8157
          setAuthCode((String)value);
420 ashish 8158
        }
8159
        break;
8160
 
695 rajveer 8161
      case REFERENCE_CODE:
420 ashish 8162
        if (value == null) {
695 rajveer 8163
          unsetReferenceCode();
420 ashish 8164
        } else {
695 rajveer 8165
          setReferenceCode((String)value);
420 ashish 8166
        }
8167
        break;
8168
 
695 rajveer 8169
      case ERROR_CODE:
8170
        if (value == null) {
8171
          unsetErrorCode();
8172
        } else {
8173
          setErrorCode((String)value);
8174
        }
8175
        break;
8176
 
8177
      case STATUS:
8178
        if (value == null) {
8179
          unsetStatus();
8180
        } else {
8181
          setStatus((PaymentStatus)value);
8182
        }
8183
        break;
8184
 
1119 rajveer 8185
      case GATEWAY_TXN_DATE:
8186
        if (value == null) {
8187
          unsetGatewayTxnDate();
8188
        } else {
8189
          setGatewayTxnDate((String)value);
8190
        }
8191
        break;
8192
 
695 rajveer 8193
      case ATTRIBUTES:
8194
        if (value == null) {
8195
          unsetAttributes();
8196
        } else {
8197
          setAttributes((List<Attribute>)value);
8198
        }
8199
        break;
8200
 
420 ashish 8201
      }
8202
    }
8203
 
8204
    public Object getFieldValue(_Fields field) {
8205
      switch (field) {
8206
      case ID:
3430 rajveer 8207
        return Long.valueOf(getId());
420 ashish 8208
 
695 rajveer 8209
      case GATEWAY_PAYMENT_ID:
8210
        return getGatewayPaymentId();
420 ashish 8211
 
695 rajveer 8212
      case SESSION_ID:
8213
        return getSessionId();
420 ashish 8214
 
695 rajveer 8215
      case GATEWAY_TXN_STATUS:
8216
        return getGatewayTxnStatus();
420 ashish 8217
 
695 rajveer 8218
      case DESCRIPTION:
8219
        return getDescription();
420 ashish 8220
 
695 rajveer 8221
      case GATEWAY_TXN_ID:
8222
        return getGatewayTxnId();
420 ashish 8223
 
8224
      case AUTH_CODE:
695 rajveer 8225
        return getAuthCode();
420 ashish 8226
 
695 rajveer 8227
      case REFERENCE_CODE:
8228
        return getReferenceCode();
420 ashish 8229
 
695 rajveer 8230
      case ERROR_CODE:
8231
        return getErrorCode();
8232
 
8233
      case STATUS:
8234
        return getStatus();
8235
 
1119 rajveer 8236
      case GATEWAY_TXN_DATE:
8237
        return getGatewayTxnDate();
8238
 
695 rajveer 8239
      case ATTRIBUTES:
8240
        return getAttributes();
8241
 
420 ashish 8242
      }
8243
      throw new IllegalStateException();
8244
    }
8245
 
3430 rajveer 8246
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8247
    public boolean isSet(_Fields field) {
8248
      if (field == null) {
8249
        throw new IllegalArgumentException();
8250
      }
420 ashish 8251
 
8252
      switch (field) {
8253
      case ID:
8254
        return isSetId();
695 rajveer 8255
      case GATEWAY_PAYMENT_ID:
8256
        return isSetGatewayPaymentId();
420 ashish 8257
      case SESSION_ID:
695 rajveer 8258
        return isSetSessionId();
8259
      case GATEWAY_TXN_STATUS:
8260
        return isSetGatewayTxnStatus();
8261
      case DESCRIPTION:
8262
        return isSetDescription();
8263
      case GATEWAY_TXN_ID:
8264
        return isSetGatewayTxnId();
420 ashish 8265
      case AUTH_CODE:
695 rajveer 8266
        return isSetAuthCode();
8267
      case REFERENCE_CODE:
8268
        return isSetReferenceCode();
8269
      case ERROR_CODE:
8270
        return isSetErrorCode();
8271
      case STATUS:
8272
        return isSetStatus();
1119 rajveer 8273
      case GATEWAY_TXN_DATE:
8274
        return isSetGatewayTxnDate();
695 rajveer 8275
      case ATTRIBUTES:
8276
        return isSetAttributes();
420 ashish 8277
      }
8278
      throw new IllegalStateException();
8279
    }
8280
 
8281
    @Override
8282
    public boolean equals(Object that) {
8283
      if (that == null)
8284
        return false;
695 rajveer 8285
      if (that instanceof updatePaymentDetails_args)
8286
        return this.equals((updatePaymentDetails_args)that);
420 ashish 8287
      return false;
8288
    }
8289
 
695 rajveer 8290
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 8291
      if (that == null)
8292
        return false;
8293
 
8294
      boolean this_present_id = true;
8295
      boolean that_present_id = true;
8296
      if (this_present_id || that_present_id) {
8297
        if (!(this_present_id && that_present_id))
8298
          return false;
8299
        if (this.id != that.id)
8300
          return false;
8301
      }
8302
 
695 rajveer 8303
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
8304
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
8305
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
8306
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 8307
          return false;
695 rajveer 8308
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 8309
          return false;
8310
      }
8311
 
695 rajveer 8312
      boolean this_present_sessionId = true && this.isSetSessionId();
8313
      boolean that_present_sessionId = true && that.isSetSessionId();
8314
      if (this_present_sessionId || that_present_sessionId) {
8315
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 8316
          return false;
695 rajveer 8317
        if (!this.sessionId.equals(that.sessionId))
420 ashish 8318
          return false;
8319
      }
8320
 
695 rajveer 8321
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
8322
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
8323
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
8324
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 8325
          return false;
695 rajveer 8326
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 8327
          return false;
8328
      }
8329
 
695 rajveer 8330
      boolean this_present_description = true && this.isSetDescription();
8331
      boolean that_present_description = true && that.isSetDescription();
8332
      if (this_present_description || that_present_description) {
8333
        if (!(this_present_description && that_present_description))
420 ashish 8334
          return false;
695 rajveer 8335
        if (!this.description.equals(that.description))
420 ashish 8336
          return false;
8337
      }
8338
 
695 rajveer 8339
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
8340
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
8341
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
8342
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 8343
          return false;
695 rajveer 8344
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 8345
          return false;
8346
      }
8347
 
695 rajveer 8348
      boolean this_present_authCode = true && this.isSetAuthCode();
8349
      boolean that_present_authCode = true && that.isSetAuthCode();
8350
      if (this_present_authCode || that_present_authCode) {
8351
        if (!(this_present_authCode && that_present_authCode))
420 ashish 8352
          return false;
695 rajveer 8353
        if (!this.authCode.equals(that.authCode))
420 ashish 8354
          return false;
8355
      }
8356
 
695 rajveer 8357
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
8358
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
8359
      if (this_present_referenceCode || that_present_referenceCode) {
8360
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 8361
          return false;
695 rajveer 8362
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 8363
          return false;
8364
      }
8365
 
695 rajveer 8366
      boolean this_present_errorCode = true && this.isSetErrorCode();
8367
      boolean that_present_errorCode = true && that.isSetErrorCode();
8368
      if (this_present_errorCode || that_present_errorCode) {
8369
        if (!(this_present_errorCode && that_present_errorCode))
8370
          return false;
8371
        if (!this.errorCode.equals(that.errorCode))
8372
          return false;
8373
      }
8374
 
8375
      boolean this_present_status = true && this.isSetStatus();
8376
      boolean that_present_status = true && that.isSetStatus();
8377
      if (this_present_status || that_present_status) {
8378
        if (!(this_present_status && that_present_status))
8379
          return false;
8380
        if (!this.status.equals(that.status))
8381
          return false;
8382
      }
8383
 
1119 rajveer 8384
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
8385
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
8386
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
8387
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
8388
          return false;
8389
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
8390
          return false;
8391
      }
8392
 
695 rajveer 8393
      boolean this_present_attributes = true && this.isSetAttributes();
8394
      boolean that_present_attributes = true && that.isSetAttributes();
8395
      if (this_present_attributes || that_present_attributes) {
8396
        if (!(this_present_attributes && that_present_attributes))
8397
          return false;
8398
        if (!this.attributes.equals(that.attributes))
8399
          return false;
8400
      }
8401
 
420 ashish 8402
      return true;
8403
    }
8404
 
8405
    @Override
8406
    public int hashCode() {
8407
      return 0;
8408
    }
8409
 
695 rajveer 8410
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 8411
      if (!getClass().equals(other.getClass())) {
8412
        return getClass().getName().compareTo(other.getClass().getName());
8413
      }
8414
 
8415
      int lastComparison = 0;
695 rajveer 8416
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 8417
 
3430 rajveer 8418
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 8419
      if (lastComparison != 0) {
8420
        return lastComparison;
8421
      }
3430 rajveer 8422
      if (isSetId()) {
8423
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
8424
        if (lastComparison != 0) {
8425
          return lastComparison;
8426
        }
420 ashish 8427
      }
3430 rajveer 8428
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(typedOther.isSetGatewayPaymentId());
420 ashish 8429
      if (lastComparison != 0) {
8430
        return lastComparison;
8431
      }
3430 rajveer 8432
      if (isSetGatewayPaymentId()) {
8433
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayPaymentId, typedOther.gatewayPaymentId);
8434
        if (lastComparison != 0) {
8435
          return lastComparison;
8436
        }
420 ashish 8437
      }
3430 rajveer 8438
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId());
420 ashish 8439
      if (lastComparison != 0) {
8440
        return lastComparison;
8441
      }
3430 rajveer 8442
      if (isSetSessionId()) {
8443
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId);
8444
        if (lastComparison != 0) {
8445
          return lastComparison;
8446
        }
420 ashish 8447
      }
3430 rajveer 8448
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(typedOther.isSetGatewayTxnStatus());
420 ashish 8449
      if (lastComparison != 0) {
8450
        return lastComparison;
8451
      }
3430 rajveer 8452
      if (isSetGatewayTxnStatus()) {
8453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnStatus, typedOther.gatewayTxnStatus);
8454
        if (lastComparison != 0) {
8455
          return lastComparison;
8456
        }
420 ashish 8457
      }
3430 rajveer 8458
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
420 ashish 8459
      if (lastComparison != 0) {
8460
        return lastComparison;
8461
      }
3430 rajveer 8462
      if (isSetDescription()) {
8463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
8464
        if (lastComparison != 0) {
8465
          return lastComparison;
8466
        }
420 ashish 8467
      }
3430 rajveer 8468
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(typedOther.isSetGatewayTxnId());
420 ashish 8469
      if (lastComparison != 0) {
8470
        return lastComparison;
8471
      }
3430 rajveer 8472
      if (isSetGatewayTxnId()) {
8473
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnId, typedOther.gatewayTxnId);
8474
        if (lastComparison != 0) {
8475
          return lastComparison;
8476
        }
420 ashish 8477
      }
3430 rajveer 8478
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(typedOther.isSetAuthCode());
420 ashish 8479
      if (lastComparison != 0) {
8480
        return lastComparison;
8481
      }
3430 rajveer 8482
      if (isSetAuthCode()) {
8483
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authCode, typedOther.authCode);
8484
        if (lastComparison != 0) {
8485
          return lastComparison;
8486
        }
420 ashish 8487
      }
3430 rajveer 8488
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(typedOther.isSetReferenceCode());
420 ashish 8489
      if (lastComparison != 0) {
8490
        return lastComparison;
8491
      }
3430 rajveer 8492
      if (isSetReferenceCode()) {
8493
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenceCode, typedOther.referenceCode);
8494
        if (lastComparison != 0) {
8495
          return lastComparison;
8496
        }
420 ashish 8497
      }
3430 rajveer 8498
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode());
695 rajveer 8499
      if (lastComparison != 0) {
8500
        return lastComparison;
8501
      }
3430 rajveer 8502
      if (isSetErrorCode()) {
8503
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode);
8504
        if (lastComparison != 0) {
8505
          return lastComparison;
8506
        }
695 rajveer 8507
      }
3430 rajveer 8508
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
695 rajveer 8509
      if (lastComparison != 0) {
8510
        return lastComparison;
8511
      }
3430 rajveer 8512
      if (isSetStatus()) {
8513
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
8514
        if (lastComparison != 0) {
8515
          return lastComparison;
8516
        }
695 rajveer 8517
      }
3430 rajveer 8518
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(typedOther.isSetGatewayTxnDate());
1119 rajveer 8519
      if (lastComparison != 0) {
8520
        return lastComparison;
8521
      }
3430 rajveer 8522
      if (isSetGatewayTxnDate()) {
8523
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnDate, typedOther.gatewayTxnDate);
8524
        if (lastComparison != 0) {
8525
          return lastComparison;
8526
        }
1119 rajveer 8527
      }
3430 rajveer 8528
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
695 rajveer 8529
      if (lastComparison != 0) {
8530
        return lastComparison;
8531
      }
3430 rajveer 8532
      if (isSetAttributes()) {
8533
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
8534
        if (lastComparison != 0) {
8535
          return lastComparison;
8536
        }
695 rajveer 8537
      }
420 ashish 8538
      return 0;
8539
    }
8540
 
3430 rajveer 8541
    public _Fields fieldForId(int fieldId) {
8542
      return _Fields.findByThriftId(fieldId);
8543
    }
8544
 
8545
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8546
      org.apache.thrift.protocol.TField field;
420 ashish 8547
      iprot.readStructBegin();
8548
      while (true)
8549
      {
8550
        field = iprot.readFieldBegin();
3430 rajveer 8551
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8552
          break;
8553
        }
3430 rajveer 8554
        switch (field.id) {
8555
          case 1: // ID
8556
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8557
              this.id = iprot.readI64();
8558
              setIdIsSet(true);
8559
            } else { 
8560
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8561
            }
8562
            break;
8563
          case 2: // GATEWAY_PAYMENT_ID
8564
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8565
              this.gatewayPaymentId = iprot.readString();
8566
            } else { 
8567
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8568
            }
8569
            break;
8570
          case 3: // SESSION_ID
8571
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8572
              this.sessionId = iprot.readString();
8573
            } else { 
8574
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8575
            }
8576
            break;
8577
          case 4: // GATEWAY_TXN_STATUS
8578
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8579
              this.gatewayTxnStatus = iprot.readString();
8580
            } else { 
8581
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8582
            }
8583
            break;
8584
          case 5: // DESCRIPTION
8585
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8586
              this.description = iprot.readString();
8587
            } else { 
8588
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8589
            }
8590
            break;
8591
          case 6: // GATEWAY_TXN_ID
8592
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8593
              this.gatewayTxnId = iprot.readString();
8594
            } else { 
8595
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8596
            }
8597
            break;
8598
          case 7: // AUTH_CODE
8599
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8600
              this.authCode = iprot.readString();
8601
            } else { 
8602
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8603
            }
8604
            break;
8605
          case 8: // REFERENCE_CODE
8606
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8607
              this.referenceCode = iprot.readString();
8608
            } else { 
8609
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8610
            }
8611
            break;
8612
          case 9: // ERROR_CODE
8613
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8614
              this.errorCode = iprot.readString();
8615
            } else { 
8616
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8617
            }
8618
            break;
8619
          case 10: // STATUS
8620
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8621
              this.status = PaymentStatus.findByValue(iprot.readI32());
8622
            } else { 
8623
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8624
            }
8625
            break;
8626
          case 11: // GATEWAY_TXN_DATE
8627
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8628
              this.gatewayTxnDate = iprot.readString();
8629
            } else { 
8630
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8631
            }
8632
            break;
8633
          case 12: // ATTRIBUTES
8634
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8635
              {
4141 chandransh 8636
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
8637
                this.attributes = new ArrayList<Attribute>(_list28.size);
8638
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
695 rajveer 8639
                {
4141 chandransh 8640
                  Attribute _elem30; // required
8641
                  _elem30 = new Attribute();
8642
                  _elem30.read(iprot);
8643
                  this.attributes.add(_elem30);
695 rajveer 8644
                }
3430 rajveer 8645
                iprot.readListEnd();
695 rajveer 8646
              }
3430 rajveer 8647
            } else { 
8648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8649
            }
8650
            break;
8651
          default:
8652
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8653
        }
3430 rajveer 8654
        iprot.readFieldEnd();
420 ashish 8655
      }
8656
      iprot.readStructEnd();
8657
      validate();
8658
    }
8659
 
3430 rajveer 8660
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8661
      validate();
8662
 
8663
      oprot.writeStructBegin(STRUCT_DESC);
8664
      oprot.writeFieldBegin(ID_FIELD_DESC);
8665
      oprot.writeI64(this.id);
8666
      oprot.writeFieldEnd();
695 rajveer 8667
      if (this.gatewayPaymentId != null) {
8668
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
8669
        oprot.writeString(this.gatewayPaymentId);
420 ashish 8670
        oprot.writeFieldEnd();
8671
      }
695 rajveer 8672
      if (this.sessionId != null) {
8673
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
8674
        oprot.writeString(this.sessionId);
420 ashish 8675
        oprot.writeFieldEnd();
8676
      }
695 rajveer 8677
      if (this.gatewayTxnStatus != null) {
8678
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
8679
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 8680
        oprot.writeFieldEnd();
8681
      }
695 rajveer 8682
      if (this.description != null) {
8683
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8684
        oprot.writeString(this.description);
420 ashish 8685
        oprot.writeFieldEnd();
8686
      }
695 rajveer 8687
      if (this.gatewayTxnId != null) {
8688
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
8689
        oprot.writeString(this.gatewayTxnId);
420 ashish 8690
        oprot.writeFieldEnd();
8691
      }
695 rajveer 8692
      if (this.authCode != null) {
420 ashish 8693
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 8694
        oprot.writeString(this.authCode);
420 ashish 8695
        oprot.writeFieldEnd();
8696
      }
695 rajveer 8697
      if (this.referenceCode != null) {
8698
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
8699
        oprot.writeString(this.referenceCode);
420 ashish 8700
        oprot.writeFieldEnd();
8701
      }
695 rajveer 8702
      if (this.errorCode != null) {
8703
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
8704
        oprot.writeString(this.errorCode);
8705
        oprot.writeFieldEnd();
8706
      }
8707
      if (this.status != null) {
8708
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8709
        oprot.writeI32(this.status.getValue());
8710
        oprot.writeFieldEnd();
8711
      }
1119 rajveer 8712
      if (this.gatewayTxnDate != null) {
8713
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
8714
        oprot.writeString(this.gatewayTxnDate);
8715
        oprot.writeFieldEnd();
8716
      }
695 rajveer 8717
      if (this.attributes != null) {
8718
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
8719
        {
3430 rajveer 8720
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
4141 chandransh 8721
          for (Attribute _iter31 : this.attributes)
695 rajveer 8722
          {
4141 chandransh 8723
            _iter31.write(oprot);
695 rajveer 8724
          }
8725
          oprot.writeListEnd();
8726
        }
8727
        oprot.writeFieldEnd();
8728
      }
420 ashish 8729
      oprot.writeFieldStop();
8730
      oprot.writeStructEnd();
8731
    }
8732
 
8733
    @Override
8734
    public String toString() {
695 rajveer 8735
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 8736
      boolean first = true;
8737
 
8738
      sb.append("id:");
8739
      sb.append(this.id);
8740
      first = false;
8741
      if (!first) sb.append(", ");
695 rajveer 8742
      sb.append("gatewayPaymentId:");
8743
      if (this.gatewayPaymentId == null) {
420 ashish 8744
        sb.append("null");
8745
      } else {
695 rajveer 8746
        sb.append(this.gatewayPaymentId);
420 ashish 8747
      }
8748
      first = false;
8749
      if (!first) sb.append(", ");
695 rajveer 8750
      sb.append("sessionId:");
8751
      if (this.sessionId == null) {
420 ashish 8752
        sb.append("null");
8753
      } else {
695 rajveer 8754
        sb.append(this.sessionId);
420 ashish 8755
      }
8756
      first = false;
8757
      if (!first) sb.append(", ");
695 rajveer 8758
      sb.append("gatewayTxnStatus:");
8759
      if (this.gatewayTxnStatus == null) {
420 ashish 8760
        sb.append("null");
8761
      } else {
695 rajveer 8762
        sb.append(this.gatewayTxnStatus);
420 ashish 8763
      }
8764
      first = false;
8765
      if (!first) sb.append(", ");
695 rajveer 8766
      sb.append("description:");
8767
      if (this.description == null) {
420 ashish 8768
        sb.append("null");
8769
      } else {
695 rajveer 8770
        sb.append(this.description);
420 ashish 8771
      }
8772
      first = false;
8773
      if (!first) sb.append(", ");
695 rajveer 8774
      sb.append("gatewayTxnId:");
8775
      if (this.gatewayTxnId == null) {
420 ashish 8776
        sb.append("null");
8777
      } else {
695 rajveer 8778
        sb.append(this.gatewayTxnId);
420 ashish 8779
      }
8780
      first = false;
8781
      if (!first) sb.append(", ");
695 rajveer 8782
      sb.append("authCode:");
8783
      if (this.authCode == null) {
420 ashish 8784
        sb.append("null");
8785
      } else {
695 rajveer 8786
        sb.append(this.authCode);
420 ashish 8787
      }
8788
      first = false;
8789
      if (!first) sb.append(", ");
695 rajveer 8790
      sb.append("referenceCode:");
8791
      if (this.referenceCode == null) {
420 ashish 8792
        sb.append("null");
8793
      } else {
695 rajveer 8794
        sb.append(this.referenceCode);
420 ashish 8795
      }
8796
      first = false;
695 rajveer 8797
      if (!first) sb.append(", ");
8798
      sb.append("errorCode:");
8799
      if (this.errorCode == null) {
8800
        sb.append("null");
8801
      } else {
8802
        sb.append(this.errorCode);
8803
      }
8804
      first = false;
8805
      if (!first) sb.append(", ");
8806
      sb.append("status:");
8807
      if (this.status == null) {
8808
        sb.append("null");
8809
      } else {
8810
        sb.append(this.status);
8811
      }
8812
      first = false;
8813
      if (!first) sb.append(", ");
1119 rajveer 8814
      sb.append("gatewayTxnDate:");
8815
      if (this.gatewayTxnDate == null) {
8816
        sb.append("null");
8817
      } else {
8818
        sb.append(this.gatewayTxnDate);
8819
      }
8820
      first = false;
8821
      if (!first) sb.append(", ");
695 rajveer 8822
      sb.append("attributes:");
8823
      if (this.attributes == null) {
8824
        sb.append("null");
8825
      } else {
8826
        sb.append(this.attributes);
8827
      }
8828
      first = false;
420 ashish 8829
      sb.append(")");
8830
      return sb.toString();
8831
    }
8832
 
3430 rajveer 8833
    public void validate() throws org.apache.thrift.TException {
420 ashish 8834
      // check for required fields
8835
    }
8836
 
3430 rajveer 8837
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8838
      try {
8839
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8840
      } catch (org.apache.thrift.TException te) {
8841
        throw new java.io.IOException(te);
8842
      }
8843
    }
8844
 
8845
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8846
      try {
8847
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8848
        __isset_bit_vector = new BitSet(1);
8849
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8850
      } catch (org.apache.thrift.TException te) {
8851
        throw new java.io.IOException(te);
8852
      }
8853
    }
8854
 
420 ashish 8855
  }
8856
 
3430 rajveer 8857
  public static class updatePaymentDetails_result implements org.apache.thrift.TBase<updatePaymentDetails_result, updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable   {
8858
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_result");
420 ashish 8859
 
3430 rajveer 8860
    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);
8861
    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 8862
 
3430 rajveer 8863
    private boolean success; // required
8864
    private PaymentException pe; // required
420 ashish 8865
 
8866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8867
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 8868
      SUCCESS((short)0, "success"),
420 ashish 8869
      PE((short)1, "pe");
8870
 
8871
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8872
 
8873
      static {
8874
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8875
          byName.put(field.getFieldName(), field);
8876
        }
8877
      }
8878
 
8879
      /**
8880
       * Find the _Fields constant that matches fieldId, or null if its not found.
8881
       */
8882
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8883
        switch(fieldId) {
8884
          case 0: // SUCCESS
8885
            return SUCCESS;
8886
          case 1: // PE
8887
            return PE;
8888
          default:
8889
            return null;
8890
        }
420 ashish 8891
      }
8892
 
8893
      /**
8894
       * Find the _Fields constant that matches fieldId, throwing an exception
8895
       * if it is not found.
8896
       */
8897
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8898
        _Fields fields = findByThriftId(fieldId);
8899
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8900
        return fields;
8901
      }
8902
 
8903
      /**
8904
       * Find the _Fields constant that matches name, or null if its not found.
8905
       */
8906
      public static _Fields findByName(String name) {
8907
        return byName.get(name);
8908
      }
8909
 
8910
      private final short _thriftId;
8911
      private final String _fieldName;
8912
 
8913
      _Fields(short thriftId, String fieldName) {
8914
        _thriftId = thriftId;
8915
        _fieldName = fieldName;
8916
      }
8917
 
8918
      public short getThriftFieldId() {
8919
        return _thriftId;
8920
      }
8921
 
8922
      public String getFieldName() {
8923
        return _fieldName;
8924
      }
8925
    }
8926
 
8927
    // isset id assignments
695 rajveer 8928
    private static final int __SUCCESS_ISSET_ID = 0;
8929
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 8930
 
3430 rajveer 8931
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8932
    static {
3430 rajveer 8933
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8934
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8935
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
8936
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8937
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8938
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8939
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 8940
    }
8941
 
695 rajveer 8942
    public updatePaymentDetails_result() {
420 ashish 8943
    }
8944
 
695 rajveer 8945
    public updatePaymentDetails_result(
8946
      boolean success,
420 ashish 8947
      PaymentException pe)
8948
    {
8949
      this();
695 rajveer 8950
      this.success = success;
8951
      setSuccessIsSet(true);
420 ashish 8952
      this.pe = pe;
8953
    }
8954
 
8955
    /**
8956
     * Performs a deep copy on <i>other</i>.
8957
     */
695 rajveer 8958
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
8959
      __isset_bit_vector.clear();
8960
      __isset_bit_vector.or(other.__isset_bit_vector);
8961
      this.success = other.success;
420 ashish 8962
      if (other.isSetPe()) {
8963
        this.pe = new PaymentException(other.pe);
8964
      }
8965
    }
8966
 
695 rajveer 8967
    public updatePaymentDetails_result deepCopy() {
8968
      return new updatePaymentDetails_result(this);
420 ashish 8969
    }
8970
 
3430 rajveer 8971
    @Override
8972
    public void clear() {
8973
      setSuccessIsSet(false);
8974
      this.success = false;
8975
      this.pe = null;
420 ashish 8976
    }
8977
 
695 rajveer 8978
    public boolean isSuccess() {
8979
      return this.success;
8980
    }
8981
 
3430 rajveer 8982
    public void setSuccess(boolean success) {
695 rajveer 8983
      this.success = success;
8984
      setSuccessIsSet(true);
8985
    }
8986
 
8987
    public void unsetSuccess() {
8988
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8989
    }
8990
 
3430 rajveer 8991
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
695 rajveer 8992
    public boolean isSetSuccess() {
8993
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8994
    }
8995
 
8996
    public void setSuccessIsSet(boolean value) {
8997
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8998
    }
8999
 
420 ashish 9000
    public PaymentException getPe() {
9001
      return this.pe;
9002
    }
9003
 
3430 rajveer 9004
    public void setPe(PaymentException pe) {
420 ashish 9005
      this.pe = pe;
9006
    }
9007
 
9008
    public void unsetPe() {
9009
      this.pe = null;
9010
    }
9011
 
3430 rajveer 9012
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 9013
    public boolean isSetPe() {
9014
      return this.pe != null;
9015
    }
9016
 
9017
    public void setPeIsSet(boolean value) {
9018
      if (!value) {
9019
        this.pe = null;
9020
      }
9021
    }
9022
 
9023
    public void setFieldValue(_Fields field, Object value) {
9024
      switch (field) {
695 rajveer 9025
      case SUCCESS:
9026
        if (value == null) {
9027
          unsetSuccess();
9028
        } else {
9029
          setSuccess((Boolean)value);
9030
        }
9031
        break;
9032
 
420 ashish 9033
      case PE:
9034
        if (value == null) {
9035
          unsetPe();
9036
        } else {
9037
          setPe((PaymentException)value);
9038
        }
9039
        break;
9040
 
9041
      }
9042
    }
9043
 
9044
    public Object getFieldValue(_Fields field) {
9045
      switch (field) {
695 rajveer 9046
      case SUCCESS:
3430 rajveer 9047
        return Boolean.valueOf(isSuccess());
695 rajveer 9048
 
420 ashish 9049
      case PE:
9050
        return getPe();
9051
 
9052
      }
9053
      throw new IllegalStateException();
9054
    }
9055
 
3430 rajveer 9056
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9057
    public boolean isSet(_Fields field) {
9058
      if (field == null) {
9059
        throw new IllegalArgumentException();
9060
      }
420 ashish 9061
 
9062
      switch (field) {
695 rajveer 9063
      case SUCCESS:
9064
        return isSetSuccess();
420 ashish 9065
      case PE:
9066
        return isSetPe();
9067
      }
9068
      throw new IllegalStateException();
9069
    }
9070
 
9071
    @Override
9072
    public boolean equals(Object that) {
9073
      if (that == null)
9074
        return false;
695 rajveer 9075
      if (that instanceof updatePaymentDetails_result)
9076
        return this.equals((updatePaymentDetails_result)that);
420 ashish 9077
      return false;
9078
    }
9079
 
695 rajveer 9080
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 9081
      if (that == null)
9082
        return false;
9083
 
695 rajveer 9084
      boolean this_present_success = true;
9085
      boolean that_present_success = true;
9086
      if (this_present_success || that_present_success) {
9087
        if (!(this_present_success && that_present_success))
9088
          return false;
9089
        if (this.success != that.success)
9090
          return false;
9091
      }
9092
 
420 ashish 9093
      boolean this_present_pe = true && this.isSetPe();
9094
      boolean that_present_pe = true && that.isSetPe();
9095
      if (this_present_pe || that_present_pe) {
9096
        if (!(this_present_pe && that_present_pe))
9097
          return false;
9098
        if (!this.pe.equals(that.pe))
9099
          return false;
9100
      }
9101
 
9102
      return true;
9103
    }
9104
 
9105
    @Override
9106
    public int hashCode() {
9107
      return 0;
9108
    }
9109
 
695 rajveer 9110
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 9111
      if (!getClass().equals(other.getClass())) {
9112
        return getClass().getName().compareTo(other.getClass().getName());
9113
      }
9114
 
9115
      int lastComparison = 0;
695 rajveer 9116
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 9117
 
3430 rajveer 9118
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 9119
      if (lastComparison != 0) {
9120
        return lastComparison;
9121
      }
3430 rajveer 9122
      if (isSetSuccess()) {
9123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9124
        if (lastComparison != 0) {
9125
          return lastComparison;
9126
        }
695 rajveer 9127
      }
3430 rajveer 9128
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 9129
      if (lastComparison != 0) {
9130
        return lastComparison;
9131
      }
3430 rajveer 9132
      if (isSetPe()) {
9133
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
9134
        if (lastComparison != 0) {
9135
          return lastComparison;
9136
        }
420 ashish 9137
      }
9138
      return 0;
9139
    }
9140
 
3430 rajveer 9141
    public _Fields fieldForId(int fieldId) {
9142
      return _Fields.findByThriftId(fieldId);
9143
    }
9144
 
9145
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9146
      org.apache.thrift.protocol.TField field;
420 ashish 9147
      iprot.readStructBegin();
9148
      while (true)
9149
      {
9150
        field = iprot.readFieldBegin();
3430 rajveer 9151
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 9152
          break;
9153
        }
3430 rajveer 9154
        switch (field.id) {
9155
          case 0: // SUCCESS
9156
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
9157
              this.success = iprot.readBool();
9158
              setSuccessIsSet(true);
9159
            } else { 
9160
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9161
            }
9162
            break;
9163
          case 1: // PE
9164
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9165
              this.pe = new PaymentException();
9166
              this.pe.read(iprot);
9167
            } else { 
9168
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9169
            }
9170
            break;
9171
          default:
9172
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 9173
        }
3430 rajveer 9174
        iprot.readFieldEnd();
420 ashish 9175
      }
9176
      iprot.readStructEnd();
9177
      validate();
9178
    }
9179
 
3430 rajveer 9180
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 9181
      oprot.writeStructBegin(STRUCT_DESC);
9182
 
695 rajveer 9183
      if (this.isSetSuccess()) {
9184
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9185
        oprot.writeBool(this.success);
9186
        oprot.writeFieldEnd();
9187
      } else if (this.isSetPe()) {
420 ashish 9188
        oprot.writeFieldBegin(PE_FIELD_DESC);
9189
        this.pe.write(oprot);
9190
        oprot.writeFieldEnd();
9191
      }
9192
      oprot.writeFieldStop();
9193
      oprot.writeStructEnd();
9194
    }
9195
 
9196
    @Override
9197
    public String toString() {
695 rajveer 9198
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 9199
      boolean first = true;
9200
 
695 rajveer 9201
      sb.append("success:");
9202
      sb.append(this.success);
9203
      first = false;
9204
      if (!first) sb.append(", ");
420 ashish 9205
      sb.append("pe:");
9206
      if (this.pe == null) {
9207
        sb.append("null");
9208
      } else {
9209
        sb.append(this.pe);
9210
      }
9211
      first = false;
9212
      sb.append(")");
9213
      return sb.toString();
9214
    }
9215
 
3430 rajveer 9216
    public void validate() throws org.apache.thrift.TException {
420 ashish 9217
      // check for required fields
9218
    }
9219
 
3430 rajveer 9220
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9221
      try {
9222
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9223
      } catch (org.apache.thrift.TException te) {
9224
        throw new java.io.IOException(te);
9225
      }
9226
    }
9227
 
9228
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9229
      try {
9230
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9231
      } catch (org.apache.thrift.TException te) {
9232
        throw new java.io.IOException(te);
9233
      }
9234
    }
9235
 
420 ashish 9236
  }
9237
 
3430 rajveer 9238
  public static class getSuccessfulPaymentsAmountRange_args implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_args, getSuccessfulPaymentsAmountRange_args._Fields>, java.io.Serializable, Cloneable   {
9239
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_args");
1629 ankur.sing 9240
 
9241
 
9242
 
9243
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9244
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 9245
;
9246
 
9247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9248
 
9249
      static {
9250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9251
          byName.put(field.getFieldName(), field);
9252
        }
9253
      }
9254
 
9255
      /**
9256
       * Find the _Fields constant that matches fieldId, or null if its not found.
9257
       */
9258
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9259
        switch(fieldId) {
9260
          default:
9261
            return null;
9262
        }
1629 ankur.sing 9263
      }
9264
 
9265
      /**
9266
       * Find the _Fields constant that matches fieldId, throwing an exception
9267
       * if it is not found.
9268
       */
9269
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9270
        _Fields fields = findByThriftId(fieldId);
9271
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9272
        return fields;
9273
      }
9274
 
9275
      /**
9276
       * Find the _Fields constant that matches name, or null if its not found.
9277
       */
9278
      public static _Fields findByName(String name) {
9279
        return byName.get(name);
9280
      }
9281
 
9282
      private final short _thriftId;
9283
      private final String _fieldName;
9284
 
9285
      _Fields(short thriftId, String fieldName) {
9286
        _thriftId = thriftId;
9287
        _fieldName = fieldName;
9288
      }
9289
 
9290
      public short getThriftFieldId() {
9291
        return _thriftId;
9292
      }
9293
 
9294
      public String getFieldName() {
9295
        return _fieldName;
9296
      }
9297
    }
3430 rajveer 9298
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 9299
    static {
3430 rajveer 9300
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9301
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9302
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_args.class, metaDataMap);
1629 ankur.sing 9303
    }
9304
 
1731 ankur.sing 9305
    public getSuccessfulPaymentsAmountRange_args() {
1629 ankur.sing 9306
    }
9307
 
9308
    /**
9309
     * Performs a deep copy on <i>other</i>.
9310
     */
1731 ankur.sing 9311
    public getSuccessfulPaymentsAmountRange_args(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 9312
    }
9313
 
1731 ankur.sing 9314
    public getSuccessfulPaymentsAmountRange_args deepCopy() {
9315
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 9316
    }
9317
 
3430 rajveer 9318
    @Override
9319
    public void clear() {
1629 ankur.sing 9320
    }
9321
 
9322
    public void setFieldValue(_Fields field, Object value) {
9323
      switch (field) {
9324
      }
9325
    }
9326
 
9327
    public Object getFieldValue(_Fields field) {
9328
      switch (field) {
9329
      }
9330
      throw new IllegalStateException();
9331
    }
9332
 
3430 rajveer 9333
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9334
    public boolean isSet(_Fields field) {
9335
      if (field == null) {
9336
        throw new IllegalArgumentException();
9337
      }
1629 ankur.sing 9338
 
9339
      switch (field) {
9340
      }
9341
      throw new IllegalStateException();
9342
    }
9343
 
9344
    @Override
9345
    public boolean equals(Object that) {
9346
      if (that == null)
9347
        return false;
1731 ankur.sing 9348
      if (that instanceof getSuccessfulPaymentsAmountRange_args)
9349
        return this.equals((getSuccessfulPaymentsAmountRange_args)that);
1629 ankur.sing 9350
      return false;
9351
    }
9352
 
1731 ankur.sing 9353
    public boolean equals(getSuccessfulPaymentsAmountRange_args that) {
1629 ankur.sing 9354
      if (that == null)
9355
        return false;
9356
 
9357
      return true;
9358
    }
9359
 
9360
    @Override
9361
    public int hashCode() {
9362
      return 0;
9363
    }
9364
 
1731 ankur.sing 9365
    public int compareTo(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 9366
      if (!getClass().equals(other.getClass())) {
9367
        return getClass().getName().compareTo(other.getClass().getName());
9368
      }
9369
 
9370
      int lastComparison = 0;
1731 ankur.sing 9371
      getSuccessfulPaymentsAmountRange_args typedOther = (getSuccessfulPaymentsAmountRange_args)other;
1629 ankur.sing 9372
 
9373
      return 0;
9374
    }
9375
 
3430 rajveer 9376
    public _Fields fieldForId(int fieldId) {
9377
      return _Fields.findByThriftId(fieldId);
9378
    }
9379
 
9380
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9381
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 9382
      iprot.readStructBegin();
9383
      while (true)
9384
      {
9385
        field = iprot.readFieldBegin();
3430 rajveer 9386
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 9387
          break;
9388
        }
3430 rajveer 9389
        switch (field.id) {
9390
          default:
9391
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 9392
        }
3430 rajveer 9393
        iprot.readFieldEnd();
1629 ankur.sing 9394
      }
9395
      iprot.readStructEnd();
9396
      validate();
9397
    }
9398
 
3430 rajveer 9399
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 9400
      validate();
9401
 
9402
      oprot.writeStructBegin(STRUCT_DESC);
9403
      oprot.writeFieldStop();
9404
      oprot.writeStructEnd();
9405
    }
9406
 
9407
    @Override
9408
    public String toString() {
1731 ankur.sing 9409
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_args(");
1629 ankur.sing 9410
      boolean first = true;
9411
 
9412
      sb.append(")");
9413
      return sb.toString();
9414
    }
9415
 
3430 rajveer 9416
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 9417
      // check for required fields
9418
    }
9419
 
3430 rajveer 9420
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9421
      try {
9422
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9423
      } catch (org.apache.thrift.TException te) {
9424
        throw new java.io.IOException(te);
9425
      }
9426
    }
9427
 
9428
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9429
      try {
9430
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9431
      } catch (org.apache.thrift.TException te) {
9432
        throw new java.io.IOException(te);
9433
      }
9434
    }
9435
 
1629 ankur.sing 9436
  }
9437
 
3430 rajveer 9438
  public static class getSuccessfulPaymentsAmountRange_result implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_result, getSuccessfulPaymentsAmountRange_result._Fields>, java.io.Serializable, Cloneable   {
9439
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_result");
1629 ankur.sing 9440
 
3430 rajveer 9441
    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 9442
 
3430 rajveer 9443
    private List<Double> success; // required
1629 ankur.sing 9444
 
9445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9446
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 9447
      SUCCESS((short)0, "success");
9448
 
9449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9450
 
9451
      static {
9452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9453
          byName.put(field.getFieldName(), field);
9454
        }
9455
      }
9456
 
9457
      /**
9458
       * Find the _Fields constant that matches fieldId, or null if its not found.
9459
       */
9460
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9461
        switch(fieldId) {
9462
          case 0: // SUCCESS
9463
            return SUCCESS;
9464
          default:
9465
            return null;
9466
        }
1629 ankur.sing 9467
      }
9468
 
9469
      /**
9470
       * Find the _Fields constant that matches fieldId, throwing an exception
9471
       * if it is not found.
9472
       */
9473
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9474
        _Fields fields = findByThriftId(fieldId);
9475
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9476
        return fields;
9477
      }
9478
 
9479
      /**
9480
       * Find the _Fields constant that matches name, or null if its not found.
9481
       */
9482
      public static _Fields findByName(String name) {
9483
        return byName.get(name);
9484
      }
9485
 
9486
      private final short _thriftId;
9487
      private final String _fieldName;
9488
 
9489
      _Fields(short thriftId, String fieldName) {
9490
        _thriftId = thriftId;
9491
        _fieldName = fieldName;
9492
      }
9493
 
9494
      public short getThriftFieldId() {
9495
        return _thriftId;
9496
      }
9497
 
9498
      public String getFieldName() {
9499
        return _fieldName;
9500
      }
9501
    }
9502
 
9503
    // isset id assignments
9504
 
3430 rajveer 9505
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 9506
    static {
3430 rajveer 9507
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9508
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9509
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9510
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
9511
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9512
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_result.class, metaDataMap);
1629 ankur.sing 9513
    }
9514
 
1731 ankur.sing 9515
    public getSuccessfulPaymentsAmountRange_result() {
1629 ankur.sing 9516
    }
9517
 
1731 ankur.sing 9518
    public getSuccessfulPaymentsAmountRange_result(
9519
      List<Double> success)
1629 ankur.sing 9520
    {
9521
      this();
9522
      this.success = success;
9523
    }
9524
 
9525
    /**
9526
     * Performs a deep copy on <i>other</i>.
9527
     */
1731 ankur.sing 9528
    public getSuccessfulPaymentsAmountRange_result(getSuccessfulPaymentsAmountRange_result other) {
9529
      if (other.isSetSuccess()) {
9530
        List<Double> __this__success = new ArrayList<Double>();
9531
        for (Double other_element : other.success) {
9532
          __this__success.add(other_element);
1629 ankur.sing 9533
        }
1731 ankur.sing 9534
        this.success = __this__success;
1629 ankur.sing 9535
      }
9536
    }
9537
 
1731 ankur.sing 9538
    public getSuccessfulPaymentsAmountRange_result deepCopy() {
9539
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 9540
    }
9541
 
3430 rajveer 9542
    @Override
9543
    public void clear() {
9544
      this.success = null;
1629 ankur.sing 9545
    }
9546
 
1731 ankur.sing 9547
    public int getSuccessSize() {
9548
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 9549
    }
9550
 
1731 ankur.sing 9551
    public java.util.Iterator<Double> getSuccessIterator() {
9552
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 9553
    }
9554
 
1731 ankur.sing 9555
    public void addToSuccess(double elem) {
9556
      if (this.success == null) {
9557
        this.success = new ArrayList<Double>();
1629 ankur.sing 9558
      }
1731 ankur.sing 9559
      this.success.add(elem);
1629 ankur.sing 9560
    }
9561
 
1731 ankur.sing 9562
    public List<Double> getSuccess() {
1629 ankur.sing 9563
      return this.success;
9564
    }
9565
 
3430 rajveer 9566
    public void setSuccess(List<Double> success) {
1629 ankur.sing 9567
      this.success = success;
9568
    }
9569
 
9570
    public void unsetSuccess() {
1731 ankur.sing 9571
      this.success = null;
1629 ankur.sing 9572
    }
9573
 
3430 rajveer 9574
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1629 ankur.sing 9575
    public boolean isSetSuccess() {
1731 ankur.sing 9576
      return this.success != null;
1629 ankur.sing 9577
    }
9578
 
9579
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 9580
      if (!value) {
9581
        this.success = null;
9582
      }
1629 ankur.sing 9583
    }
9584
 
9585
    public void setFieldValue(_Fields field, Object value) {
9586
      switch (field) {
9587
      case SUCCESS:
9588
        if (value == null) {
9589
          unsetSuccess();
9590
        } else {
1731 ankur.sing 9591
          setSuccess((List<Double>)value);
1629 ankur.sing 9592
        }
9593
        break;
9594
 
9595
      }
9596
    }
9597
 
9598
    public Object getFieldValue(_Fields field) {
9599
      switch (field) {
9600
      case SUCCESS:
1731 ankur.sing 9601
        return getSuccess();
1629 ankur.sing 9602
 
9603
      }
9604
      throw new IllegalStateException();
9605
    }
9606
 
3430 rajveer 9607
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9608
    public boolean isSet(_Fields field) {
9609
      if (field == null) {
9610
        throw new IllegalArgumentException();
9611
      }
1629 ankur.sing 9612
 
9613
      switch (field) {
9614
      case SUCCESS:
9615
        return isSetSuccess();
9616
      }
9617
      throw new IllegalStateException();
9618
    }
9619
 
9620
    @Override
9621
    public boolean equals(Object that) {
9622
      if (that == null)
9623
        return false;
1731 ankur.sing 9624
      if (that instanceof getSuccessfulPaymentsAmountRange_result)
9625
        return this.equals((getSuccessfulPaymentsAmountRange_result)that);
1629 ankur.sing 9626
      return false;
9627
    }
9628
 
1731 ankur.sing 9629
    public boolean equals(getSuccessfulPaymentsAmountRange_result that) {
1629 ankur.sing 9630
      if (that == null)
9631
        return false;
9632
 
1731 ankur.sing 9633
      boolean this_present_success = true && this.isSetSuccess();
9634
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 9635
      if (this_present_success || that_present_success) {
9636
        if (!(this_present_success && that_present_success))
9637
          return false;
1731 ankur.sing 9638
        if (!this.success.equals(that.success))
1629 ankur.sing 9639
          return false;
9640
      }
9641
 
9642
      return true;
9643
    }
9644
 
9645
    @Override
9646
    public int hashCode() {
9647
      return 0;
9648
    }
9649
 
1731 ankur.sing 9650
    public int compareTo(getSuccessfulPaymentsAmountRange_result other) {
1629 ankur.sing 9651
      if (!getClass().equals(other.getClass())) {
9652
        return getClass().getName().compareTo(other.getClass().getName());
9653
      }
9654
 
9655
      int lastComparison = 0;
1731 ankur.sing 9656
      getSuccessfulPaymentsAmountRange_result typedOther = (getSuccessfulPaymentsAmountRange_result)other;
1629 ankur.sing 9657
 
3430 rajveer 9658
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1629 ankur.sing 9659
      if (lastComparison != 0) {
9660
        return lastComparison;
9661
      }
3430 rajveer 9662
      if (isSetSuccess()) {
9663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9664
        if (lastComparison != 0) {
9665
          return lastComparison;
9666
        }
1629 ankur.sing 9667
      }
9668
      return 0;
9669
    }
9670
 
3430 rajveer 9671
    public _Fields fieldForId(int fieldId) {
9672
      return _Fields.findByThriftId(fieldId);
9673
    }
9674
 
9675
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9676
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 9677
      iprot.readStructBegin();
9678
      while (true)
9679
      {
9680
        field = iprot.readFieldBegin();
3430 rajveer 9681
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 9682
          break;
9683
        }
3430 rajveer 9684
        switch (field.id) {
9685
          case 0: // SUCCESS
9686
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9687
              {
4141 chandransh 9688
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
9689
                this.success = new ArrayList<Double>(_list32.size);
9690
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
1731 ankur.sing 9691
                {
4141 chandransh 9692
                  double _elem34; // required
9693
                  _elem34 = iprot.readDouble();
9694
                  this.success.add(_elem34);
1731 ankur.sing 9695
                }
3430 rajveer 9696
                iprot.readListEnd();
1629 ankur.sing 9697
              }
3430 rajveer 9698
            } else { 
9699
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9700
            }
9701
            break;
9702
          default:
9703
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 9704
        }
3430 rajveer 9705
        iprot.readFieldEnd();
1629 ankur.sing 9706
      }
9707
      iprot.readStructEnd();
9708
      validate();
9709
    }
9710
 
3430 rajveer 9711
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 9712
      oprot.writeStructBegin(STRUCT_DESC);
9713
 
9714
      if (this.isSetSuccess()) {
9715
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 9716
        {
3430 rajveer 9717
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
4141 chandransh 9718
          for (double _iter35 : this.success)
1731 ankur.sing 9719
          {
4141 chandransh 9720
            oprot.writeDouble(_iter35);
1731 ankur.sing 9721
          }
9722
          oprot.writeListEnd();
9723
        }
1629 ankur.sing 9724
        oprot.writeFieldEnd();
9725
      }
9726
      oprot.writeFieldStop();
9727
      oprot.writeStructEnd();
9728
    }
9729
 
9730
    @Override
9731
    public String toString() {
1731 ankur.sing 9732
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_result(");
1629 ankur.sing 9733
      boolean first = true;
9734
 
9735
      sb.append("success:");
1731 ankur.sing 9736
      if (this.success == null) {
9737
        sb.append("null");
9738
      } else {
9739
        sb.append(this.success);
9740
      }
1629 ankur.sing 9741
      first = false;
9742
      sb.append(")");
9743
      return sb.toString();
9744
    }
9745
 
3430 rajveer 9746
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 9747
      // check for required fields
9748
    }
9749
 
3430 rajveer 9750
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9751
      try {
9752
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9753
      } catch (org.apache.thrift.TException te) {
9754
        throw new java.io.IOException(te);
9755
      }
9756
    }
9757
 
9758
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9759
      try {
9760
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9761
      } catch (org.apache.thrift.TException te) {
9762
        throw new java.io.IOException(te);
9763
      }
9764
    }
9765
 
1629 ankur.sing 9766
  }
9767
 
3430 rajveer 9768
  public static class initializeHdfcPayment_args implements org.apache.thrift.TBase<initializeHdfcPayment_args, initializeHdfcPayment_args._Fields>, java.io.Serializable, Cloneable   {
9769
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_args");
2462 chandransh 9770
 
3430 rajveer 9771
    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 9772
 
3430 rajveer 9773
    private long merchantPaymentId; // required
2462 chandransh 9774
 
9775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9776
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 9777
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
9778
 
9779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9780
 
9781
      static {
9782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9783
          byName.put(field.getFieldName(), field);
9784
        }
9785
      }
9786
 
9787
      /**
9788
       * Find the _Fields constant that matches fieldId, or null if its not found.
9789
       */
9790
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9791
        switch(fieldId) {
9792
          case 1: // MERCHANT_PAYMENT_ID
9793
            return MERCHANT_PAYMENT_ID;
9794
          default:
9795
            return null;
9796
        }
2462 chandransh 9797
      }
9798
 
9799
      /**
9800
       * Find the _Fields constant that matches fieldId, throwing an exception
9801
       * if it is not found.
9802
       */
9803
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9804
        _Fields fields = findByThriftId(fieldId);
9805
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9806
        return fields;
9807
      }
9808
 
9809
      /**
9810
       * Find the _Fields constant that matches name, or null if its not found.
9811
       */
9812
      public static _Fields findByName(String name) {
9813
        return byName.get(name);
9814
      }
9815
 
9816
      private final short _thriftId;
9817
      private final String _fieldName;
9818
 
9819
      _Fields(short thriftId, String fieldName) {
9820
        _thriftId = thriftId;
9821
        _fieldName = fieldName;
9822
      }
9823
 
9824
      public short getThriftFieldId() {
9825
        return _thriftId;
9826
      }
9827
 
9828
      public String getFieldName() {
9829
        return _fieldName;
9830
      }
9831
    }
9832
 
9833
    // isset id assignments
9834
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
9835
    private BitSet __isset_bit_vector = new BitSet(1);
9836
 
3430 rajveer 9837
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 9838
    static {
3430 rajveer 9839
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9840
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9841
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9842
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9843
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_args.class, metaDataMap);
2462 chandransh 9844
    }
9845
 
3010 chandransh 9846
    public initializeHdfcPayment_args() {
2462 chandransh 9847
    }
9848
 
3010 chandransh 9849
    public initializeHdfcPayment_args(
2462 chandransh 9850
      long merchantPaymentId)
9851
    {
9852
      this();
9853
      this.merchantPaymentId = merchantPaymentId;
9854
      setMerchantPaymentIdIsSet(true);
9855
    }
9856
 
9857
    /**
9858
     * Performs a deep copy on <i>other</i>.
9859
     */
3010 chandransh 9860
    public initializeHdfcPayment_args(initializeHdfcPayment_args other) {
2462 chandransh 9861
      __isset_bit_vector.clear();
9862
      __isset_bit_vector.or(other.__isset_bit_vector);
9863
      this.merchantPaymentId = other.merchantPaymentId;
9864
    }
9865
 
3010 chandransh 9866
    public initializeHdfcPayment_args deepCopy() {
9867
      return new initializeHdfcPayment_args(this);
2462 chandransh 9868
    }
9869
 
3430 rajveer 9870
    @Override
9871
    public void clear() {
9872
      setMerchantPaymentIdIsSet(false);
9873
      this.merchantPaymentId = 0;
2462 chandransh 9874
    }
9875
 
9876
    public long getMerchantPaymentId() {
9877
      return this.merchantPaymentId;
9878
    }
9879
 
3430 rajveer 9880
    public void setMerchantPaymentId(long merchantPaymentId) {
2462 chandransh 9881
      this.merchantPaymentId = merchantPaymentId;
9882
      setMerchantPaymentIdIsSet(true);
9883
    }
9884
 
9885
    public void unsetMerchantPaymentId() {
9886
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
9887
    }
9888
 
3430 rajveer 9889
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
2462 chandransh 9890
    public boolean isSetMerchantPaymentId() {
9891
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
9892
    }
9893
 
9894
    public void setMerchantPaymentIdIsSet(boolean value) {
9895
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
9896
    }
9897
 
9898
    public void setFieldValue(_Fields field, Object value) {
9899
      switch (field) {
9900
      case MERCHANT_PAYMENT_ID:
9901
        if (value == null) {
9902
          unsetMerchantPaymentId();
9903
        } else {
9904
          setMerchantPaymentId((Long)value);
9905
        }
9906
        break;
9907
 
9908
      }
9909
    }
9910
 
9911
    public Object getFieldValue(_Fields field) {
9912
      switch (field) {
9913
      case MERCHANT_PAYMENT_ID:
3430 rajveer 9914
        return Long.valueOf(getMerchantPaymentId());
2462 chandransh 9915
 
9916
      }
9917
      throw new IllegalStateException();
9918
    }
9919
 
3430 rajveer 9920
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9921
    public boolean isSet(_Fields field) {
9922
      if (field == null) {
9923
        throw new IllegalArgumentException();
9924
      }
2462 chandransh 9925
 
9926
      switch (field) {
9927
      case MERCHANT_PAYMENT_ID:
9928
        return isSetMerchantPaymentId();
9929
      }
9930
      throw new IllegalStateException();
9931
    }
9932
 
9933
    @Override
9934
    public boolean equals(Object that) {
9935
      if (that == null)
9936
        return false;
3010 chandransh 9937
      if (that instanceof initializeHdfcPayment_args)
9938
        return this.equals((initializeHdfcPayment_args)that);
2462 chandransh 9939
      return false;
9940
    }
9941
 
3010 chandransh 9942
    public boolean equals(initializeHdfcPayment_args that) {
2462 chandransh 9943
      if (that == null)
9944
        return false;
9945
 
9946
      boolean this_present_merchantPaymentId = true;
9947
      boolean that_present_merchantPaymentId = true;
9948
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
9949
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
9950
          return false;
9951
        if (this.merchantPaymentId != that.merchantPaymentId)
9952
          return false;
9953
      }
9954
 
9955
      return true;
9956
    }
9957
 
9958
    @Override
9959
    public int hashCode() {
9960
      return 0;
9961
    }
9962
 
3010 chandransh 9963
    public int compareTo(initializeHdfcPayment_args other) {
2462 chandransh 9964
      if (!getClass().equals(other.getClass())) {
9965
        return getClass().getName().compareTo(other.getClass().getName());
9966
      }
9967
 
9968
      int lastComparison = 0;
3010 chandransh 9969
      initializeHdfcPayment_args typedOther = (initializeHdfcPayment_args)other;
2462 chandransh 9970
 
3430 rajveer 9971
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
2462 chandransh 9972
      if (lastComparison != 0) {
9973
        return lastComparison;
9974
      }
3430 rajveer 9975
      if (isSetMerchantPaymentId()) {
9976
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
9977
        if (lastComparison != 0) {
9978
          return lastComparison;
9979
        }
2462 chandransh 9980
      }
9981
      return 0;
9982
    }
9983
 
3430 rajveer 9984
    public _Fields fieldForId(int fieldId) {
9985
      return _Fields.findByThriftId(fieldId);
9986
    }
9987
 
9988
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9989
      org.apache.thrift.protocol.TField field;
2462 chandransh 9990
      iprot.readStructBegin();
9991
      while (true)
9992
      {
9993
        field = iprot.readFieldBegin();
3430 rajveer 9994
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 9995
          break;
9996
        }
3430 rajveer 9997
        switch (field.id) {
9998
          case 1: // MERCHANT_PAYMENT_ID
9999
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10000
              this.merchantPaymentId = iprot.readI64();
10001
              setMerchantPaymentIdIsSet(true);
10002
            } else { 
10003
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10004
            }
10005
            break;
10006
          default:
10007
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 10008
        }
3430 rajveer 10009
        iprot.readFieldEnd();
2462 chandransh 10010
      }
10011
      iprot.readStructEnd();
10012
      validate();
10013
    }
10014
 
3430 rajveer 10015
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 10016
      validate();
10017
 
10018
      oprot.writeStructBegin(STRUCT_DESC);
10019
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
10020
      oprot.writeI64(this.merchantPaymentId);
10021
      oprot.writeFieldEnd();
10022
      oprot.writeFieldStop();
10023
      oprot.writeStructEnd();
10024
    }
10025
 
10026
    @Override
10027
    public String toString() {
3010 chandransh 10028
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_args(");
2462 chandransh 10029
      boolean first = true;
10030
 
10031
      sb.append("merchantPaymentId:");
10032
      sb.append(this.merchantPaymentId);
10033
      first = false;
10034
      sb.append(")");
10035
      return sb.toString();
10036
    }
10037
 
3430 rajveer 10038
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 10039
      // check for required fields
10040
    }
10041
 
3430 rajveer 10042
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10043
      try {
10044
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10045
      } catch (org.apache.thrift.TException te) {
10046
        throw new java.io.IOException(te);
10047
      }
10048
    }
10049
 
10050
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10051
      try {
10052
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10053
      } catch (org.apache.thrift.TException te) {
10054
        throw new java.io.IOException(te);
10055
      }
10056
    }
10057
 
2462 chandransh 10058
  }
10059
 
3430 rajveer 10060
  public static class initializeHdfcPayment_result implements org.apache.thrift.TBase<initializeHdfcPayment_result, initializeHdfcPayment_result._Fields>, java.io.Serializable, Cloneable   {
10061
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_result");
2462 chandransh 10062
 
3430 rajveer 10063
    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);
10064
    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 10065
 
3430 rajveer 10066
    private String success; // required
10067
    private PaymentException pe; // required
2462 chandransh 10068
 
10069
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10070
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 10071
      SUCCESS((short)0, "success"),
10072
      PE((short)1, "pe");
10073
 
10074
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10075
 
10076
      static {
10077
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10078
          byName.put(field.getFieldName(), field);
10079
        }
10080
      }
10081
 
10082
      /**
10083
       * Find the _Fields constant that matches fieldId, or null if its not found.
10084
       */
10085
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10086
        switch(fieldId) {
10087
          case 0: // SUCCESS
10088
            return SUCCESS;
10089
          case 1: // PE
10090
            return PE;
10091
          default:
10092
            return null;
10093
        }
2462 chandransh 10094
      }
10095
 
10096
      /**
10097
       * Find the _Fields constant that matches fieldId, throwing an exception
10098
       * if it is not found.
10099
       */
10100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10101
        _Fields fields = findByThriftId(fieldId);
10102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10103
        return fields;
10104
      }
10105
 
10106
      /**
10107
       * Find the _Fields constant that matches name, or null if its not found.
10108
       */
10109
      public static _Fields findByName(String name) {
10110
        return byName.get(name);
10111
      }
10112
 
10113
      private final short _thriftId;
10114
      private final String _fieldName;
10115
 
10116
      _Fields(short thriftId, String fieldName) {
10117
        _thriftId = thriftId;
10118
        _fieldName = fieldName;
10119
      }
10120
 
10121
      public short getThriftFieldId() {
10122
        return _thriftId;
10123
      }
10124
 
10125
      public String getFieldName() {
10126
        return _fieldName;
10127
      }
10128
    }
10129
 
10130
    // isset id assignments
10131
 
3430 rajveer 10132
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 10133
    static {
3430 rajveer 10134
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10135
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10136
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10137
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10138
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10139
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10140
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_result.class, metaDataMap);
2462 chandransh 10141
    }
10142
 
3010 chandransh 10143
    public initializeHdfcPayment_result() {
2462 chandransh 10144
    }
10145
 
3010 chandransh 10146
    public initializeHdfcPayment_result(
10147
      String success,
2462 chandransh 10148
      PaymentException pe)
10149
    {
10150
      this();
10151
      this.success = success;
10152
      this.pe = pe;
10153
    }
10154
 
10155
    /**
10156
     * Performs a deep copy on <i>other</i>.
10157
     */
3010 chandransh 10158
    public initializeHdfcPayment_result(initializeHdfcPayment_result other) {
2462 chandransh 10159
      if (other.isSetSuccess()) {
3010 chandransh 10160
        this.success = other.success;
2462 chandransh 10161
      }
10162
      if (other.isSetPe()) {
10163
        this.pe = new PaymentException(other.pe);
10164
      }
10165
    }
10166
 
3010 chandransh 10167
    public initializeHdfcPayment_result deepCopy() {
10168
      return new initializeHdfcPayment_result(this);
2462 chandransh 10169
    }
10170
 
3430 rajveer 10171
    @Override
10172
    public void clear() {
10173
      this.success = null;
10174
      this.pe = null;
2462 chandransh 10175
    }
10176
 
3010 chandransh 10177
    public String getSuccess() {
2462 chandransh 10178
      return this.success;
10179
    }
10180
 
3430 rajveer 10181
    public void setSuccess(String success) {
2462 chandransh 10182
      this.success = success;
10183
    }
10184
 
10185
    public void unsetSuccess() {
10186
      this.success = null;
10187
    }
10188
 
3430 rajveer 10189
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 10190
    public boolean isSetSuccess() {
10191
      return this.success != null;
10192
    }
10193
 
10194
    public void setSuccessIsSet(boolean value) {
10195
      if (!value) {
10196
        this.success = null;
10197
      }
10198
    }
10199
 
10200
    public PaymentException getPe() {
10201
      return this.pe;
10202
    }
10203
 
3430 rajveer 10204
    public void setPe(PaymentException pe) {
2462 chandransh 10205
      this.pe = pe;
10206
    }
10207
 
10208
    public void unsetPe() {
10209
      this.pe = null;
10210
    }
10211
 
3430 rajveer 10212
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 10213
    public boolean isSetPe() {
10214
      return this.pe != null;
10215
    }
10216
 
10217
    public void setPeIsSet(boolean value) {
10218
      if (!value) {
10219
        this.pe = null;
10220
      }
10221
    }
10222
 
10223
    public void setFieldValue(_Fields field, Object value) {
10224
      switch (field) {
10225
      case SUCCESS:
10226
        if (value == null) {
10227
          unsetSuccess();
10228
        } else {
3010 chandransh 10229
          setSuccess((String)value);
2462 chandransh 10230
        }
10231
        break;
10232
 
10233
      case PE:
10234
        if (value == null) {
10235
          unsetPe();
10236
        } else {
10237
          setPe((PaymentException)value);
10238
        }
10239
        break;
10240
 
10241
      }
10242
    }
10243
 
10244
    public Object getFieldValue(_Fields field) {
10245
      switch (field) {
10246
      case SUCCESS:
10247
        return getSuccess();
10248
 
10249
      case PE:
10250
        return getPe();
10251
 
10252
      }
10253
      throw new IllegalStateException();
10254
    }
10255
 
3430 rajveer 10256
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10257
    public boolean isSet(_Fields field) {
10258
      if (field == null) {
10259
        throw new IllegalArgumentException();
10260
      }
2462 chandransh 10261
 
10262
      switch (field) {
10263
      case SUCCESS:
10264
        return isSetSuccess();
10265
      case PE:
10266
        return isSetPe();
10267
      }
10268
      throw new IllegalStateException();
10269
    }
10270
 
10271
    @Override
10272
    public boolean equals(Object that) {
10273
      if (that == null)
10274
        return false;
3010 chandransh 10275
      if (that instanceof initializeHdfcPayment_result)
10276
        return this.equals((initializeHdfcPayment_result)that);
2462 chandransh 10277
      return false;
10278
    }
10279
 
3010 chandransh 10280
    public boolean equals(initializeHdfcPayment_result that) {
2462 chandransh 10281
      if (that == null)
10282
        return false;
10283
 
10284
      boolean this_present_success = true && this.isSetSuccess();
10285
      boolean that_present_success = true && that.isSetSuccess();
10286
      if (this_present_success || that_present_success) {
10287
        if (!(this_present_success && that_present_success))
10288
          return false;
10289
        if (!this.success.equals(that.success))
10290
          return false;
10291
      }
10292
 
10293
      boolean this_present_pe = true && this.isSetPe();
10294
      boolean that_present_pe = true && that.isSetPe();
10295
      if (this_present_pe || that_present_pe) {
10296
        if (!(this_present_pe && that_present_pe))
10297
          return false;
10298
        if (!this.pe.equals(that.pe))
10299
          return false;
10300
      }
10301
 
10302
      return true;
10303
    }
10304
 
10305
    @Override
10306
    public int hashCode() {
10307
      return 0;
10308
    }
10309
 
3010 chandransh 10310
    public int compareTo(initializeHdfcPayment_result other) {
10311
      if (!getClass().equals(other.getClass())) {
10312
        return getClass().getName().compareTo(other.getClass().getName());
10313
      }
10314
 
10315
      int lastComparison = 0;
10316
      initializeHdfcPayment_result typedOther = (initializeHdfcPayment_result)other;
10317
 
3430 rajveer 10318
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3010 chandransh 10319
      if (lastComparison != 0) {
10320
        return lastComparison;
10321
      }
3430 rajveer 10322
      if (isSetSuccess()) {
10323
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10324
        if (lastComparison != 0) {
10325
          return lastComparison;
10326
        }
3010 chandransh 10327
      }
3430 rajveer 10328
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
3010 chandransh 10329
      if (lastComparison != 0) {
10330
        return lastComparison;
10331
      }
3430 rajveer 10332
      if (isSetPe()) {
10333
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
10334
        if (lastComparison != 0) {
10335
          return lastComparison;
10336
        }
3010 chandransh 10337
      }
10338
      return 0;
10339
    }
10340
 
3430 rajveer 10341
    public _Fields fieldForId(int fieldId) {
10342
      return _Fields.findByThriftId(fieldId);
10343
    }
10344
 
10345
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10346
      org.apache.thrift.protocol.TField field;
2462 chandransh 10347
      iprot.readStructBegin();
10348
      while (true)
10349
      {
10350
        field = iprot.readFieldBegin();
3430 rajveer 10351
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 10352
          break;
10353
        }
3430 rajveer 10354
        switch (field.id) {
10355
          case 0: // SUCCESS
10356
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10357
              this.success = iprot.readString();
10358
            } else { 
10359
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10360
            }
10361
            break;
10362
          case 1: // PE
10363
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10364
              this.pe = new PaymentException();
10365
              this.pe.read(iprot);
10366
            } else { 
10367
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10368
            }
10369
            break;
10370
          default:
10371
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 10372
        }
3430 rajveer 10373
        iprot.readFieldEnd();
2462 chandransh 10374
      }
10375
      iprot.readStructEnd();
10376
      validate();
10377
    }
10378
 
3430 rajveer 10379
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 10380
      oprot.writeStructBegin(STRUCT_DESC);
10381
 
10382
      if (this.isSetSuccess()) {
10383
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 10384
        oprot.writeString(this.success);
2462 chandransh 10385
        oprot.writeFieldEnd();
10386
      } else if (this.isSetPe()) {
10387
        oprot.writeFieldBegin(PE_FIELD_DESC);
10388
        this.pe.write(oprot);
10389
        oprot.writeFieldEnd();
10390
      }
10391
      oprot.writeFieldStop();
10392
      oprot.writeStructEnd();
10393
    }
10394
 
10395
    @Override
10396
    public String toString() {
3010 chandransh 10397
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_result(");
2462 chandransh 10398
      boolean first = true;
10399
 
10400
      sb.append("success:");
10401
      if (this.success == null) {
10402
        sb.append("null");
10403
      } else {
10404
        sb.append(this.success);
10405
      }
10406
      first = false;
10407
      if (!first) sb.append(", ");
10408
      sb.append("pe:");
10409
      if (this.pe == null) {
10410
        sb.append("null");
10411
      } else {
10412
        sb.append(this.pe);
10413
      }
10414
      first = false;
10415
      sb.append(")");
10416
      return sb.toString();
10417
    }
10418
 
3430 rajveer 10419
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 10420
      // check for required fields
10421
    }
10422
 
3430 rajveer 10423
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10424
      try {
10425
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10426
      } catch (org.apache.thrift.TException te) {
10427
        throw new java.io.IOException(te);
10428
      }
10429
    }
10430
 
10431
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10432
      try {
10433
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10434
      } catch (org.apache.thrift.TException te) {
10435
        throw new java.io.IOException(te);
10436
      }
10437
    }
10438
 
2462 chandransh 10439
  }
10440
 
3616 chandransh 10441
  public static class initializeHdfcEmiPayment_args implements org.apache.thrift.TBase<initializeHdfcEmiPayment_args, initializeHdfcEmiPayment_args._Fields>, java.io.Serializable, Cloneable   {
10442
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_args");
10443
 
10444
    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);
10445
 
10446
    private long merchantPaymentId; // required
10447
 
10448
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10449
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10450
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
10451
 
10452
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10453
 
10454
      static {
10455
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10456
          byName.put(field.getFieldName(), field);
10457
        }
10458
      }
10459
 
10460
      /**
10461
       * Find the _Fields constant that matches fieldId, or null if its not found.
10462
       */
10463
      public static _Fields findByThriftId(int fieldId) {
10464
        switch(fieldId) {
10465
          case 1: // MERCHANT_PAYMENT_ID
10466
            return MERCHANT_PAYMENT_ID;
10467
          default:
10468
            return null;
10469
        }
10470
      }
10471
 
10472
      /**
10473
       * Find the _Fields constant that matches fieldId, throwing an exception
10474
       * if it is not found.
10475
       */
10476
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10477
        _Fields fields = findByThriftId(fieldId);
10478
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10479
        return fields;
10480
      }
10481
 
10482
      /**
10483
       * Find the _Fields constant that matches name, or null if its not found.
10484
       */
10485
      public static _Fields findByName(String name) {
10486
        return byName.get(name);
10487
      }
10488
 
10489
      private final short _thriftId;
10490
      private final String _fieldName;
10491
 
10492
      _Fields(short thriftId, String fieldName) {
10493
        _thriftId = thriftId;
10494
        _fieldName = fieldName;
10495
      }
10496
 
10497
      public short getThriftFieldId() {
10498
        return _thriftId;
10499
      }
10500
 
10501
      public String getFieldName() {
10502
        return _fieldName;
10503
      }
10504
    }
10505
 
10506
    // isset id assignments
10507
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
10508
    private BitSet __isset_bit_vector = new BitSet(1);
10509
 
10510
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10511
    static {
10512
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10513
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10514
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10515
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10516
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_args.class, metaDataMap);
10517
    }
10518
 
10519
    public initializeHdfcEmiPayment_args() {
10520
    }
10521
 
10522
    public initializeHdfcEmiPayment_args(
10523
      long merchantPaymentId)
10524
    {
10525
      this();
10526
      this.merchantPaymentId = merchantPaymentId;
10527
      setMerchantPaymentIdIsSet(true);
10528
    }
10529
 
10530
    /**
10531
     * Performs a deep copy on <i>other</i>.
10532
     */
10533
    public initializeHdfcEmiPayment_args(initializeHdfcEmiPayment_args other) {
10534
      __isset_bit_vector.clear();
10535
      __isset_bit_vector.or(other.__isset_bit_vector);
10536
      this.merchantPaymentId = other.merchantPaymentId;
10537
    }
10538
 
10539
    public initializeHdfcEmiPayment_args deepCopy() {
10540
      return new initializeHdfcEmiPayment_args(this);
10541
    }
10542
 
10543
    @Override
10544
    public void clear() {
10545
      setMerchantPaymentIdIsSet(false);
10546
      this.merchantPaymentId = 0;
10547
    }
10548
 
10549
    public long getMerchantPaymentId() {
10550
      return this.merchantPaymentId;
10551
    }
10552
 
10553
    public void setMerchantPaymentId(long merchantPaymentId) {
10554
      this.merchantPaymentId = merchantPaymentId;
10555
      setMerchantPaymentIdIsSet(true);
10556
    }
10557
 
10558
    public void unsetMerchantPaymentId() {
10559
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
10560
    }
10561
 
10562
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
10563
    public boolean isSetMerchantPaymentId() {
10564
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
10565
    }
10566
 
10567
    public void setMerchantPaymentIdIsSet(boolean value) {
10568
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
10569
    }
10570
 
10571
    public void setFieldValue(_Fields field, Object value) {
10572
      switch (field) {
10573
      case MERCHANT_PAYMENT_ID:
10574
        if (value == null) {
10575
          unsetMerchantPaymentId();
10576
        } else {
10577
          setMerchantPaymentId((Long)value);
10578
        }
10579
        break;
10580
 
10581
      }
10582
    }
10583
 
10584
    public Object getFieldValue(_Fields field) {
10585
      switch (field) {
10586
      case MERCHANT_PAYMENT_ID:
10587
        return Long.valueOf(getMerchantPaymentId());
10588
 
10589
      }
10590
      throw new IllegalStateException();
10591
    }
10592
 
10593
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10594
    public boolean isSet(_Fields field) {
10595
      if (field == null) {
10596
        throw new IllegalArgumentException();
10597
      }
10598
 
10599
      switch (field) {
10600
      case MERCHANT_PAYMENT_ID:
10601
        return isSetMerchantPaymentId();
10602
      }
10603
      throw new IllegalStateException();
10604
    }
10605
 
10606
    @Override
10607
    public boolean equals(Object that) {
10608
      if (that == null)
10609
        return false;
10610
      if (that instanceof initializeHdfcEmiPayment_args)
10611
        return this.equals((initializeHdfcEmiPayment_args)that);
10612
      return false;
10613
    }
10614
 
10615
    public boolean equals(initializeHdfcEmiPayment_args that) {
10616
      if (that == null)
10617
        return false;
10618
 
10619
      boolean this_present_merchantPaymentId = true;
10620
      boolean that_present_merchantPaymentId = true;
10621
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
10622
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
10623
          return false;
10624
        if (this.merchantPaymentId != that.merchantPaymentId)
10625
          return false;
10626
      }
10627
 
10628
      return true;
10629
    }
10630
 
10631
    @Override
10632
    public int hashCode() {
10633
      return 0;
10634
    }
10635
 
10636
    public int compareTo(initializeHdfcEmiPayment_args other) {
10637
      if (!getClass().equals(other.getClass())) {
10638
        return getClass().getName().compareTo(other.getClass().getName());
10639
      }
10640
 
10641
      int lastComparison = 0;
10642
      initializeHdfcEmiPayment_args typedOther = (initializeHdfcEmiPayment_args)other;
10643
 
10644
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
10645
      if (lastComparison != 0) {
10646
        return lastComparison;
10647
      }
10648
      if (isSetMerchantPaymentId()) {
10649
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
10650
        if (lastComparison != 0) {
10651
          return lastComparison;
10652
        }
10653
      }
10654
      return 0;
10655
    }
10656
 
10657
    public _Fields fieldForId(int fieldId) {
10658
      return _Fields.findByThriftId(fieldId);
10659
    }
10660
 
10661
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10662
      org.apache.thrift.protocol.TField field;
10663
      iprot.readStructBegin();
10664
      while (true)
10665
      {
10666
        field = iprot.readFieldBegin();
10667
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10668
          break;
10669
        }
10670
        switch (field.id) {
10671
          case 1: // MERCHANT_PAYMENT_ID
10672
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10673
              this.merchantPaymentId = iprot.readI64();
10674
              setMerchantPaymentIdIsSet(true);
10675
            } else { 
10676
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10677
            }
10678
            break;
10679
          default:
10680
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10681
        }
10682
        iprot.readFieldEnd();
10683
      }
10684
      iprot.readStructEnd();
10685
      validate();
10686
    }
10687
 
10688
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10689
      validate();
10690
 
10691
      oprot.writeStructBegin(STRUCT_DESC);
10692
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
10693
      oprot.writeI64(this.merchantPaymentId);
10694
      oprot.writeFieldEnd();
10695
      oprot.writeFieldStop();
10696
      oprot.writeStructEnd();
10697
    }
10698
 
10699
    @Override
10700
    public String toString() {
10701
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_args(");
10702
      boolean first = true;
10703
 
10704
      sb.append("merchantPaymentId:");
10705
      sb.append(this.merchantPaymentId);
10706
      first = false;
10707
      sb.append(")");
10708
      return sb.toString();
10709
    }
10710
 
10711
    public void validate() throws org.apache.thrift.TException {
10712
      // check for required fields
10713
    }
10714
 
10715
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10716
      try {
10717
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10718
      } catch (org.apache.thrift.TException te) {
10719
        throw new java.io.IOException(te);
10720
      }
10721
    }
10722
 
10723
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10724
      try {
10725
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10726
      } catch (org.apache.thrift.TException te) {
10727
        throw new java.io.IOException(te);
10728
      }
10729
    }
10730
 
10731
  }
10732
 
10733
  public static class initializeHdfcEmiPayment_result implements org.apache.thrift.TBase<initializeHdfcEmiPayment_result, initializeHdfcEmiPayment_result._Fields>, java.io.Serializable, Cloneable   {
10734
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_result");
10735
 
10736
    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);
10737
    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);
10738
 
10739
    private String success; // required
10740
    private PaymentException pe; // required
10741
 
10742
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10743
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10744
      SUCCESS((short)0, "success"),
10745
      PE((short)1, "pe");
10746
 
10747
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10748
 
10749
      static {
10750
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10751
          byName.put(field.getFieldName(), field);
10752
        }
10753
      }
10754
 
10755
      /**
10756
       * Find the _Fields constant that matches fieldId, or null if its not found.
10757
       */
10758
      public static _Fields findByThriftId(int fieldId) {
10759
        switch(fieldId) {
10760
          case 0: // SUCCESS
10761
            return SUCCESS;
10762
          case 1: // PE
10763
            return PE;
10764
          default:
10765
            return null;
10766
        }
10767
      }
10768
 
10769
      /**
10770
       * Find the _Fields constant that matches fieldId, throwing an exception
10771
       * if it is not found.
10772
       */
10773
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10774
        _Fields fields = findByThriftId(fieldId);
10775
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10776
        return fields;
10777
      }
10778
 
10779
      /**
10780
       * Find the _Fields constant that matches name, or null if its not found.
10781
       */
10782
      public static _Fields findByName(String name) {
10783
        return byName.get(name);
10784
      }
10785
 
10786
      private final short _thriftId;
10787
      private final String _fieldName;
10788
 
10789
      _Fields(short thriftId, String fieldName) {
10790
        _thriftId = thriftId;
10791
        _fieldName = fieldName;
10792
      }
10793
 
10794
      public short getThriftFieldId() {
10795
        return _thriftId;
10796
      }
10797
 
10798
      public String getFieldName() {
10799
        return _fieldName;
10800
      }
10801
    }
10802
 
10803
    // isset id assignments
10804
 
10805
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10806
    static {
10807
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10808
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10809
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10810
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10811
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10812
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10813
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_result.class, metaDataMap);
10814
    }
10815
 
10816
    public initializeHdfcEmiPayment_result() {
10817
    }
10818
 
10819
    public initializeHdfcEmiPayment_result(
10820
      String success,
10821
      PaymentException pe)
10822
    {
10823
      this();
10824
      this.success = success;
10825
      this.pe = pe;
10826
    }
10827
 
10828
    /**
10829
     * Performs a deep copy on <i>other</i>.
10830
     */
10831
    public initializeHdfcEmiPayment_result(initializeHdfcEmiPayment_result other) {
10832
      if (other.isSetSuccess()) {
10833
        this.success = other.success;
10834
      }
10835
      if (other.isSetPe()) {
10836
        this.pe = new PaymentException(other.pe);
10837
      }
10838
    }
10839
 
10840
    public initializeHdfcEmiPayment_result deepCopy() {
10841
      return new initializeHdfcEmiPayment_result(this);
10842
    }
10843
 
10844
    @Override
10845
    public void clear() {
10846
      this.success = null;
10847
      this.pe = null;
10848
    }
10849
 
10850
    public String getSuccess() {
10851
      return this.success;
10852
    }
10853
 
10854
    public void setSuccess(String success) {
10855
      this.success = success;
10856
    }
10857
 
10858
    public void unsetSuccess() {
10859
      this.success = null;
10860
    }
10861
 
10862
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10863
    public boolean isSetSuccess() {
10864
      return this.success != null;
10865
    }
10866
 
10867
    public void setSuccessIsSet(boolean value) {
10868
      if (!value) {
10869
        this.success = null;
10870
      }
10871
    }
10872
 
10873
    public PaymentException getPe() {
10874
      return this.pe;
10875
    }
10876
 
10877
    public void setPe(PaymentException pe) {
10878
      this.pe = pe;
10879
    }
10880
 
10881
    public void unsetPe() {
10882
      this.pe = null;
10883
    }
10884
 
10885
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
10886
    public boolean isSetPe() {
10887
      return this.pe != null;
10888
    }
10889
 
10890
    public void setPeIsSet(boolean value) {
10891
      if (!value) {
10892
        this.pe = null;
10893
      }
10894
    }
10895
 
10896
    public void setFieldValue(_Fields field, Object value) {
10897
      switch (field) {
10898
      case SUCCESS:
10899
        if (value == null) {
10900
          unsetSuccess();
10901
        } else {
10902
          setSuccess((String)value);
10903
        }
10904
        break;
10905
 
10906
      case PE:
10907
        if (value == null) {
10908
          unsetPe();
10909
        } else {
10910
          setPe((PaymentException)value);
10911
        }
10912
        break;
10913
 
10914
      }
10915
    }
10916
 
10917
    public Object getFieldValue(_Fields field) {
10918
      switch (field) {
10919
      case SUCCESS:
10920
        return getSuccess();
10921
 
10922
      case PE:
10923
        return getPe();
10924
 
10925
      }
10926
      throw new IllegalStateException();
10927
    }
10928
 
10929
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10930
    public boolean isSet(_Fields field) {
10931
      if (field == null) {
10932
        throw new IllegalArgumentException();
10933
      }
10934
 
10935
      switch (field) {
10936
      case SUCCESS:
10937
        return isSetSuccess();
10938
      case PE:
10939
        return isSetPe();
10940
      }
10941
      throw new IllegalStateException();
10942
    }
10943
 
10944
    @Override
10945
    public boolean equals(Object that) {
10946
      if (that == null)
10947
        return false;
10948
      if (that instanceof initializeHdfcEmiPayment_result)
10949
        return this.equals((initializeHdfcEmiPayment_result)that);
10950
      return false;
10951
    }
10952
 
10953
    public boolean equals(initializeHdfcEmiPayment_result that) {
10954
      if (that == null)
10955
        return false;
10956
 
10957
      boolean this_present_success = true && this.isSetSuccess();
10958
      boolean that_present_success = true && that.isSetSuccess();
10959
      if (this_present_success || that_present_success) {
10960
        if (!(this_present_success && that_present_success))
10961
          return false;
10962
        if (!this.success.equals(that.success))
10963
          return false;
10964
      }
10965
 
10966
      boolean this_present_pe = true && this.isSetPe();
10967
      boolean that_present_pe = true && that.isSetPe();
10968
      if (this_present_pe || that_present_pe) {
10969
        if (!(this_present_pe && that_present_pe))
10970
          return false;
10971
        if (!this.pe.equals(that.pe))
10972
          return false;
10973
      }
10974
 
10975
      return true;
10976
    }
10977
 
10978
    @Override
10979
    public int hashCode() {
10980
      return 0;
10981
    }
10982
 
10983
    public int compareTo(initializeHdfcEmiPayment_result other) {
10984
      if (!getClass().equals(other.getClass())) {
10985
        return getClass().getName().compareTo(other.getClass().getName());
10986
      }
10987
 
10988
      int lastComparison = 0;
10989
      initializeHdfcEmiPayment_result typedOther = (initializeHdfcEmiPayment_result)other;
10990
 
10991
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10992
      if (lastComparison != 0) {
10993
        return lastComparison;
10994
      }
10995
      if (isSetSuccess()) {
10996
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10997
        if (lastComparison != 0) {
10998
          return lastComparison;
10999
        }
11000
      }
11001
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
11002
      if (lastComparison != 0) {
11003
        return lastComparison;
11004
      }
11005
      if (isSetPe()) {
11006
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
11007
        if (lastComparison != 0) {
11008
          return lastComparison;
11009
        }
11010
      }
11011
      return 0;
11012
    }
11013
 
11014
    public _Fields fieldForId(int fieldId) {
11015
      return _Fields.findByThriftId(fieldId);
11016
    }
11017
 
11018
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11019
      org.apache.thrift.protocol.TField field;
11020
      iprot.readStructBegin();
11021
      while (true)
11022
      {
11023
        field = iprot.readFieldBegin();
11024
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11025
          break;
11026
        }
11027
        switch (field.id) {
11028
          case 0: // SUCCESS
11029
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11030
              this.success = iprot.readString();
11031
            } else { 
11032
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11033
            }
11034
            break;
11035
          case 1: // PE
11036
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11037
              this.pe = new PaymentException();
11038
              this.pe.read(iprot);
11039
            } else { 
11040
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11041
            }
11042
            break;
11043
          default:
11044
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11045
        }
11046
        iprot.readFieldEnd();
11047
      }
11048
      iprot.readStructEnd();
11049
      validate();
11050
    }
11051
 
11052
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11053
      oprot.writeStructBegin(STRUCT_DESC);
11054
 
11055
      if (this.isSetSuccess()) {
11056
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11057
        oprot.writeString(this.success);
11058
        oprot.writeFieldEnd();
11059
      } else if (this.isSetPe()) {
11060
        oprot.writeFieldBegin(PE_FIELD_DESC);
11061
        this.pe.write(oprot);
11062
        oprot.writeFieldEnd();
11063
      }
11064
      oprot.writeFieldStop();
11065
      oprot.writeStructEnd();
11066
    }
11067
 
11068
    @Override
11069
    public String toString() {
11070
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_result(");
11071
      boolean first = true;
11072
 
11073
      sb.append("success:");
11074
      if (this.success == null) {
11075
        sb.append("null");
11076
      } else {
11077
        sb.append(this.success);
11078
      }
11079
      first = false;
11080
      if (!first) sb.append(", ");
11081
      sb.append("pe:");
11082
      if (this.pe == null) {
11083
        sb.append("null");
11084
      } else {
11085
        sb.append(this.pe);
11086
      }
11087
      first = false;
11088
      sb.append(")");
11089
      return sb.toString();
11090
    }
11091
 
11092
    public void validate() throws org.apache.thrift.TException {
11093
      // check for required fields
11094
    }
11095
 
11096
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11097
      try {
11098
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11099
      } catch (org.apache.thrift.TException te) {
11100
        throw new java.io.IOException(te);
11101
      }
11102
    }
11103
 
11104
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11105
      try {
11106
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11107
      } catch (org.apache.thrift.TException te) {
11108
        throw new java.io.IOException(te);
11109
      }
11110
    }
11111
 
11112
  }
11113
 
3430 rajveer 11114
  public static class createRefund_args implements org.apache.thrift.TBase<createRefund_args, createRefund_args._Fields>, java.io.Serializable, Cloneable   {
11115
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_args");
2462 chandransh 11116
 
3430 rajveer 11117
    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);
11118
    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);
11119
    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 11120
 
3430 rajveer 11121
    private long orderId; // required
11122
    private long merchantTxnId; // required
11123
    private double amount; // required
2462 chandransh 11124
 
11125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11126
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 11127
      ORDER_ID((short)1, "orderId"),
11128
      MERCHANT_TXN_ID((short)2, "merchantTxnId"),
11129
      AMOUNT((short)3, "amount");
2462 chandransh 11130
 
11131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11132
 
11133
      static {
11134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11135
          byName.put(field.getFieldName(), field);
11136
        }
11137
      }
11138
 
11139
      /**
11140
       * Find the _Fields constant that matches fieldId, or null if its not found.
11141
       */
11142
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11143
        switch(fieldId) {
11144
          case 1: // ORDER_ID
11145
            return ORDER_ID;
11146
          case 2: // MERCHANT_TXN_ID
11147
            return MERCHANT_TXN_ID;
11148
          case 3: // AMOUNT
11149
            return AMOUNT;
11150
          default:
11151
            return null;
11152
        }
2462 chandransh 11153
      }
11154
 
11155
      /**
11156
       * Find the _Fields constant that matches fieldId, throwing an exception
11157
       * if it is not found.
11158
       */
11159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11160
        _Fields fields = findByThriftId(fieldId);
11161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11162
        return fields;
11163
      }
11164
 
11165
      /**
11166
       * Find the _Fields constant that matches name, or null if its not found.
11167
       */
11168
      public static _Fields findByName(String name) {
11169
        return byName.get(name);
11170
      }
11171
 
11172
      private final short _thriftId;
11173
      private final String _fieldName;
11174
 
11175
      _Fields(short thriftId, String fieldName) {
11176
        _thriftId = thriftId;
11177
        _fieldName = fieldName;
11178
      }
11179
 
11180
      public short getThriftFieldId() {
11181
        return _thriftId;
11182
      }
11183
 
11184
      public String getFieldName() {
11185
        return _fieldName;
11186
      }
11187
    }
11188
 
11189
    // isset id assignments
3010 chandransh 11190
    private static final int __ORDERID_ISSET_ID = 0;
11191
    private static final int __MERCHANTTXNID_ISSET_ID = 1;
11192
    private static final int __AMOUNT_ISSET_ID = 2;
11193
    private BitSet __isset_bit_vector = new BitSet(3);
2462 chandransh 11194
 
3430 rajveer 11195
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 11196
    static {
3430 rajveer 11197
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11198
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11199
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11200
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11201
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11202
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11203
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11204
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11205
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_args.class, metaDataMap);
2462 chandransh 11206
    }
11207
 
3010 chandransh 11208
    public createRefund_args() {
2462 chandransh 11209
    }
11210
 
3010 chandransh 11211
    public createRefund_args(
11212
      long orderId,
11213
      long merchantTxnId,
11214
      double amount)
2462 chandransh 11215
    {
11216
      this();
3010 chandransh 11217
      this.orderId = orderId;
11218
      setOrderIdIsSet(true);
11219
      this.merchantTxnId = merchantTxnId;
11220
      setMerchantTxnIdIsSet(true);
11221
      this.amount = amount;
11222
      setAmountIsSet(true);
2462 chandransh 11223
    }
11224
 
11225
    /**
11226
     * Performs a deep copy on <i>other</i>.
11227
     */
3010 chandransh 11228
    public createRefund_args(createRefund_args other) {
2462 chandransh 11229
      __isset_bit_vector.clear();
11230
      __isset_bit_vector.or(other.__isset_bit_vector);
3010 chandransh 11231
      this.orderId = other.orderId;
11232
      this.merchantTxnId = other.merchantTxnId;
11233
      this.amount = other.amount;
2462 chandransh 11234
    }
11235
 
3010 chandransh 11236
    public createRefund_args deepCopy() {
11237
      return new createRefund_args(this);
2462 chandransh 11238
    }
11239
 
3430 rajveer 11240
    @Override
11241
    public void clear() {
11242
      setOrderIdIsSet(false);
11243
      this.orderId = 0;
11244
      setMerchantTxnIdIsSet(false);
11245
      this.merchantTxnId = 0;
11246
      setAmountIsSet(false);
11247
      this.amount = 0.0;
2462 chandransh 11248
    }
11249
 
3010 chandransh 11250
    public long getOrderId() {
11251
      return this.orderId;
2462 chandransh 11252
    }
11253
 
3430 rajveer 11254
    public void setOrderId(long orderId) {
3010 chandransh 11255
      this.orderId = orderId;
11256
      setOrderIdIsSet(true);
2462 chandransh 11257
    }
11258
 
3010 chandransh 11259
    public void unsetOrderId() {
11260
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2462 chandransh 11261
    }
11262
 
3430 rajveer 11263
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
3010 chandransh 11264
    public boolean isSetOrderId() {
11265
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2462 chandransh 11266
    }
11267
 
3010 chandransh 11268
    public void setOrderIdIsSet(boolean value) {
11269
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2462 chandransh 11270
    }
11271
 
3010 chandransh 11272
    public long getMerchantTxnId() {
11273
      return this.merchantTxnId;
11274
    }
11275
 
3430 rajveer 11276
    public void setMerchantTxnId(long merchantTxnId) {
3010 chandransh 11277
      this.merchantTxnId = merchantTxnId;
11278
      setMerchantTxnIdIsSet(true);
11279
    }
11280
 
11281
    public void unsetMerchantTxnId() {
11282
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
11283
    }
11284
 
3430 rajveer 11285
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
3010 chandransh 11286
    public boolean isSetMerchantTxnId() {
11287
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
11288
    }
11289
 
11290
    public void setMerchantTxnIdIsSet(boolean value) {
11291
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
11292
    }
11293
 
11294
    public double getAmount() {
11295
      return this.amount;
11296
    }
11297
 
3430 rajveer 11298
    public void setAmount(double amount) {
3010 chandransh 11299
      this.amount = amount;
11300
      setAmountIsSet(true);
11301
    }
11302
 
11303
    public void unsetAmount() {
11304
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
11305
    }
11306
 
3430 rajveer 11307
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
3010 chandransh 11308
    public boolean isSetAmount() {
11309
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
11310
    }
11311
 
11312
    public void setAmountIsSet(boolean value) {
11313
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
11314
    }
11315
 
2462 chandransh 11316
    public void setFieldValue(_Fields field, Object value) {
11317
      switch (field) {
3010 chandransh 11318
      case ORDER_ID:
2462 chandransh 11319
        if (value == null) {
3010 chandransh 11320
          unsetOrderId();
2462 chandransh 11321
        } else {
3010 chandransh 11322
          setOrderId((Long)value);
2462 chandransh 11323
        }
11324
        break;
11325
 
3010 chandransh 11326
      case MERCHANT_TXN_ID:
11327
        if (value == null) {
11328
          unsetMerchantTxnId();
11329
        } else {
11330
          setMerchantTxnId((Long)value);
11331
        }
11332
        break;
11333
 
11334
      case AMOUNT:
11335
        if (value == null) {
11336
          unsetAmount();
11337
        } else {
11338
          setAmount((Double)value);
11339
        }
11340
        break;
11341
 
2462 chandransh 11342
      }
11343
    }
11344
 
11345
    public Object getFieldValue(_Fields field) {
11346
      switch (field) {
3010 chandransh 11347
      case ORDER_ID:
3430 rajveer 11348
        return Long.valueOf(getOrderId());
2462 chandransh 11349
 
3010 chandransh 11350
      case MERCHANT_TXN_ID:
3430 rajveer 11351
        return Long.valueOf(getMerchantTxnId());
3010 chandransh 11352
 
11353
      case AMOUNT:
3430 rajveer 11354
        return Double.valueOf(getAmount());
3010 chandransh 11355
 
2462 chandransh 11356
      }
11357
      throw new IllegalStateException();
11358
    }
11359
 
3430 rajveer 11360
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11361
    public boolean isSet(_Fields field) {
11362
      if (field == null) {
11363
        throw new IllegalArgumentException();
11364
      }
2462 chandransh 11365
 
11366
      switch (field) {
3010 chandransh 11367
      case ORDER_ID:
11368
        return isSetOrderId();
11369
      case MERCHANT_TXN_ID:
11370
        return isSetMerchantTxnId();
11371
      case AMOUNT:
11372
        return isSetAmount();
2462 chandransh 11373
      }
11374
      throw new IllegalStateException();
11375
    }
11376
 
11377
    @Override
11378
    public boolean equals(Object that) {
11379
      if (that == null)
11380
        return false;
3010 chandransh 11381
      if (that instanceof createRefund_args)
11382
        return this.equals((createRefund_args)that);
2462 chandransh 11383
      return false;
11384
    }
11385
 
3010 chandransh 11386
    public boolean equals(createRefund_args that) {
2462 chandransh 11387
      if (that == null)
11388
        return false;
11389
 
3010 chandransh 11390
      boolean this_present_orderId = true;
11391
      boolean that_present_orderId = true;
11392
      if (this_present_orderId || that_present_orderId) {
11393
        if (!(this_present_orderId && that_present_orderId))
2462 chandransh 11394
          return false;
3010 chandransh 11395
        if (this.orderId != that.orderId)
2462 chandransh 11396
          return false;
11397
      }
11398
 
3010 chandransh 11399
      boolean this_present_merchantTxnId = true;
11400
      boolean that_present_merchantTxnId = true;
11401
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
11402
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
11403
          return false;
11404
        if (this.merchantTxnId != that.merchantTxnId)
11405
          return false;
11406
      }
11407
 
11408
      boolean this_present_amount = true;
11409
      boolean that_present_amount = true;
11410
      if (this_present_amount || that_present_amount) {
11411
        if (!(this_present_amount && that_present_amount))
11412
          return false;
11413
        if (this.amount != that.amount)
11414
          return false;
11415
      }
11416
 
2462 chandransh 11417
      return true;
11418
    }
11419
 
11420
    @Override
11421
    public int hashCode() {
11422
      return 0;
11423
    }
11424
 
3010 chandransh 11425
    public int compareTo(createRefund_args other) {
2462 chandransh 11426
      if (!getClass().equals(other.getClass())) {
11427
        return getClass().getName().compareTo(other.getClass().getName());
11428
      }
11429
 
11430
      int lastComparison = 0;
3010 chandransh 11431
      createRefund_args typedOther = (createRefund_args)other;
2462 chandransh 11432
 
3430 rajveer 11433
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2462 chandransh 11434
      if (lastComparison != 0) {
11435
        return lastComparison;
11436
      }
3430 rajveer 11437
      if (isSetOrderId()) {
11438
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
11439
        if (lastComparison != 0) {
11440
          return lastComparison;
11441
        }
2462 chandransh 11442
      }
3430 rajveer 11443
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
3010 chandransh 11444
      if (lastComparison != 0) {
11445
        return lastComparison;
11446
      }
3430 rajveer 11447
      if (isSetMerchantTxnId()) {
11448
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
11449
        if (lastComparison != 0) {
11450
          return lastComparison;
11451
        }
3010 chandransh 11452
      }
3430 rajveer 11453
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
3010 chandransh 11454
      if (lastComparison != 0) {
11455
        return lastComparison;
11456
      }
3430 rajveer 11457
      if (isSetAmount()) {
11458
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
11459
        if (lastComparison != 0) {
11460
          return lastComparison;
11461
        }
3010 chandransh 11462
      }
2462 chandransh 11463
      return 0;
11464
    }
11465
 
3430 rajveer 11466
    public _Fields fieldForId(int fieldId) {
11467
      return _Fields.findByThriftId(fieldId);
11468
    }
11469
 
11470
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11471
      org.apache.thrift.protocol.TField field;
2462 chandransh 11472
      iprot.readStructBegin();
11473
      while (true)
11474
      {
11475
        field = iprot.readFieldBegin();
3430 rajveer 11476
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 11477
          break;
11478
        }
3430 rajveer 11479
        switch (field.id) {
11480
          case 1: // ORDER_ID
11481
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11482
              this.orderId = iprot.readI64();
11483
              setOrderIdIsSet(true);
11484
            } else { 
11485
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11486
            }
11487
            break;
11488
          case 2: // MERCHANT_TXN_ID
11489
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11490
              this.merchantTxnId = iprot.readI64();
11491
              setMerchantTxnIdIsSet(true);
11492
            } else { 
11493
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11494
            }
11495
            break;
11496
          case 3: // AMOUNT
11497
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
11498
              this.amount = iprot.readDouble();
11499
              setAmountIsSet(true);
11500
            } else { 
11501
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11502
            }
11503
            break;
11504
          default:
11505
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 11506
        }
3430 rajveer 11507
        iprot.readFieldEnd();
2462 chandransh 11508
      }
11509
      iprot.readStructEnd();
11510
      validate();
11511
    }
11512
 
3430 rajveer 11513
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 11514
      validate();
11515
 
11516
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 11517
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11518
      oprot.writeI64(this.orderId);
2462 chandransh 11519
      oprot.writeFieldEnd();
3010 chandransh 11520
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
11521
      oprot.writeI64(this.merchantTxnId);
11522
      oprot.writeFieldEnd();
11523
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
11524
      oprot.writeDouble(this.amount);
11525
      oprot.writeFieldEnd();
2462 chandransh 11526
      oprot.writeFieldStop();
11527
      oprot.writeStructEnd();
11528
    }
11529
 
11530
    @Override
11531
    public String toString() {
3010 chandransh 11532
      StringBuilder sb = new StringBuilder("createRefund_args(");
2462 chandransh 11533
      boolean first = true;
11534
 
3010 chandransh 11535
      sb.append("orderId:");
11536
      sb.append(this.orderId);
2462 chandransh 11537
      first = false;
3010 chandransh 11538
      if (!first) sb.append(", ");
11539
      sb.append("merchantTxnId:");
11540
      sb.append(this.merchantTxnId);
11541
      first = false;
11542
      if (!first) sb.append(", ");
11543
      sb.append("amount:");
11544
      sb.append(this.amount);
11545
      first = false;
2462 chandransh 11546
      sb.append(")");
11547
      return sb.toString();
11548
    }
11549
 
3430 rajveer 11550
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 11551
      // check for required fields
11552
    }
11553
 
3430 rajveer 11554
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11555
      try {
11556
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11557
      } catch (org.apache.thrift.TException te) {
11558
        throw new java.io.IOException(te);
11559
      }
11560
    }
11561
 
11562
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11563
      try {
11564
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11565
      } catch (org.apache.thrift.TException te) {
11566
        throw new java.io.IOException(te);
11567
      }
11568
    }
11569
 
2462 chandransh 11570
  }
11571
 
3430 rajveer 11572
  public static class createRefund_result implements org.apache.thrift.TBase<createRefund_result, createRefund_result._Fields>, java.io.Serializable, Cloneable   {
11573
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_result");
2462 chandransh 11574
 
3430 rajveer 11575
    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);
11576
    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 11577
 
3430 rajveer 11578
    private long success; // required
11579
    private PaymentException pe; // required
2462 chandransh 11580
 
11581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11582
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 11583
      SUCCESS((short)0, "success"),
11584
      PE((short)1, "pe");
11585
 
11586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11587
 
11588
      static {
11589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11590
          byName.put(field.getFieldName(), field);
11591
        }
11592
      }
11593
 
11594
      /**
11595
       * Find the _Fields constant that matches fieldId, or null if its not found.
11596
       */
11597
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11598
        switch(fieldId) {
11599
          case 0: // SUCCESS
11600
            return SUCCESS;
11601
          case 1: // PE
11602
            return PE;
11603
          default:
11604
            return null;
11605
        }
2462 chandransh 11606
      }
11607
 
11608
      /**
11609
       * Find the _Fields constant that matches fieldId, throwing an exception
11610
       * if it is not found.
11611
       */
11612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11613
        _Fields fields = findByThriftId(fieldId);
11614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11615
        return fields;
11616
      }
11617
 
11618
      /**
11619
       * Find the _Fields constant that matches name, or null if its not found.
11620
       */
11621
      public static _Fields findByName(String name) {
11622
        return byName.get(name);
11623
      }
11624
 
11625
      private final short _thriftId;
11626
      private final String _fieldName;
11627
 
11628
      _Fields(short thriftId, String fieldName) {
11629
        _thriftId = thriftId;
11630
        _fieldName = fieldName;
11631
      }
11632
 
11633
      public short getThriftFieldId() {
11634
        return _thriftId;
11635
      }
11636
 
11637
      public String getFieldName() {
11638
        return _fieldName;
11639
      }
11640
    }
11641
 
11642
    // isset id assignments
3010 chandransh 11643
    private static final int __SUCCESS_ISSET_ID = 0;
11644
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 11645
 
3430 rajveer 11646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 11647
    static {
3430 rajveer 11648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11649
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11650
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11651
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11652
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_result.class, metaDataMap);
2462 chandransh 11655
    }
11656
 
3010 chandransh 11657
    public createRefund_result() {
2462 chandransh 11658
    }
11659
 
3010 chandransh 11660
    public createRefund_result(
11661
      long success,
2462 chandransh 11662
      PaymentException pe)
11663
    {
11664
      this();
11665
      this.success = success;
3010 chandransh 11666
      setSuccessIsSet(true);
2462 chandransh 11667
      this.pe = pe;
11668
    }
11669
 
11670
    /**
11671
     * Performs a deep copy on <i>other</i>.
11672
     */
3010 chandransh 11673
    public createRefund_result(createRefund_result other) {
11674
      __isset_bit_vector.clear();
11675
      __isset_bit_vector.or(other.__isset_bit_vector);
11676
      this.success = other.success;
2462 chandransh 11677
      if (other.isSetPe()) {
11678
        this.pe = new PaymentException(other.pe);
11679
      }
11680
    }
11681
 
3010 chandransh 11682
    public createRefund_result deepCopy() {
11683
      return new createRefund_result(this);
2462 chandransh 11684
    }
11685
 
3430 rajveer 11686
    @Override
11687
    public void clear() {
11688
      setSuccessIsSet(false);
11689
      this.success = 0;
11690
      this.pe = null;
2462 chandransh 11691
    }
11692
 
3010 chandransh 11693
    public long getSuccess() {
2462 chandransh 11694
      return this.success;
11695
    }
11696
 
3430 rajveer 11697
    public void setSuccess(long success) {
2462 chandransh 11698
      this.success = success;
3010 chandransh 11699
      setSuccessIsSet(true);
2462 chandransh 11700
    }
11701
 
11702
    public void unsetSuccess() {
3010 chandransh 11703
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2462 chandransh 11704
    }
11705
 
3430 rajveer 11706
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 11707
    public boolean isSetSuccess() {
3010 chandransh 11708
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2462 chandransh 11709
    }
11710
 
11711
    public void setSuccessIsSet(boolean value) {
3010 chandransh 11712
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2462 chandransh 11713
    }
11714
 
11715
    public PaymentException getPe() {
11716
      return this.pe;
11717
    }
11718
 
3430 rajveer 11719
    public void setPe(PaymentException pe) {
2462 chandransh 11720
      this.pe = pe;
11721
    }
11722
 
11723
    public void unsetPe() {
11724
      this.pe = null;
11725
    }
11726
 
3430 rajveer 11727
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 11728
    public boolean isSetPe() {
11729
      return this.pe != null;
11730
    }
11731
 
11732
    public void setPeIsSet(boolean value) {
11733
      if (!value) {
11734
        this.pe = null;
11735
      }
11736
    }
11737
 
11738
    public void setFieldValue(_Fields field, Object value) {
11739
      switch (field) {
11740
      case SUCCESS:
11741
        if (value == null) {
11742
          unsetSuccess();
11743
        } else {
3010 chandransh 11744
          setSuccess((Long)value);
2462 chandransh 11745
        }
11746
        break;
11747
 
11748
      case PE:
11749
        if (value == null) {
11750
          unsetPe();
11751
        } else {
11752
          setPe((PaymentException)value);
11753
        }
11754
        break;
11755
 
11756
      }
11757
    }
11758
 
11759
    public Object getFieldValue(_Fields field) {
11760
      switch (field) {
11761
      case SUCCESS:
3430 rajveer 11762
        return Long.valueOf(getSuccess());
2462 chandransh 11763
 
11764
      case PE:
11765
        return getPe();
11766
 
11767
      }
11768
      throw new IllegalStateException();
11769
    }
11770
 
3430 rajveer 11771
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11772
    public boolean isSet(_Fields field) {
11773
      if (field == null) {
11774
        throw new IllegalArgumentException();
11775
      }
2462 chandransh 11776
 
11777
      switch (field) {
11778
      case SUCCESS:
11779
        return isSetSuccess();
11780
      case PE:
11781
        return isSetPe();
11782
      }
11783
      throw new IllegalStateException();
11784
    }
11785
 
11786
    @Override
11787
    public boolean equals(Object that) {
11788
      if (that == null)
11789
        return false;
3010 chandransh 11790
      if (that instanceof createRefund_result)
11791
        return this.equals((createRefund_result)that);
2462 chandransh 11792
      return false;
11793
    }
11794
 
3010 chandransh 11795
    public boolean equals(createRefund_result that) {
2462 chandransh 11796
      if (that == null)
11797
        return false;
11798
 
3010 chandransh 11799
      boolean this_present_success = true;
11800
      boolean that_present_success = true;
2462 chandransh 11801
      if (this_present_success || that_present_success) {
11802
        if (!(this_present_success && that_present_success))
11803
          return false;
3010 chandransh 11804
        if (this.success != that.success)
2462 chandransh 11805
          return false;
11806
      }
11807
 
11808
      boolean this_present_pe = true && this.isSetPe();
11809
      boolean that_present_pe = true && that.isSetPe();
11810
      if (this_present_pe || that_present_pe) {
11811
        if (!(this_present_pe && that_present_pe))
11812
          return false;
11813
        if (!this.pe.equals(that.pe))
11814
          return false;
11815
      }
11816
 
11817
      return true;
11818
    }
11819
 
11820
    @Override
11821
    public int hashCode() {
11822
      return 0;
11823
    }
11824
 
3010 chandransh 11825
    public int compareTo(createRefund_result other) {
2462 chandransh 11826
      if (!getClass().equals(other.getClass())) {
11827
        return getClass().getName().compareTo(other.getClass().getName());
11828
      }
11829
 
11830
      int lastComparison = 0;
3010 chandransh 11831
      createRefund_result typedOther = (createRefund_result)other;
2462 chandransh 11832
 
3430 rajveer 11833
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2462 chandransh 11834
      if (lastComparison != 0) {
11835
        return lastComparison;
11836
      }
3430 rajveer 11837
      if (isSetSuccess()) {
11838
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11839
        if (lastComparison != 0) {
11840
          return lastComparison;
11841
        }
2462 chandransh 11842
      }
3430 rajveer 11843
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2462 chandransh 11844
      if (lastComparison != 0) {
11845
        return lastComparison;
11846
      }
3430 rajveer 11847
      if (isSetPe()) {
11848
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
11849
        if (lastComparison != 0) {
11850
          return lastComparison;
11851
        }
2462 chandransh 11852
      }
11853
      return 0;
11854
    }
11855
 
3430 rajveer 11856
    public _Fields fieldForId(int fieldId) {
11857
      return _Fields.findByThriftId(fieldId);
11858
    }
11859
 
11860
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11861
      org.apache.thrift.protocol.TField field;
2462 chandransh 11862
      iprot.readStructBegin();
11863
      while (true)
11864
      {
11865
        field = iprot.readFieldBegin();
3430 rajveer 11866
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 11867
          break;
11868
        }
3430 rajveer 11869
        switch (field.id) {
11870
          case 0: // SUCCESS
11871
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11872
              this.success = iprot.readI64();
11873
              setSuccessIsSet(true);
11874
            } else { 
11875
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11876
            }
11877
            break;
11878
          case 1: // PE
11879
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11880
              this.pe = new PaymentException();
11881
              this.pe.read(iprot);
11882
            } else { 
11883
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11884
            }
11885
            break;
11886
          default:
11887
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 11888
        }
3430 rajveer 11889
        iprot.readFieldEnd();
2462 chandransh 11890
      }
11891
      iprot.readStructEnd();
11892
      validate();
11893
    }
11894
 
3430 rajveer 11895
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 11896
      oprot.writeStructBegin(STRUCT_DESC);
11897
 
11898
      if (this.isSetSuccess()) {
11899
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 11900
        oprot.writeI64(this.success);
2462 chandransh 11901
        oprot.writeFieldEnd();
11902
      } else if (this.isSetPe()) {
11903
        oprot.writeFieldBegin(PE_FIELD_DESC);
11904
        this.pe.write(oprot);
11905
        oprot.writeFieldEnd();
11906
      }
11907
      oprot.writeFieldStop();
11908
      oprot.writeStructEnd();
11909
    }
11910
 
11911
    @Override
11912
    public String toString() {
3010 chandransh 11913
      StringBuilder sb = new StringBuilder("createRefund_result(");
2462 chandransh 11914
      boolean first = true;
11915
 
11916
      sb.append("success:");
3010 chandransh 11917
      sb.append(this.success);
2462 chandransh 11918
      first = false;
11919
      if (!first) sb.append(", ");
11920
      sb.append("pe:");
11921
      if (this.pe == null) {
11922
        sb.append("null");
11923
      } else {
11924
        sb.append(this.pe);
11925
      }
11926
      first = false;
11927
      sb.append(")");
11928
      return sb.toString();
11929
    }
11930
 
3430 rajveer 11931
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 11932
      // check for required fields
11933
    }
11934
 
3430 rajveer 11935
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11936
      try {
11937
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11938
      } catch (org.apache.thrift.TException te) {
11939
        throw new java.io.IOException(te);
11940
      }
11941
    }
11942
 
11943
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11944
      try {
11945
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11946
      } catch (org.apache.thrift.TException te) {
11947
        throw new java.io.IOException(te);
11948
      }
11949
    }
11950
 
2462 chandransh 11951
  }
11952
 
3430 rajveer 11953
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
11954
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
2690 chandransh 11955
 
3430 rajveer 11956
    private static final org.apache.thrift.protocol.TField MERCHANT_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantTxnId", org.apache.thrift.protocol.TType.I64, (short)1);
2690 chandransh 11957
 
3430 rajveer 11958
    private long merchantTxnId; // required
2690 chandransh 11959
 
11960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11961
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 11962
      MERCHANT_TXN_ID((short)1, "merchantTxnId");
2690 chandransh 11963
 
11964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11965
 
11966
      static {
11967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11968
          byName.put(field.getFieldName(), field);
11969
        }
11970
      }
11971
 
11972
      /**
11973
       * Find the _Fields constant that matches fieldId, or null if its not found.
11974
       */
11975
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11976
        switch(fieldId) {
11977
          case 1: // MERCHANT_TXN_ID
11978
            return MERCHANT_TXN_ID;
11979
          default:
11980
            return null;
11981
        }
2690 chandransh 11982
      }
11983
 
11984
      /**
11985
       * Find the _Fields constant that matches fieldId, throwing an exception
11986
       * if it is not found.
11987
       */
11988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11989
        _Fields fields = findByThriftId(fieldId);
11990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11991
        return fields;
11992
      }
11993
 
11994
      /**
11995
       * Find the _Fields constant that matches name, or null if its not found.
11996
       */
11997
      public static _Fields findByName(String name) {
11998
        return byName.get(name);
11999
      }
12000
 
12001
      private final short _thriftId;
12002
      private final String _fieldName;
12003
 
12004
      _Fields(short thriftId, String fieldName) {
12005
        _thriftId = thriftId;
12006
        _fieldName = fieldName;
12007
      }
12008
 
12009
      public short getThriftFieldId() {
12010
        return _thriftId;
12011
      }
12012
 
12013
      public String getFieldName() {
12014
        return _fieldName;
12015
      }
12016
    }
12017
 
12018
    // isset id assignments
3010 chandransh 12019
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
12020
    private BitSet __isset_bit_vector = new BitSet(1);
2690 chandransh 12021
 
3430 rajveer 12022
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 12023
    static {
3430 rajveer 12024
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12025
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12026
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12027
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12028
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
2690 chandransh 12029
    }
12030
 
3010 chandransh 12031
    public capturePayment_args() {
2690 chandransh 12032
    }
12033
 
3010 chandransh 12034
    public capturePayment_args(
12035
      long merchantTxnId)
2690 chandransh 12036
    {
12037
      this();
12038
      this.merchantTxnId = merchantTxnId;
12039
      setMerchantTxnIdIsSet(true);
12040
    }
12041
 
12042
    /**
12043
     * Performs a deep copy on <i>other</i>.
12044
     */
3010 chandransh 12045
    public capturePayment_args(capturePayment_args other) {
2690 chandransh 12046
      __isset_bit_vector.clear();
12047
      __isset_bit_vector.or(other.__isset_bit_vector);
12048
      this.merchantTxnId = other.merchantTxnId;
12049
    }
12050
 
3010 chandransh 12051
    public capturePayment_args deepCopy() {
12052
      return new capturePayment_args(this);
2690 chandransh 12053
    }
12054
 
3430 rajveer 12055
    @Override
12056
    public void clear() {
12057
      setMerchantTxnIdIsSet(false);
12058
      this.merchantTxnId = 0;
2690 chandransh 12059
    }
12060
 
12061
    public long getMerchantTxnId() {
12062
      return this.merchantTxnId;
12063
    }
12064
 
3430 rajveer 12065
    public void setMerchantTxnId(long merchantTxnId) {
2690 chandransh 12066
      this.merchantTxnId = merchantTxnId;
12067
      setMerchantTxnIdIsSet(true);
12068
    }
12069
 
12070
    public void unsetMerchantTxnId() {
12071
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
12072
    }
12073
 
3430 rajveer 12074
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
2690 chandransh 12075
    public boolean isSetMerchantTxnId() {
12076
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
12077
    }
12078
 
12079
    public void setMerchantTxnIdIsSet(boolean value) {
12080
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
12081
    }
12082
 
12083
    public void setFieldValue(_Fields field, Object value) {
12084
      switch (field) {
12085
      case MERCHANT_TXN_ID:
12086
        if (value == null) {
12087
          unsetMerchantTxnId();
12088
        } else {
12089
          setMerchantTxnId((Long)value);
12090
        }
12091
        break;
12092
 
12093
      }
12094
    }
12095
 
12096
    public Object getFieldValue(_Fields field) {
12097
      switch (field) {
12098
      case MERCHANT_TXN_ID:
3430 rajveer 12099
        return Long.valueOf(getMerchantTxnId());
2690 chandransh 12100
 
12101
      }
12102
      throw new IllegalStateException();
12103
    }
12104
 
3430 rajveer 12105
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12106
    public boolean isSet(_Fields field) {
12107
      if (field == null) {
12108
        throw new IllegalArgumentException();
12109
      }
2690 chandransh 12110
 
12111
      switch (field) {
12112
      case MERCHANT_TXN_ID:
12113
        return isSetMerchantTxnId();
12114
      }
12115
      throw new IllegalStateException();
12116
    }
12117
 
12118
    @Override
12119
    public boolean equals(Object that) {
12120
      if (that == null)
12121
        return false;
3010 chandransh 12122
      if (that instanceof capturePayment_args)
12123
        return this.equals((capturePayment_args)that);
2690 chandransh 12124
      return false;
12125
    }
12126
 
3010 chandransh 12127
    public boolean equals(capturePayment_args that) {
2690 chandransh 12128
      if (that == null)
12129
        return false;
12130
 
12131
      boolean this_present_merchantTxnId = true;
12132
      boolean that_present_merchantTxnId = true;
12133
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
12134
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
12135
          return false;
12136
        if (this.merchantTxnId != that.merchantTxnId)
12137
          return false;
12138
      }
12139
 
12140
      return true;
12141
    }
12142
 
12143
    @Override
12144
    public int hashCode() {
12145
      return 0;
12146
    }
12147
 
3010 chandransh 12148
    public int compareTo(capturePayment_args other) {
2690 chandransh 12149
      if (!getClass().equals(other.getClass())) {
12150
        return getClass().getName().compareTo(other.getClass().getName());
12151
      }
12152
 
12153
      int lastComparison = 0;
3010 chandransh 12154
      capturePayment_args typedOther = (capturePayment_args)other;
2690 chandransh 12155
 
3430 rajveer 12156
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
2690 chandransh 12157
      if (lastComparison != 0) {
12158
        return lastComparison;
12159
      }
3430 rajveer 12160
      if (isSetMerchantTxnId()) {
12161
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
12162
        if (lastComparison != 0) {
12163
          return lastComparison;
12164
        }
2690 chandransh 12165
      }
12166
      return 0;
12167
    }
12168
 
3430 rajveer 12169
    public _Fields fieldForId(int fieldId) {
12170
      return _Fields.findByThriftId(fieldId);
12171
    }
12172
 
12173
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12174
      org.apache.thrift.protocol.TField field;
2690 chandransh 12175
      iprot.readStructBegin();
12176
      while (true)
12177
      {
12178
        field = iprot.readFieldBegin();
3430 rajveer 12179
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 12180
          break;
12181
        }
3430 rajveer 12182
        switch (field.id) {
12183
          case 1: // MERCHANT_TXN_ID
12184
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12185
              this.merchantTxnId = iprot.readI64();
12186
              setMerchantTxnIdIsSet(true);
12187
            } else { 
12188
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12189
            }
12190
            break;
12191
          default:
12192
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 12193
        }
3430 rajveer 12194
        iprot.readFieldEnd();
2690 chandransh 12195
      }
12196
      iprot.readStructEnd();
12197
      validate();
12198
    }
12199
 
3430 rajveer 12200
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 12201
      validate();
12202
 
12203
      oprot.writeStructBegin(STRUCT_DESC);
12204
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
12205
      oprot.writeI64(this.merchantTxnId);
12206
      oprot.writeFieldEnd();
12207
      oprot.writeFieldStop();
12208
      oprot.writeStructEnd();
12209
    }
12210
 
12211
    @Override
12212
    public String toString() {
3010 chandransh 12213
      StringBuilder sb = new StringBuilder("capturePayment_args(");
2690 chandransh 12214
      boolean first = true;
12215
 
12216
      sb.append("merchantTxnId:");
12217
      sb.append(this.merchantTxnId);
12218
      first = false;
12219
      sb.append(")");
12220
      return sb.toString();
12221
    }
12222
 
3430 rajveer 12223
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 12224
      // check for required fields
12225
    }
12226
 
3430 rajveer 12227
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12228
      try {
12229
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12230
      } catch (org.apache.thrift.TException te) {
12231
        throw new java.io.IOException(te);
12232
      }
12233
    }
12234
 
12235
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12236
      try {
12237
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12238
      } catch (org.apache.thrift.TException te) {
12239
        throw new java.io.IOException(te);
12240
      }
12241
    }
12242
 
2690 chandransh 12243
  }
12244
 
3430 rajveer 12245
  public static class capturePayment_result implements org.apache.thrift.TBase<capturePayment_result, capturePayment_result._Fields>, java.io.Serializable, Cloneable   {
12246
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_result");
2690 chandransh 12247
 
3430 rajveer 12248
    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);
12249
    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 12250
 
3430 rajveer 12251
    private boolean success; // required
12252
    private PaymentException pe; // required
2690 chandransh 12253
 
12254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12255
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2690 chandransh 12256
      SUCCESS((short)0, "success"),
12257
      PE((short)1, "pe");
12258
 
12259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12260
 
12261
      static {
12262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12263
          byName.put(field.getFieldName(), field);
12264
        }
12265
      }
12266
 
12267
      /**
12268
       * Find the _Fields constant that matches fieldId, or null if its not found.
12269
       */
12270
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12271
        switch(fieldId) {
12272
          case 0: // SUCCESS
12273
            return SUCCESS;
12274
          case 1: // PE
12275
            return PE;
12276
          default:
12277
            return null;
12278
        }
2690 chandransh 12279
      }
12280
 
12281
      /**
12282
       * Find the _Fields constant that matches fieldId, throwing an exception
12283
       * if it is not found.
12284
       */
12285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12286
        _Fields fields = findByThriftId(fieldId);
12287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12288
        return fields;
12289
      }
12290
 
12291
      /**
12292
       * Find the _Fields constant that matches name, or null if its not found.
12293
       */
12294
      public static _Fields findByName(String name) {
12295
        return byName.get(name);
12296
      }
12297
 
12298
      private final short _thriftId;
12299
      private final String _fieldName;
12300
 
12301
      _Fields(short thriftId, String fieldName) {
12302
        _thriftId = thriftId;
12303
        _fieldName = fieldName;
12304
      }
12305
 
12306
      public short getThriftFieldId() {
12307
        return _thriftId;
12308
      }
12309
 
12310
      public String getFieldName() {
12311
        return _fieldName;
12312
      }
12313
    }
12314
 
12315
    // isset id assignments
12316
    private static final int __SUCCESS_ISSET_ID = 0;
12317
    private BitSet __isset_bit_vector = new BitSet(1);
12318
 
3430 rajveer 12319
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 12320
    static {
3430 rajveer 12321
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12322
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12323
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
12324
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12325
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12326
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12327
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_result.class, metaDataMap);
2690 chandransh 12328
    }
12329
 
3010 chandransh 12330
    public capturePayment_result() {
2690 chandransh 12331
    }
12332
 
3010 chandransh 12333
    public capturePayment_result(
12334
      boolean success,
2690 chandransh 12335
      PaymentException pe)
12336
    {
12337
      this();
12338
      this.success = success;
12339
      setSuccessIsSet(true);
12340
      this.pe = pe;
12341
    }
12342
 
12343
    /**
12344
     * Performs a deep copy on <i>other</i>.
12345
     */
3010 chandransh 12346
    public capturePayment_result(capturePayment_result other) {
2690 chandransh 12347
      __isset_bit_vector.clear();
12348
      __isset_bit_vector.or(other.__isset_bit_vector);
12349
      this.success = other.success;
12350
      if (other.isSetPe()) {
12351
        this.pe = new PaymentException(other.pe);
12352
      }
12353
    }
12354
 
3010 chandransh 12355
    public capturePayment_result deepCopy() {
12356
      return new capturePayment_result(this);
2690 chandransh 12357
    }
12358
 
3430 rajveer 12359
    @Override
12360
    public void clear() {
12361
      setSuccessIsSet(false);
12362
      this.success = false;
12363
      this.pe = null;
2690 chandransh 12364
    }
12365
 
3010 chandransh 12366
    public boolean isSuccess() {
2690 chandransh 12367
      return this.success;
12368
    }
12369
 
3430 rajveer 12370
    public void setSuccess(boolean success) {
2690 chandransh 12371
      this.success = success;
12372
      setSuccessIsSet(true);
12373
    }
12374
 
12375
    public void unsetSuccess() {
12376
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12377
    }
12378
 
3430 rajveer 12379
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2690 chandransh 12380
    public boolean isSetSuccess() {
12381
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12382
    }
12383
 
12384
    public void setSuccessIsSet(boolean value) {
12385
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12386
    }
12387
 
12388
    public PaymentException getPe() {
12389
      return this.pe;
12390
    }
12391
 
3430 rajveer 12392
    public void setPe(PaymentException pe) {
2690 chandransh 12393
      this.pe = pe;
12394
    }
12395
 
12396
    public void unsetPe() {
12397
      this.pe = null;
12398
    }
12399
 
3430 rajveer 12400
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2690 chandransh 12401
    public boolean isSetPe() {
12402
      return this.pe != null;
12403
    }
12404
 
12405
    public void setPeIsSet(boolean value) {
12406
      if (!value) {
12407
        this.pe = null;
12408
      }
12409
    }
12410
 
12411
    public void setFieldValue(_Fields field, Object value) {
12412
      switch (field) {
12413
      case SUCCESS:
12414
        if (value == null) {
12415
          unsetSuccess();
12416
        } else {
3010 chandransh 12417
          setSuccess((Boolean)value);
2690 chandransh 12418
        }
12419
        break;
12420
 
12421
      case PE:
12422
        if (value == null) {
12423
          unsetPe();
12424
        } else {
12425
          setPe((PaymentException)value);
12426
        }
12427
        break;
12428
 
12429
      }
12430
    }
12431
 
12432
    public Object getFieldValue(_Fields field) {
12433
      switch (field) {
12434
      case SUCCESS:
3430 rajveer 12435
        return Boolean.valueOf(isSuccess());
2690 chandransh 12436
 
12437
      case PE:
12438
        return getPe();
12439
 
12440
      }
12441
      throw new IllegalStateException();
12442
    }
12443
 
3430 rajveer 12444
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12445
    public boolean isSet(_Fields field) {
12446
      if (field == null) {
12447
        throw new IllegalArgumentException();
12448
      }
2690 chandransh 12449
 
12450
      switch (field) {
12451
      case SUCCESS:
12452
        return isSetSuccess();
12453
      case PE:
12454
        return isSetPe();
12455
      }
12456
      throw new IllegalStateException();
12457
    }
12458
 
12459
    @Override
12460
    public boolean equals(Object that) {
12461
      if (that == null)
12462
        return false;
3010 chandransh 12463
      if (that instanceof capturePayment_result)
12464
        return this.equals((capturePayment_result)that);
2690 chandransh 12465
      return false;
12466
    }
12467
 
3010 chandransh 12468
    public boolean equals(capturePayment_result that) {
2690 chandransh 12469
      if (that == null)
12470
        return false;
12471
 
12472
      boolean this_present_success = true;
12473
      boolean that_present_success = true;
12474
      if (this_present_success || that_present_success) {
12475
        if (!(this_present_success && that_present_success))
12476
          return false;
12477
        if (this.success != that.success)
12478
          return false;
12479
      }
12480
 
12481
      boolean this_present_pe = true && this.isSetPe();
12482
      boolean that_present_pe = true && that.isSetPe();
12483
      if (this_present_pe || that_present_pe) {
12484
        if (!(this_present_pe && that_present_pe))
12485
          return false;
12486
        if (!this.pe.equals(that.pe))
12487
          return false;
12488
      }
12489
 
12490
      return true;
12491
    }
12492
 
12493
    @Override
12494
    public int hashCode() {
12495
      return 0;
12496
    }
12497
 
3010 chandransh 12498
    public int compareTo(capturePayment_result other) {
2690 chandransh 12499
      if (!getClass().equals(other.getClass())) {
12500
        return getClass().getName().compareTo(other.getClass().getName());
12501
      }
12502
 
12503
      int lastComparison = 0;
3010 chandransh 12504
      capturePayment_result typedOther = (capturePayment_result)other;
2690 chandransh 12505
 
3430 rajveer 12506
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2690 chandransh 12507
      if (lastComparison != 0) {
12508
        return lastComparison;
12509
      }
3430 rajveer 12510
      if (isSetSuccess()) {
12511
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12512
        if (lastComparison != 0) {
12513
          return lastComparison;
12514
        }
2690 chandransh 12515
      }
3430 rajveer 12516
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2690 chandransh 12517
      if (lastComparison != 0) {
12518
        return lastComparison;
12519
      }
3430 rajveer 12520
      if (isSetPe()) {
12521
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
12522
        if (lastComparison != 0) {
12523
          return lastComparison;
12524
        }
2690 chandransh 12525
      }
12526
      return 0;
12527
    }
12528
 
3430 rajveer 12529
    public _Fields fieldForId(int fieldId) {
12530
      return _Fields.findByThriftId(fieldId);
12531
    }
12532
 
12533
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12534
      org.apache.thrift.protocol.TField field;
2690 chandransh 12535
      iprot.readStructBegin();
12536
      while (true)
12537
      {
12538
        field = iprot.readFieldBegin();
3430 rajveer 12539
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 12540
          break;
12541
        }
3430 rajveer 12542
        switch (field.id) {
12543
          case 0: // SUCCESS
12544
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
12545
              this.success = iprot.readBool();
12546
              setSuccessIsSet(true);
12547
            } else { 
12548
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12549
            }
12550
            break;
12551
          case 1: // PE
12552
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12553
              this.pe = new PaymentException();
12554
              this.pe.read(iprot);
12555
            } else { 
12556
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12557
            }
12558
            break;
12559
          default:
12560
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 12561
        }
3430 rajveer 12562
        iprot.readFieldEnd();
2690 chandransh 12563
      }
12564
      iprot.readStructEnd();
12565
      validate();
12566
    }
12567
 
3430 rajveer 12568
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 12569
      oprot.writeStructBegin(STRUCT_DESC);
12570
 
12571
      if (this.isSetSuccess()) {
12572
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 12573
        oprot.writeBool(this.success);
2690 chandransh 12574
        oprot.writeFieldEnd();
12575
      } else if (this.isSetPe()) {
12576
        oprot.writeFieldBegin(PE_FIELD_DESC);
12577
        this.pe.write(oprot);
12578
        oprot.writeFieldEnd();
12579
      }
12580
      oprot.writeFieldStop();
12581
      oprot.writeStructEnd();
12582
    }
12583
 
12584
    @Override
12585
    public String toString() {
3010 chandransh 12586
      StringBuilder sb = new StringBuilder("capturePayment_result(");
2690 chandransh 12587
      boolean first = true;
12588
 
12589
      sb.append("success:");
12590
      sb.append(this.success);
12591
      first = false;
12592
      if (!first) sb.append(", ");
12593
      sb.append("pe:");
12594
      if (this.pe == null) {
12595
        sb.append("null");
12596
      } else {
12597
        sb.append(this.pe);
12598
      }
12599
      first = false;
12600
      sb.append(")");
12601
      return sb.toString();
12602
    }
12603
 
3430 rajveer 12604
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 12605
      // check for required fields
12606
    }
12607
 
3430 rajveer 12608
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12609
      try {
12610
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12611
      } catch (org.apache.thrift.TException te) {
12612
        throw new java.io.IOException(te);
12613
      }
12614
    }
12615
 
12616
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12617
      try {
12618
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12619
      } catch (org.apache.thrift.TException te) {
12620
        throw new java.io.IOException(te);
12621
      }
12622
    }
12623
 
2690 chandransh 12624
  }
12625
 
3956 chandransh 12626
  public static class partiallyCapturePayment_args implements org.apache.thrift.TBase<partiallyCapturePayment_args, partiallyCapturePayment_args._Fields>, java.io.Serializable, Cloneable   {
12627
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_args");
12628
 
12629
    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);
12630
    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);
12631
    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);
12632
    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);
12633
    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);
12634
 
12635
    private long merchantTxnId; // required
12636
    private double amount; // required
12637
    private String xferBy; // required
12638
    private String xferTxnId; // required
12639
    private long xferDate; // required
12640
 
12641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12642
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12643
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
12644
      AMOUNT((short)2, "amount"),
12645
      XFER_BY((short)3, "xferBy"),
12646
      XFER_TXN_ID((short)4, "xferTxnId"),
12647
      XFER_DATE((short)5, "xferDate");
12648
 
12649
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12650
 
12651
      static {
12652
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12653
          byName.put(field.getFieldName(), field);
12654
        }
12655
      }
12656
 
12657
      /**
12658
       * Find the _Fields constant that matches fieldId, or null if its not found.
12659
       */
12660
      public static _Fields findByThriftId(int fieldId) {
12661
        switch(fieldId) {
12662
          case 1: // MERCHANT_TXN_ID
12663
            return MERCHANT_TXN_ID;
12664
          case 2: // AMOUNT
12665
            return AMOUNT;
12666
          case 3: // XFER_BY
12667
            return XFER_BY;
12668
          case 4: // XFER_TXN_ID
12669
            return XFER_TXN_ID;
12670
          case 5: // XFER_DATE
12671
            return XFER_DATE;
12672
          default:
12673
            return null;
12674
        }
12675
      }
12676
 
12677
      /**
12678
       * Find the _Fields constant that matches fieldId, throwing an exception
12679
       * if it is not found.
12680
       */
12681
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12682
        _Fields fields = findByThriftId(fieldId);
12683
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12684
        return fields;
12685
      }
12686
 
12687
      /**
12688
       * Find the _Fields constant that matches name, or null if its not found.
12689
       */
12690
      public static _Fields findByName(String name) {
12691
        return byName.get(name);
12692
      }
12693
 
12694
      private final short _thriftId;
12695
      private final String _fieldName;
12696
 
12697
      _Fields(short thriftId, String fieldName) {
12698
        _thriftId = thriftId;
12699
        _fieldName = fieldName;
12700
      }
12701
 
12702
      public short getThriftFieldId() {
12703
        return _thriftId;
12704
      }
12705
 
12706
      public String getFieldName() {
12707
        return _fieldName;
12708
      }
12709
    }
12710
 
12711
    // isset id assignments
12712
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
12713
    private static final int __AMOUNT_ISSET_ID = 1;
12714
    private static final int __XFERDATE_ISSET_ID = 2;
12715
    private BitSet __isset_bit_vector = new BitSet(3);
12716
 
12717
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12718
    static {
12719
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12720
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12721
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12722
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12723
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
12724
      tmpMap.put(_Fields.XFER_BY, new org.apache.thrift.meta_data.FieldMetaData("xferBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12725
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12726
      tmpMap.put(_Fields.XFER_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("xferTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12727
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12728
      tmpMap.put(_Fields.XFER_DATE, new org.apache.thrift.meta_data.FieldMetaData("xferDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12729
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12730
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12731
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_args.class, metaDataMap);
12732
    }
12733
 
12734
    public partiallyCapturePayment_args() {
12735
    }
12736
 
12737
    public partiallyCapturePayment_args(
12738
      long merchantTxnId,
12739
      double amount,
12740
      String xferBy,
12741
      String xferTxnId,
12742
      long xferDate)
12743
    {
12744
      this();
12745
      this.merchantTxnId = merchantTxnId;
12746
      setMerchantTxnIdIsSet(true);
12747
      this.amount = amount;
12748
      setAmountIsSet(true);
12749
      this.xferBy = xferBy;
12750
      this.xferTxnId = xferTxnId;
12751
      this.xferDate = xferDate;
12752
      setXferDateIsSet(true);
12753
    }
12754
 
12755
    /**
12756
     * Performs a deep copy on <i>other</i>.
12757
     */
12758
    public partiallyCapturePayment_args(partiallyCapturePayment_args other) {
12759
      __isset_bit_vector.clear();
12760
      __isset_bit_vector.or(other.__isset_bit_vector);
12761
      this.merchantTxnId = other.merchantTxnId;
12762
      this.amount = other.amount;
12763
      if (other.isSetXferBy()) {
12764
        this.xferBy = other.xferBy;
12765
      }
12766
      if (other.isSetXferTxnId()) {
12767
        this.xferTxnId = other.xferTxnId;
12768
      }
12769
      this.xferDate = other.xferDate;
12770
    }
12771
 
12772
    public partiallyCapturePayment_args deepCopy() {
12773
      return new partiallyCapturePayment_args(this);
12774
    }
12775
 
12776
    @Override
12777
    public void clear() {
12778
      setMerchantTxnIdIsSet(false);
12779
      this.merchantTxnId = 0;
12780
      setAmountIsSet(false);
12781
      this.amount = 0.0;
12782
      this.xferBy = null;
12783
      this.xferTxnId = null;
12784
      setXferDateIsSet(false);
12785
      this.xferDate = 0;
12786
    }
12787
 
12788
    public long getMerchantTxnId() {
12789
      return this.merchantTxnId;
12790
    }
12791
 
12792
    public void setMerchantTxnId(long merchantTxnId) {
12793
      this.merchantTxnId = merchantTxnId;
12794
      setMerchantTxnIdIsSet(true);
12795
    }
12796
 
12797
    public void unsetMerchantTxnId() {
12798
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
12799
    }
12800
 
12801
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
12802
    public boolean isSetMerchantTxnId() {
12803
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
12804
    }
12805
 
12806
    public void setMerchantTxnIdIsSet(boolean value) {
12807
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
12808
    }
12809
 
12810
    public double getAmount() {
12811
      return this.amount;
12812
    }
12813
 
12814
    public void setAmount(double amount) {
12815
      this.amount = amount;
12816
      setAmountIsSet(true);
12817
    }
12818
 
12819
    public void unsetAmount() {
12820
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
12821
    }
12822
 
12823
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
12824
    public boolean isSetAmount() {
12825
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
12826
    }
12827
 
12828
    public void setAmountIsSet(boolean value) {
12829
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
12830
    }
12831
 
12832
    public String getXferBy() {
12833
      return this.xferBy;
12834
    }
12835
 
12836
    public void setXferBy(String xferBy) {
12837
      this.xferBy = xferBy;
12838
    }
12839
 
12840
    public void unsetXferBy() {
12841
      this.xferBy = null;
12842
    }
12843
 
12844
    /** Returns true if field xferBy is set (has been assigned a value) and false otherwise */
12845
    public boolean isSetXferBy() {
12846
      return this.xferBy != null;
12847
    }
12848
 
12849
    public void setXferByIsSet(boolean value) {
12850
      if (!value) {
12851
        this.xferBy = null;
12852
      }
12853
    }
12854
 
12855
    public String getXferTxnId() {
12856
      return this.xferTxnId;
12857
    }
12858
 
12859
    public void setXferTxnId(String xferTxnId) {
12860
      this.xferTxnId = xferTxnId;
12861
    }
12862
 
12863
    public void unsetXferTxnId() {
12864
      this.xferTxnId = null;
12865
    }
12866
 
12867
    /** Returns true if field xferTxnId is set (has been assigned a value) and false otherwise */
12868
    public boolean isSetXferTxnId() {
12869
      return this.xferTxnId != null;
12870
    }
12871
 
12872
    public void setXferTxnIdIsSet(boolean value) {
12873
      if (!value) {
12874
        this.xferTxnId = null;
12875
      }
12876
    }
12877
 
12878
    public long getXferDate() {
12879
      return this.xferDate;
12880
    }
12881
 
12882
    public void setXferDate(long xferDate) {
12883
      this.xferDate = xferDate;
12884
      setXferDateIsSet(true);
12885
    }
12886
 
12887
    public void unsetXferDate() {
12888
      __isset_bit_vector.clear(__XFERDATE_ISSET_ID);
12889
    }
12890
 
12891
    /** Returns true if field xferDate is set (has been assigned a value) and false otherwise */
12892
    public boolean isSetXferDate() {
12893
      return __isset_bit_vector.get(__XFERDATE_ISSET_ID);
12894
    }
12895
 
12896
    public void setXferDateIsSet(boolean value) {
12897
      __isset_bit_vector.set(__XFERDATE_ISSET_ID, value);
12898
    }
12899
 
12900
    public void setFieldValue(_Fields field, Object value) {
12901
      switch (field) {
12902
      case MERCHANT_TXN_ID:
12903
        if (value == null) {
12904
          unsetMerchantTxnId();
12905
        } else {
12906
          setMerchantTxnId((Long)value);
12907
        }
12908
        break;
12909
 
12910
      case AMOUNT:
12911
        if (value == null) {
12912
          unsetAmount();
12913
        } else {
12914
          setAmount((Double)value);
12915
        }
12916
        break;
12917
 
12918
      case XFER_BY:
12919
        if (value == null) {
12920
          unsetXferBy();
12921
        } else {
12922
          setXferBy((String)value);
12923
        }
12924
        break;
12925
 
12926
      case XFER_TXN_ID:
12927
        if (value == null) {
12928
          unsetXferTxnId();
12929
        } else {
12930
          setXferTxnId((String)value);
12931
        }
12932
        break;
12933
 
12934
      case XFER_DATE:
12935
        if (value == null) {
12936
          unsetXferDate();
12937
        } else {
12938
          setXferDate((Long)value);
12939
        }
12940
        break;
12941
 
12942
      }
12943
    }
12944
 
12945
    public Object getFieldValue(_Fields field) {
12946
      switch (field) {
12947
      case MERCHANT_TXN_ID:
12948
        return Long.valueOf(getMerchantTxnId());
12949
 
12950
      case AMOUNT:
12951
        return Double.valueOf(getAmount());
12952
 
12953
      case XFER_BY:
12954
        return getXferBy();
12955
 
12956
      case XFER_TXN_ID:
12957
        return getXferTxnId();
12958
 
12959
      case XFER_DATE:
12960
        return Long.valueOf(getXferDate());
12961
 
12962
      }
12963
      throw new IllegalStateException();
12964
    }
12965
 
12966
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12967
    public boolean isSet(_Fields field) {
12968
      if (field == null) {
12969
        throw new IllegalArgumentException();
12970
      }
12971
 
12972
      switch (field) {
12973
      case MERCHANT_TXN_ID:
12974
        return isSetMerchantTxnId();
12975
      case AMOUNT:
12976
        return isSetAmount();
12977
      case XFER_BY:
12978
        return isSetXferBy();
12979
      case XFER_TXN_ID:
12980
        return isSetXferTxnId();
12981
      case XFER_DATE:
12982
        return isSetXferDate();
12983
      }
12984
      throw new IllegalStateException();
12985
    }
12986
 
12987
    @Override
12988
    public boolean equals(Object that) {
12989
      if (that == null)
12990
        return false;
12991
      if (that instanceof partiallyCapturePayment_args)
12992
        return this.equals((partiallyCapturePayment_args)that);
12993
      return false;
12994
    }
12995
 
12996
    public boolean equals(partiallyCapturePayment_args that) {
12997
      if (that == null)
12998
        return false;
12999
 
13000
      boolean this_present_merchantTxnId = true;
13001
      boolean that_present_merchantTxnId = true;
13002
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
13003
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
13004
          return false;
13005
        if (this.merchantTxnId != that.merchantTxnId)
13006
          return false;
13007
      }
13008
 
13009
      boolean this_present_amount = true;
13010
      boolean that_present_amount = true;
13011
      if (this_present_amount || that_present_amount) {
13012
        if (!(this_present_amount && that_present_amount))
13013
          return false;
13014
        if (this.amount != that.amount)
13015
          return false;
13016
      }
13017
 
13018
      boolean this_present_xferBy = true && this.isSetXferBy();
13019
      boolean that_present_xferBy = true && that.isSetXferBy();
13020
      if (this_present_xferBy || that_present_xferBy) {
13021
        if (!(this_present_xferBy && that_present_xferBy))
13022
          return false;
13023
        if (!this.xferBy.equals(that.xferBy))
13024
          return false;
13025
      }
13026
 
13027
      boolean this_present_xferTxnId = true && this.isSetXferTxnId();
13028
      boolean that_present_xferTxnId = true && that.isSetXferTxnId();
13029
      if (this_present_xferTxnId || that_present_xferTxnId) {
13030
        if (!(this_present_xferTxnId && that_present_xferTxnId))
13031
          return false;
13032
        if (!this.xferTxnId.equals(that.xferTxnId))
13033
          return false;
13034
      }
13035
 
13036
      boolean this_present_xferDate = true;
13037
      boolean that_present_xferDate = true;
13038
      if (this_present_xferDate || that_present_xferDate) {
13039
        if (!(this_present_xferDate && that_present_xferDate))
13040
          return false;
13041
        if (this.xferDate != that.xferDate)
13042
          return false;
13043
      }
13044
 
13045
      return true;
13046
    }
13047
 
13048
    @Override
13049
    public int hashCode() {
13050
      return 0;
13051
    }
13052
 
13053
    public int compareTo(partiallyCapturePayment_args other) {
13054
      if (!getClass().equals(other.getClass())) {
13055
        return getClass().getName().compareTo(other.getClass().getName());
13056
      }
13057
 
13058
      int lastComparison = 0;
13059
      partiallyCapturePayment_args typedOther = (partiallyCapturePayment_args)other;
13060
 
13061
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
13062
      if (lastComparison != 0) {
13063
        return lastComparison;
13064
      }
13065
      if (isSetMerchantTxnId()) {
13066
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
13067
        if (lastComparison != 0) {
13068
          return lastComparison;
13069
        }
13070
      }
13071
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
13072
      if (lastComparison != 0) {
13073
        return lastComparison;
13074
      }
13075
      if (isSetAmount()) {
13076
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
13077
        if (lastComparison != 0) {
13078
          return lastComparison;
13079
        }
13080
      }
13081
      lastComparison = Boolean.valueOf(isSetXferBy()).compareTo(typedOther.isSetXferBy());
13082
      if (lastComparison != 0) {
13083
        return lastComparison;
13084
      }
13085
      if (isSetXferBy()) {
13086
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferBy, typedOther.xferBy);
13087
        if (lastComparison != 0) {
13088
          return lastComparison;
13089
        }
13090
      }
13091
      lastComparison = Boolean.valueOf(isSetXferTxnId()).compareTo(typedOther.isSetXferTxnId());
13092
      if (lastComparison != 0) {
13093
        return lastComparison;
13094
      }
13095
      if (isSetXferTxnId()) {
13096
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferTxnId, typedOther.xferTxnId);
13097
        if (lastComparison != 0) {
13098
          return lastComparison;
13099
        }
13100
      }
13101
      lastComparison = Boolean.valueOf(isSetXferDate()).compareTo(typedOther.isSetXferDate());
13102
      if (lastComparison != 0) {
13103
        return lastComparison;
13104
      }
13105
      if (isSetXferDate()) {
13106
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferDate, typedOther.xferDate);
13107
        if (lastComparison != 0) {
13108
          return lastComparison;
13109
        }
13110
      }
13111
      return 0;
13112
    }
13113
 
13114
    public _Fields fieldForId(int fieldId) {
13115
      return _Fields.findByThriftId(fieldId);
13116
    }
13117
 
13118
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13119
      org.apache.thrift.protocol.TField field;
13120
      iprot.readStructBegin();
13121
      while (true)
13122
      {
13123
        field = iprot.readFieldBegin();
13124
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13125
          break;
13126
        }
13127
        switch (field.id) {
13128
          case 1: // MERCHANT_TXN_ID
13129
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13130
              this.merchantTxnId = iprot.readI64();
13131
              setMerchantTxnIdIsSet(true);
13132
            } else { 
13133
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13134
            }
13135
            break;
13136
          case 2: // AMOUNT
13137
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
13138
              this.amount = iprot.readDouble();
13139
              setAmountIsSet(true);
13140
            } else { 
13141
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13142
            }
13143
            break;
13144
          case 3: // XFER_BY
13145
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13146
              this.xferBy = iprot.readString();
13147
            } else { 
13148
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13149
            }
13150
            break;
13151
          case 4: // XFER_TXN_ID
13152
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13153
              this.xferTxnId = iprot.readString();
13154
            } else { 
13155
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13156
            }
13157
            break;
13158
          case 5: // XFER_DATE
13159
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13160
              this.xferDate = iprot.readI64();
13161
              setXferDateIsSet(true);
13162
            } else { 
13163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13164
            }
13165
            break;
13166
          default:
13167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13168
        }
13169
        iprot.readFieldEnd();
13170
      }
13171
      iprot.readStructEnd();
13172
      validate();
13173
    }
13174
 
13175
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13176
      validate();
13177
 
13178
      oprot.writeStructBegin(STRUCT_DESC);
13179
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
13180
      oprot.writeI64(this.merchantTxnId);
13181
      oprot.writeFieldEnd();
13182
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
13183
      oprot.writeDouble(this.amount);
13184
      oprot.writeFieldEnd();
13185
      if (this.xferBy != null) {
13186
        oprot.writeFieldBegin(XFER_BY_FIELD_DESC);
13187
        oprot.writeString(this.xferBy);
13188
        oprot.writeFieldEnd();
13189
      }
13190
      if (this.xferTxnId != null) {
13191
        oprot.writeFieldBegin(XFER_TXN_ID_FIELD_DESC);
13192
        oprot.writeString(this.xferTxnId);
13193
        oprot.writeFieldEnd();
13194
      }
13195
      oprot.writeFieldBegin(XFER_DATE_FIELD_DESC);
13196
      oprot.writeI64(this.xferDate);
13197
      oprot.writeFieldEnd();
13198
      oprot.writeFieldStop();
13199
      oprot.writeStructEnd();
13200
    }
13201
 
13202
    @Override
13203
    public String toString() {
13204
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_args(");
13205
      boolean first = true;
13206
 
13207
      sb.append("merchantTxnId:");
13208
      sb.append(this.merchantTxnId);
13209
      first = false;
13210
      if (!first) sb.append(", ");
13211
      sb.append("amount:");
13212
      sb.append(this.amount);
13213
      first = false;
13214
      if (!first) sb.append(", ");
13215
      sb.append("xferBy:");
13216
      if (this.xferBy == null) {
13217
        sb.append("null");
13218
      } else {
13219
        sb.append(this.xferBy);
13220
      }
13221
      first = false;
13222
      if (!first) sb.append(", ");
13223
      sb.append("xferTxnId:");
13224
      if (this.xferTxnId == null) {
13225
        sb.append("null");
13226
      } else {
13227
        sb.append(this.xferTxnId);
13228
      }
13229
      first = false;
13230
      if (!first) sb.append(", ");
13231
      sb.append("xferDate:");
13232
      sb.append(this.xferDate);
13233
      first = false;
13234
      sb.append(")");
13235
      return sb.toString();
13236
    }
13237
 
13238
    public void validate() throws org.apache.thrift.TException {
13239
      // check for required fields
13240
    }
13241
 
13242
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13243
      try {
13244
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13245
      } catch (org.apache.thrift.TException te) {
13246
        throw new java.io.IOException(te);
13247
      }
13248
    }
13249
 
13250
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13251
      try {
13252
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13253
      } catch (org.apache.thrift.TException te) {
13254
        throw new java.io.IOException(te);
13255
      }
13256
    }
13257
 
13258
  }
13259
 
13260
  public static class partiallyCapturePayment_result implements org.apache.thrift.TBase<partiallyCapturePayment_result, partiallyCapturePayment_result._Fields>, java.io.Serializable, Cloneable   {
13261
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_result");
13262
 
13263
    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);
13264
    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);
13265
 
13266
    private boolean success; // required
13267
    private PaymentException pe; // required
13268
 
13269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13270
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13271
      SUCCESS((short)0, "success"),
13272
      PE((short)1, "pe");
13273
 
13274
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13275
 
13276
      static {
13277
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13278
          byName.put(field.getFieldName(), field);
13279
        }
13280
      }
13281
 
13282
      /**
13283
       * Find the _Fields constant that matches fieldId, or null if its not found.
13284
       */
13285
      public static _Fields findByThriftId(int fieldId) {
13286
        switch(fieldId) {
13287
          case 0: // SUCCESS
13288
            return SUCCESS;
13289
          case 1: // PE
13290
            return PE;
13291
          default:
13292
            return null;
13293
        }
13294
      }
13295
 
13296
      /**
13297
       * Find the _Fields constant that matches fieldId, throwing an exception
13298
       * if it is not found.
13299
       */
13300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13301
        _Fields fields = findByThriftId(fieldId);
13302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13303
        return fields;
13304
      }
13305
 
13306
      /**
13307
       * Find the _Fields constant that matches name, or null if its not found.
13308
       */
13309
      public static _Fields findByName(String name) {
13310
        return byName.get(name);
13311
      }
13312
 
13313
      private final short _thriftId;
13314
      private final String _fieldName;
13315
 
13316
      _Fields(short thriftId, String fieldName) {
13317
        _thriftId = thriftId;
13318
        _fieldName = fieldName;
13319
      }
13320
 
13321
      public short getThriftFieldId() {
13322
        return _thriftId;
13323
      }
13324
 
13325
      public String getFieldName() {
13326
        return _fieldName;
13327
      }
13328
    }
13329
 
13330
    // isset id assignments
13331
    private static final int __SUCCESS_ISSET_ID = 0;
13332
    private BitSet __isset_bit_vector = new BitSet(1);
13333
 
13334
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13335
    static {
13336
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13337
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
13339
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13341
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13342
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_result.class, metaDataMap);
13343
    }
13344
 
13345
    public partiallyCapturePayment_result() {
13346
    }
13347
 
13348
    public partiallyCapturePayment_result(
13349
      boolean success,
13350
      PaymentException pe)
13351
    {
13352
      this();
13353
      this.success = success;
13354
      setSuccessIsSet(true);
13355
      this.pe = pe;
13356
    }
13357
 
13358
    /**
13359
     * Performs a deep copy on <i>other</i>.
13360
     */
13361
    public partiallyCapturePayment_result(partiallyCapturePayment_result other) {
13362
      __isset_bit_vector.clear();
13363
      __isset_bit_vector.or(other.__isset_bit_vector);
13364
      this.success = other.success;
13365
      if (other.isSetPe()) {
13366
        this.pe = new PaymentException(other.pe);
13367
      }
13368
    }
13369
 
13370
    public partiallyCapturePayment_result deepCopy() {
13371
      return new partiallyCapturePayment_result(this);
13372
    }
13373
 
13374
    @Override
13375
    public void clear() {
13376
      setSuccessIsSet(false);
13377
      this.success = false;
13378
      this.pe = null;
13379
    }
13380
 
13381
    public boolean isSuccess() {
13382
      return this.success;
13383
    }
13384
 
13385
    public void setSuccess(boolean success) {
13386
      this.success = success;
13387
      setSuccessIsSet(true);
13388
    }
13389
 
13390
    public void unsetSuccess() {
13391
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13392
    }
13393
 
13394
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13395
    public boolean isSetSuccess() {
13396
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13397
    }
13398
 
13399
    public void setSuccessIsSet(boolean value) {
13400
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13401
    }
13402
 
13403
    public PaymentException getPe() {
13404
      return this.pe;
13405
    }
13406
 
13407
    public void setPe(PaymentException pe) {
13408
      this.pe = pe;
13409
    }
13410
 
13411
    public void unsetPe() {
13412
      this.pe = null;
13413
    }
13414
 
13415
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
13416
    public boolean isSetPe() {
13417
      return this.pe != null;
13418
    }
13419
 
13420
    public void setPeIsSet(boolean value) {
13421
      if (!value) {
13422
        this.pe = null;
13423
      }
13424
    }
13425
 
13426
    public void setFieldValue(_Fields field, Object value) {
13427
      switch (field) {
13428
      case SUCCESS:
13429
        if (value == null) {
13430
          unsetSuccess();
13431
        } else {
13432
          setSuccess((Boolean)value);
13433
        }
13434
        break;
13435
 
13436
      case PE:
13437
        if (value == null) {
13438
          unsetPe();
13439
        } else {
13440
          setPe((PaymentException)value);
13441
        }
13442
        break;
13443
 
13444
      }
13445
    }
13446
 
13447
    public Object getFieldValue(_Fields field) {
13448
      switch (field) {
13449
      case SUCCESS:
13450
        return Boolean.valueOf(isSuccess());
13451
 
13452
      case PE:
13453
        return getPe();
13454
 
13455
      }
13456
      throw new IllegalStateException();
13457
    }
13458
 
13459
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13460
    public boolean isSet(_Fields field) {
13461
      if (field == null) {
13462
        throw new IllegalArgumentException();
13463
      }
13464
 
13465
      switch (field) {
13466
      case SUCCESS:
13467
        return isSetSuccess();
13468
      case PE:
13469
        return isSetPe();
13470
      }
13471
      throw new IllegalStateException();
13472
    }
13473
 
13474
    @Override
13475
    public boolean equals(Object that) {
13476
      if (that == null)
13477
        return false;
13478
      if (that instanceof partiallyCapturePayment_result)
13479
        return this.equals((partiallyCapturePayment_result)that);
13480
      return false;
13481
    }
13482
 
13483
    public boolean equals(partiallyCapturePayment_result that) {
13484
      if (that == null)
13485
        return false;
13486
 
13487
      boolean this_present_success = true;
13488
      boolean that_present_success = true;
13489
      if (this_present_success || that_present_success) {
13490
        if (!(this_present_success && that_present_success))
13491
          return false;
13492
        if (this.success != that.success)
13493
          return false;
13494
      }
13495
 
13496
      boolean this_present_pe = true && this.isSetPe();
13497
      boolean that_present_pe = true && that.isSetPe();
13498
      if (this_present_pe || that_present_pe) {
13499
        if (!(this_present_pe && that_present_pe))
13500
          return false;
13501
        if (!this.pe.equals(that.pe))
13502
          return false;
13503
      }
13504
 
13505
      return true;
13506
    }
13507
 
13508
    @Override
13509
    public int hashCode() {
13510
      return 0;
13511
    }
13512
 
13513
    public int compareTo(partiallyCapturePayment_result other) {
13514
      if (!getClass().equals(other.getClass())) {
13515
        return getClass().getName().compareTo(other.getClass().getName());
13516
      }
13517
 
13518
      int lastComparison = 0;
13519
      partiallyCapturePayment_result typedOther = (partiallyCapturePayment_result)other;
13520
 
13521
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13522
      if (lastComparison != 0) {
13523
        return lastComparison;
13524
      }
13525
      if (isSetSuccess()) {
13526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13527
        if (lastComparison != 0) {
13528
          return lastComparison;
13529
        }
13530
      }
13531
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
13532
      if (lastComparison != 0) {
13533
        return lastComparison;
13534
      }
13535
      if (isSetPe()) {
13536
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
13537
        if (lastComparison != 0) {
13538
          return lastComparison;
13539
        }
13540
      }
13541
      return 0;
13542
    }
13543
 
13544
    public _Fields fieldForId(int fieldId) {
13545
      return _Fields.findByThriftId(fieldId);
13546
    }
13547
 
13548
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13549
      org.apache.thrift.protocol.TField field;
13550
      iprot.readStructBegin();
13551
      while (true)
13552
      {
13553
        field = iprot.readFieldBegin();
13554
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13555
          break;
13556
        }
13557
        switch (field.id) {
13558
          case 0: // SUCCESS
13559
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
13560
              this.success = iprot.readBool();
13561
              setSuccessIsSet(true);
13562
            } else { 
13563
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13564
            }
13565
            break;
13566
          case 1: // PE
13567
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13568
              this.pe = new PaymentException();
13569
              this.pe.read(iprot);
13570
            } else { 
13571
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13572
            }
13573
            break;
13574
          default:
13575
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13576
        }
13577
        iprot.readFieldEnd();
13578
      }
13579
      iprot.readStructEnd();
13580
      validate();
13581
    }
13582
 
13583
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13584
      oprot.writeStructBegin(STRUCT_DESC);
13585
 
13586
      if (this.isSetSuccess()) {
13587
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13588
        oprot.writeBool(this.success);
13589
        oprot.writeFieldEnd();
13590
      } else if (this.isSetPe()) {
13591
        oprot.writeFieldBegin(PE_FIELD_DESC);
13592
        this.pe.write(oprot);
13593
        oprot.writeFieldEnd();
13594
      }
13595
      oprot.writeFieldStop();
13596
      oprot.writeStructEnd();
13597
    }
13598
 
13599
    @Override
13600
    public String toString() {
13601
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_result(");
13602
      boolean first = true;
13603
 
13604
      sb.append("success:");
13605
      sb.append(this.success);
13606
      first = false;
13607
      if (!first) sb.append(", ");
13608
      sb.append("pe:");
13609
      if (this.pe == null) {
13610
        sb.append("null");
13611
      } else {
13612
        sb.append(this.pe);
13613
      }
13614
      first = false;
13615
      sb.append(")");
13616
      return sb.toString();
13617
    }
13618
 
13619
    public void validate() throws org.apache.thrift.TException {
13620
      // check for required fields
13621
    }
13622
 
13623
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13624
      try {
13625
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13626
      } catch (org.apache.thrift.TException te) {
13627
        throw new java.io.IOException(te);
13628
      }
13629
    }
13630
 
13631
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13632
      try {
13633
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13634
      } catch (org.apache.thrift.TException te) {
13635
        throw new java.io.IOException(te);
13636
      }
13637
    }
13638
 
13639
  }
13640
 
4008 mandeep.dh 13641
  public static class getPaymentsRequiringExtraProcessing_args implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_args, getPaymentsRequiringExtraProcessing_args._Fields>, java.io.Serializable, Cloneable   {
13642
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_args");
13643
 
13644
    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);
13645
 
13646
    private ExtraPaymentProcessingType category; // required
13647
 
13648
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13649
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13650
      /**
13651
       * 
13652
       * @see ExtraPaymentProcessingType
13653
       */
13654
      CATEGORY((short)1, "category");
13655
 
13656
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13657
 
13658
      static {
13659
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13660
          byName.put(field.getFieldName(), field);
13661
        }
13662
      }
13663
 
13664
      /**
13665
       * Find the _Fields constant that matches fieldId, or null if its not found.
13666
       */
13667
      public static _Fields findByThriftId(int fieldId) {
13668
        switch(fieldId) {
13669
          case 1: // CATEGORY
13670
            return CATEGORY;
13671
          default:
13672
            return null;
13673
        }
13674
      }
13675
 
13676
      /**
13677
       * Find the _Fields constant that matches fieldId, throwing an exception
13678
       * if it is not found.
13679
       */
13680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13681
        _Fields fields = findByThriftId(fieldId);
13682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13683
        return fields;
13684
      }
13685
 
13686
      /**
13687
       * Find the _Fields constant that matches name, or null if its not found.
13688
       */
13689
      public static _Fields findByName(String name) {
13690
        return byName.get(name);
13691
      }
13692
 
13693
      private final short _thriftId;
13694
      private final String _fieldName;
13695
 
13696
      _Fields(short thriftId, String fieldName) {
13697
        _thriftId = thriftId;
13698
        _fieldName = fieldName;
13699
      }
13700
 
13701
      public short getThriftFieldId() {
13702
        return _thriftId;
13703
      }
13704
 
13705
      public String getFieldName() {
13706
        return _fieldName;
13707
      }
13708
    }
13709
 
13710
    // isset id assignments
13711
 
13712
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13713
    static {
13714
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13715
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13716
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
13717
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13718
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_args.class, metaDataMap);
13719
    }
13720
 
13721
    public getPaymentsRequiringExtraProcessing_args() {
13722
    }
13723
 
13724
    public getPaymentsRequiringExtraProcessing_args(
13725
      ExtraPaymentProcessingType category)
13726
    {
13727
      this();
13728
      this.category = category;
13729
    }
13730
 
13731
    /**
13732
     * Performs a deep copy on <i>other</i>.
13733
     */
13734
    public getPaymentsRequiringExtraProcessing_args(getPaymentsRequiringExtraProcessing_args other) {
13735
      if (other.isSetCategory()) {
13736
        this.category = other.category;
13737
      }
13738
    }
13739
 
13740
    public getPaymentsRequiringExtraProcessing_args deepCopy() {
13741
      return new getPaymentsRequiringExtraProcessing_args(this);
13742
    }
13743
 
13744
    @Override
13745
    public void clear() {
13746
      this.category = null;
13747
    }
13748
 
13749
    /**
13750
     * 
13751
     * @see ExtraPaymentProcessingType
13752
     */
13753
    public ExtraPaymentProcessingType getCategory() {
13754
      return this.category;
13755
    }
13756
 
13757
    /**
13758
     * 
13759
     * @see ExtraPaymentProcessingType
13760
     */
13761
    public void setCategory(ExtraPaymentProcessingType category) {
13762
      this.category = category;
13763
    }
13764
 
13765
    public void unsetCategory() {
13766
      this.category = null;
13767
    }
13768
 
13769
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
13770
    public boolean isSetCategory() {
13771
      return this.category != null;
13772
    }
13773
 
13774
    public void setCategoryIsSet(boolean value) {
13775
      if (!value) {
13776
        this.category = null;
13777
      }
13778
    }
13779
 
13780
    public void setFieldValue(_Fields field, Object value) {
13781
      switch (field) {
13782
      case CATEGORY:
13783
        if (value == null) {
13784
          unsetCategory();
13785
        } else {
13786
          setCategory((ExtraPaymentProcessingType)value);
13787
        }
13788
        break;
13789
 
13790
      }
13791
    }
13792
 
13793
    public Object getFieldValue(_Fields field) {
13794
      switch (field) {
13795
      case CATEGORY:
13796
        return getCategory();
13797
 
13798
      }
13799
      throw new IllegalStateException();
13800
    }
13801
 
13802
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13803
    public boolean isSet(_Fields field) {
13804
      if (field == null) {
13805
        throw new IllegalArgumentException();
13806
      }
13807
 
13808
      switch (field) {
13809
      case CATEGORY:
13810
        return isSetCategory();
13811
      }
13812
      throw new IllegalStateException();
13813
    }
13814
 
13815
    @Override
13816
    public boolean equals(Object that) {
13817
      if (that == null)
13818
        return false;
13819
      if (that instanceof getPaymentsRequiringExtraProcessing_args)
13820
        return this.equals((getPaymentsRequiringExtraProcessing_args)that);
13821
      return false;
13822
    }
13823
 
13824
    public boolean equals(getPaymentsRequiringExtraProcessing_args that) {
13825
      if (that == null)
13826
        return false;
13827
 
13828
      boolean this_present_category = true && this.isSetCategory();
13829
      boolean that_present_category = true && that.isSetCategory();
13830
      if (this_present_category || that_present_category) {
13831
        if (!(this_present_category && that_present_category))
13832
          return false;
13833
        if (!this.category.equals(that.category))
13834
          return false;
13835
      }
13836
 
13837
      return true;
13838
    }
13839
 
13840
    @Override
13841
    public int hashCode() {
13842
      return 0;
13843
    }
13844
 
13845
    public int compareTo(getPaymentsRequiringExtraProcessing_args other) {
13846
      if (!getClass().equals(other.getClass())) {
13847
        return getClass().getName().compareTo(other.getClass().getName());
13848
      }
13849
 
13850
      int lastComparison = 0;
13851
      getPaymentsRequiringExtraProcessing_args typedOther = (getPaymentsRequiringExtraProcessing_args)other;
13852
 
13853
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
13854
      if (lastComparison != 0) {
13855
        return lastComparison;
13856
      }
13857
      if (isSetCategory()) {
13858
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
13859
        if (lastComparison != 0) {
13860
          return lastComparison;
13861
        }
13862
      }
13863
      return 0;
13864
    }
13865
 
13866
    public _Fields fieldForId(int fieldId) {
13867
      return _Fields.findByThriftId(fieldId);
13868
    }
13869
 
13870
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13871
      org.apache.thrift.protocol.TField field;
13872
      iprot.readStructBegin();
13873
      while (true)
13874
      {
13875
        field = iprot.readFieldBegin();
13876
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13877
          break;
13878
        }
13879
        switch (field.id) {
13880
          case 1: // CATEGORY
13881
            if (field.type == org.apache.thrift.protocol.TType.I32) {
13882
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
13883
            } else { 
13884
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13885
            }
13886
            break;
13887
          default:
13888
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13889
        }
13890
        iprot.readFieldEnd();
13891
      }
13892
      iprot.readStructEnd();
13893
      validate();
13894
    }
13895
 
13896
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13897
      validate();
13898
 
13899
      oprot.writeStructBegin(STRUCT_DESC);
13900
      if (this.category != null) {
13901
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
13902
        oprot.writeI32(this.category.getValue());
13903
        oprot.writeFieldEnd();
13904
      }
13905
      oprot.writeFieldStop();
13906
      oprot.writeStructEnd();
13907
    }
13908
 
13909
    @Override
13910
    public String toString() {
13911
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_args(");
13912
      boolean first = true;
13913
 
13914
      sb.append("category:");
13915
      if (this.category == null) {
13916
        sb.append("null");
13917
      } else {
13918
        sb.append(this.category);
13919
      }
13920
      first = false;
13921
      sb.append(")");
13922
      return sb.toString();
13923
    }
13924
 
13925
    public void validate() throws org.apache.thrift.TException {
13926
      // check for required fields
13927
    }
13928
 
13929
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13930
      try {
13931
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13932
      } catch (org.apache.thrift.TException te) {
13933
        throw new java.io.IOException(te);
13934
      }
13935
    }
13936
 
13937
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13938
      try {
13939
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13940
      } catch (org.apache.thrift.TException te) {
13941
        throw new java.io.IOException(te);
13942
      }
13943
    }
13944
 
13945
  }
13946
 
13947
  public static class getPaymentsRequiringExtraProcessing_result implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_result, getPaymentsRequiringExtraProcessing_result._Fields>, java.io.Serializable, Cloneable   {
13948
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_result");
13949
 
13950
    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);
13951
 
13952
    private List<Long> success; // required
13953
 
13954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13955
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13956
      SUCCESS((short)0, "success");
13957
 
13958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13959
 
13960
      static {
13961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13962
          byName.put(field.getFieldName(), field);
13963
        }
13964
      }
13965
 
13966
      /**
13967
       * Find the _Fields constant that matches fieldId, or null if its not found.
13968
       */
13969
      public static _Fields findByThriftId(int fieldId) {
13970
        switch(fieldId) {
13971
          case 0: // SUCCESS
13972
            return SUCCESS;
13973
          default:
13974
            return null;
13975
        }
13976
      }
13977
 
13978
      /**
13979
       * Find the _Fields constant that matches fieldId, throwing an exception
13980
       * if it is not found.
13981
       */
13982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13983
        _Fields fields = findByThriftId(fieldId);
13984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13985
        return fields;
13986
      }
13987
 
13988
      /**
13989
       * Find the _Fields constant that matches name, or null if its not found.
13990
       */
13991
      public static _Fields findByName(String name) {
13992
        return byName.get(name);
13993
      }
13994
 
13995
      private final short _thriftId;
13996
      private final String _fieldName;
13997
 
13998
      _Fields(short thriftId, String fieldName) {
13999
        _thriftId = thriftId;
14000
        _fieldName = fieldName;
14001
      }
14002
 
14003
      public short getThriftFieldId() {
14004
        return _thriftId;
14005
      }
14006
 
14007
      public String getFieldName() {
14008
        return _fieldName;
14009
      }
14010
    }
14011
 
14012
    // isset id assignments
14013
 
14014
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14015
    static {
14016
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14017
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14018
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14019
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
14020
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14021
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_result.class, metaDataMap);
14022
    }
14023
 
14024
    public getPaymentsRequiringExtraProcessing_result() {
14025
    }
14026
 
14027
    public getPaymentsRequiringExtraProcessing_result(
14028
      List<Long> success)
14029
    {
14030
      this();
14031
      this.success = success;
14032
    }
14033
 
14034
    /**
14035
     * Performs a deep copy on <i>other</i>.
14036
     */
14037
    public getPaymentsRequiringExtraProcessing_result(getPaymentsRequiringExtraProcessing_result other) {
14038
      if (other.isSetSuccess()) {
14039
        List<Long> __this__success = new ArrayList<Long>();
14040
        for (Long other_element : other.success) {
14041
          __this__success.add(other_element);
14042
        }
14043
        this.success = __this__success;
14044
      }
14045
    }
14046
 
14047
    public getPaymentsRequiringExtraProcessing_result deepCopy() {
14048
      return new getPaymentsRequiringExtraProcessing_result(this);
14049
    }
14050
 
14051
    @Override
14052
    public void clear() {
14053
      this.success = null;
14054
    }
14055
 
14056
    public int getSuccessSize() {
14057
      return (this.success == null) ? 0 : this.success.size();
14058
    }
14059
 
14060
    public java.util.Iterator<Long> getSuccessIterator() {
14061
      return (this.success == null) ? null : this.success.iterator();
14062
    }
14063
 
14064
    public void addToSuccess(long elem) {
14065
      if (this.success == null) {
14066
        this.success = new ArrayList<Long>();
14067
      }
14068
      this.success.add(elem);
14069
    }
14070
 
14071
    public List<Long> getSuccess() {
14072
      return this.success;
14073
    }
14074
 
14075
    public void setSuccess(List<Long> success) {
14076
      this.success = success;
14077
    }
14078
 
14079
    public void unsetSuccess() {
14080
      this.success = null;
14081
    }
14082
 
14083
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14084
    public boolean isSetSuccess() {
14085
      return this.success != null;
14086
    }
14087
 
14088
    public void setSuccessIsSet(boolean value) {
14089
      if (!value) {
14090
        this.success = null;
14091
      }
14092
    }
14093
 
14094
    public void setFieldValue(_Fields field, Object value) {
14095
      switch (field) {
14096
      case SUCCESS:
14097
        if (value == null) {
14098
          unsetSuccess();
14099
        } else {
14100
          setSuccess((List<Long>)value);
14101
        }
14102
        break;
14103
 
14104
      }
14105
    }
14106
 
14107
    public Object getFieldValue(_Fields field) {
14108
      switch (field) {
14109
      case SUCCESS:
14110
        return getSuccess();
14111
 
14112
      }
14113
      throw new IllegalStateException();
14114
    }
14115
 
14116
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14117
    public boolean isSet(_Fields field) {
14118
      if (field == null) {
14119
        throw new IllegalArgumentException();
14120
      }
14121
 
14122
      switch (field) {
14123
      case SUCCESS:
14124
        return isSetSuccess();
14125
      }
14126
      throw new IllegalStateException();
14127
    }
14128
 
14129
    @Override
14130
    public boolean equals(Object that) {
14131
      if (that == null)
14132
        return false;
14133
      if (that instanceof getPaymentsRequiringExtraProcessing_result)
14134
        return this.equals((getPaymentsRequiringExtraProcessing_result)that);
14135
      return false;
14136
    }
14137
 
14138
    public boolean equals(getPaymentsRequiringExtraProcessing_result that) {
14139
      if (that == null)
14140
        return false;
14141
 
14142
      boolean this_present_success = true && this.isSetSuccess();
14143
      boolean that_present_success = true && that.isSetSuccess();
14144
      if (this_present_success || that_present_success) {
14145
        if (!(this_present_success && that_present_success))
14146
          return false;
14147
        if (!this.success.equals(that.success))
14148
          return false;
14149
      }
14150
 
14151
      return true;
14152
    }
14153
 
14154
    @Override
14155
    public int hashCode() {
14156
      return 0;
14157
    }
14158
 
14159
    public int compareTo(getPaymentsRequiringExtraProcessing_result other) {
14160
      if (!getClass().equals(other.getClass())) {
14161
        return getClass().getName().compareTo(other.getClass().getName());
14162
      }
14163
 
14164
      int lastComparison = 0;
14165
      getPaymentsRequiringExtraProcessing_result typedOther = (getPaymentsRequiringExtraProcessing_result)other;
14166
 
14167
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14168
      if (lastComparison != 0) {
14169
        return lastComparison;
14170
      }
14171
      if (isSetSuccess()) {
14172
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14173
        if (lastComparison != 0) {
14174
          return lastComparison;
14175
        }
14176
      }
14177
      return 0;
14178
    }
14179
 
14180
    public _Fields fieldForId(int fieldId) {
14181
      return _Fields.findByThriftId(fieldId);
14182
    }
14183
 
14184
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14185
      org.apache.thrift.protocol.TField field;
14186
      iprot.readStructBegin();
14187
      while (true)
14188
      {
14189
        field = iprot.readFieldBegin();
14190
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14191
          break;
14192
        }
14193
        switch (field.id) {
14194
          case 0: // SUCCESS
14195
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14196
              {
4141 chandransh 14197
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
14198
                this.success = new ArrayList<Long>(_list36.size);
14199
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
4008 mandeep.dh 14200
                {
4141 chandransh 14201
                  long _elem38; // required
14202
                  _elem38 = iprot.readI64();
14203
                  this.success.add(_elem38);
4008 mandeep.dh 14204
                }
14205
                iprot.readListEnd();
14206
              }
14207
            } else { 
14208
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14209
            }
14210
            break;
14211
          default:
14212
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14213
        }
14214
        iprot.readFieldEnd();
14215
      }
14216
      iprot.readStructEnd();
14217
      validate();
14218
    }
14219
 
14220
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14221
      oprot.writeStructBegin(STRUCT_DESC);
14222
 
14223
      if (this.isSetSuccess()) {
14224
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14225
        {
14226
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
4141 chandransh 14227
          for (long _iter39 : this.success)
4008 mandeep.dh 14228
          {
4141 chandransh 14229
            oprot.writeI64(_iter39);
4008 mandeep.dh 14230
          }
14231
          oprot.writeListEnd();
14232
        }
14233
        oprot.writeFieldEnd();
14234
      }
14235
      oprot.writeFieldStop();
14236
      oprot.writeStructEnd();
14237
    }
14238
 
14239
    @Override
14240
    public String toString() {
14241
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_result(");
14242
      boolean first = true;
14243
 
14244
      sb.append("success:");
14245
      if (this.success == null) {
14246
        sb.append("null");
14247
      } else {
14248
        sb.append(this.success);
14249
      }
14250
      first = false;
14251
      sb.append(")");
14252
      return sb.toString();
14253
    }
14254
 
14255
    public void validate() throws org.apache.thrift.TException {
14256
      // check for required fields
14257
    }
14258
 
14259
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14260
      try {
14261
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14262
      } catch (org.apache.thrift.TException te) {
14263
        throw new java.io.IOException(te);
14264
      }
14265
    }
14266
 
14267
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14268
      try {
14269
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14270
      } catch (org.apache.thrift.TException te) {
14271
        throw new java.io.IOException(te);
14272
      }
14273
    }
14274
 
14275
  }
14276
 
14277
  public static class markPaymentAsProcessed_args implements org.apache.thrift.TBase<markPaymentAsProcessed_args, markPaymentAsProcessed_args._Fields>, java.io.Serializable, Cloneable   {
14278
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_args");
14279
 
14280
    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);
14281
    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);
14282
 
14283
    private long paymentId; // required
14284
    private ExtraPaymentProcessingType category; // required
14285
 
14286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14287
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14288
      PAYMENT_ID((short)1, "paymentId"),
14289
      /**
14290
       * 
14291
       * @see ExtraPaymentProcessingType
14292
       */
14293
      CATEGORY((short)2, "category");
14294
 
14295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14296
 
14297
      static {
14298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14299
          byName.put(field.getFieldName(), field);
14300
        }
14301
      }
14302
 
14303
      /**
14304
       * Find the _Fields constant that matches fieldId, or null if its not found.
14305
       */
14306
      public static _Fields findByThriftId(int fieldId) {
14307
        switch(fieldId) {
14308
          case 1: // PAYMENT_ID
14309
            return PAYMENT_ID;
14310
          case 2: // CATEGORY
14311
            return CATEGORY;
14312
          default:
14313
            return null;
14314
        }
14315
      }
14316
 
14317
      /**
14318
       * Find the _Fields constant that matches fieldId, throwing an exception
14319
       * if it is not found.
14320
       */
14321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14322
        _Fields fields = findByThriftId(fieldId);
14323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14324
        return fields;
14325
      }
14326
 
14327
      /**
14328
       * Find the _Fields constant that matches name, or null if its not found.
14329
       */
14330
      public static _Fields findByName(String name) {
14331
        return byName.get(name);
14332
      }
14333
 
14334
      private final short _thriftId;
14335
      private final String _fieldName;
14336
 
14337
      _Fields(short thriftId, String fieldName) {
14338
        _thriftId = thriftId;
14339
        _fieldName = fieldName;
14340
      }
14341
 
14342
      public short getThriftFieldId() {
14343
        return _thriftId;
14344
      }
14345
 
14346
      public String getFieldName() {
14347
        return _fieldName;
14348
      }
14349
    }
14350
 
14351
    // isset id assignments
14352
    private static final int __PAYMENTID_ISSET_ID = 0;
14353
    private BitSet __isset_bit_vector = new BitSet(1);
14354
 
14355
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14356
    static {
14357
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14358
      tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14359
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14360
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14361
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
14362
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14363
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_args.class, metaDataMap);
14364
    }
14365
 
14366
    public markPaymentAsProcessed_args() {
14367
    }
14368
 
14369
    public markPaymentAsProcessed_args(
14370
      long paymentId,
14371
      ExtraPaymentProcessingType category)
14372
    {
14373
      this();
14374
      this.paymentId = paymentId;
14375
      setPaymentIdIsSet(true);
14376
      this.category = category;
14377
    }
14378
 
14379
    /**
14380
     * Performs a deep copy on <i>other</i>.
14381
     */
14382
    public markPaymentAsProcessed_args(markPaymentAsProcessed_args other) {
14383
      __isset_bit_vector.clear();
14384
      __isset_bit_vector.or(other.__isset_bit_vector);
14385
      this.paymentId = other.paymentId;
14386
      if (other.isSetCategory()) {
14387
        this.category = other.category;
14388
      }
14389
    }
14390
 
14391
    public markPaymentAsProcessed_args deepCopy() {
14392
      return new markPaymentAsProcessed_args(this);
14393
    }
14394
 
14395
    @Override
14396
    public void clear() {
14397
      setPaymentIdIsSet(false);
14398
      this.paymentId = 0;
14399
      this.category = null;
14400
    }
14401
 
14402
    public long getPaymentId() {
14403
      return this.paymentId;
14404
    }
14405
 
14406
    public void setPaymentId(long paymentId) {
14407
      this.paymentId = paymentId;
14408
      setPaymentIdIsSet(true);
14409
    }
14410
 
14411
    public void unsetPaymentId() {
14412
      __isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
14413
    }
14414
 
14415
    /** Returns true if field paymentId is set (has been assigned a value) and false otherwise */
14416
    public boolean isSetPaymentId() {
14417
      return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
14418
    }
14419
 
14420
    public void setPaymentIdIsSet(boolean value) {
14421
      __isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
14422
    }
14423
 
14424
    /**
14425
     * 
14426
     * @see ExtraPaymentProcessingType
14427
     */
14428
    public ExtraPaymentProcessingType getCategory() {
14429
      return this.category;
14430
    }
14431
 
14432
    /**
14433
     * 
14434
     * @see ExtraPaymentProcessingType
14435
     */
14436
    public void setCategory(ExtraPaymentProcessingType category) {
14437
      this.category = category;
14438
    }
14439
 
14440
    public void unsetCategory() {
14441
      this.category = null;
14442
    }
14443
 
14444
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
14445
    public boolean isSetCategory() {
14446
      return this.category != null;
14447
    }
14448
 
14449
    public void setCategoryIsSet(boolean value) {
14450
      if (!value) {
14451
        this.category = null;
14452
      }
14453
    }
14454
 
14455
    public void setFieldValue(_Fields field, Object value) {
14456
      switch (field) {
14457
      case PAYMENT_ID:
14458
        if (value == null) {
14459
          unsetPaymentId();
14460
        } else {
14461
          setPaymentId((Long)value);
14462
        }
14463
        break;
14464
 
14465
      case CATEGORY:
14466
        if (value == null) {
14467
          unsetCategory();
14468
        } else {
14469
          setCategory((ExtraPaymentProcessingType)value);
14470
        }
14471
        break;
14472
 
14473
      }
14474
    }
14475
 
14476
    public Object getFieldValue(_Fields field) {
14477
      switch (field) {
14478
      case PAYMENT_ID:
14479
        return Long.valueOf(getPaymentId());
14480
 
14481
      case CATEGORY:
14482
        return getCategory();
14483
 
14484
      }
14485
      throw new IllegalStateException();
14486
    }
14487
 
14488
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14489
    public boolean isSet(_Fields field) {
14490
      if (field == null) {
14491
        throw new IllegalArgumentException();
14492
      }
14493
 
14494
      switch (field) {
14495
      case PAYMENT_ID:
14496
        return isSetPaymentId();
14497
      case CATEGORY:
14498
        return isSetCategory();
14499
      }
14500
      throw new IllegalStateException();
14501
    }
14502
 
14503
    @Override
14504
    public boolean equals(Object that) {
14505
      if (that == null)
14506
        return false;
14507
      if (that instanceof markPaymentAsProcessed_args)
14508
        return this.equals((markPaymentAsProcessed_args)that);
14509
      return false;
14510
    }
14511
 
14512
    public boolean equals(markPaymentAsProcessed_args that) {
14513
      if (that == null)
14514
        return false;
14515
 
14516
      boolean this_present_paymentId = true;
14517
      boolean that_present_paymentId = true;
14518
      if (this_present_paymentId || that_present_paymentId) {
14519
        if (!(this_present_paymentId && that_present_paymentId))
14520
          return false;
14521
        if (this.paymentId != that.paymentId)
14522
          return false;
14523
      }
14524
 
14525
      boolean this_present_category = true && this.isSetCategory();
14526
      boolean that_present_category = true && that.isSetCategory();
14527
      if (this_present_category || that_present_category) {
14528
        if (!(this_present_category && that_present_category))
14529
          return false;
14530
        if (!this.category.equals(that.category))
14531
          return false;
14532
      }
14533
 
14534
      return true;
14535
    }
14536
 
14537
    @Override
14538
    public int hashCode() {
14539
      return 0;
14540
    }
14541
 
14542
    public int compareTo(markPaymentAsProcessed_args other) {
14543
      if (!getClass().equals(other.getClass())) {
14544
        return getClass().getName().compareTo(other.getClass().getName());
14545
      }
14546
 
14547
      int lastComparison = 0;
14548
      markPaymentAsProcessed_args typedOther = (markPaymentAsProcessed_args)other;
14549
 
14550
      lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(typedOther.isSetPaymentId());
14551
      if (lastComparison != 0) {
14552
        return lastComparison;
14553
      }
14554
      if (isSetPaymentId()) {
14555
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentId, typedOther.paymentId);
14556
        if (lastComparison != 0) {
14557
          return lastComparison;
14558
        }
14559
      }
14560
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
14561
      if (lastComparison != 0) {
14562
        return lastComparison;
14563
      }
14564
      if (isSetCategory()) {
14565
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
14566
        if (lastComparison != 0) {
14567
          return lastComparison;
14568
        }
14569
      }
14570
      return 0;
14571
    }
14572
 
14573
    public _Fields fieldForId(int fieldId) {
14574
      return _Fields.findByThriftId(fieldId);
14575
    }
14576
 
14577
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14578
      org.apache.thrift.protocol.TField field;
14579
      iprot.readStructBegin();
14580
      while (true)
14581
      {
14582
        field = iprot.readFieldBegin();
14583
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14584
          break;
14585
        }
14586
        switch (field.id) {
14587
          case 1: // PAYMENT_ID
14588
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14589
              this.paymentId = iprot.readI64();
14590
              setPaymentIdIsSet(true);
14591
            } else { 
14592
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14593
            }
14594
            break;
14595
          case 2: // CATEGORY
14596
            if (field.type == org.apache.thrift.protocol.TType.I32) {
14597
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
14598
            } else { 
14599
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14600
            }
14601
            break;
14602
          default:
14603
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14604
        }
14605
        iprot.readFieldEnd();
14606
      }
14607
      iprot.readStructEnd();
14608
      validate();
14609
    }
14610
 
14611
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14612
      validate();
14613
 
14614
      oprot.writeStructBegin(STRUCT_DESC);
14615
      oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
14616
      oprot.writeI64(this.paymentId);
14617
      oprot.writeFieldEnd();
14618
      if (this.category != null) {
14619
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
14620
        oprot.writeI32(this.category.getValue());
14621
        oprot.writeFieldEnd();
14622
      }
14623
      oprot.writeFieldStop();
14624
      oprot.writeStructEnd();
14625
    }
14626
 
14627
    @Override
14628
    public String toString() {
14629
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_args(");
14630
      boolean first = true;
14631
 
14632
      sb.append("paymentId:");
14633
      sb.append(this.paymentId);
14634
      first = false;
14635
      if (!first) sb.append(", ");
14636
      sb.append("category:");
14637
      if (this.category == null) {
14638
        sb.append("null");
14639
      } else {
14640
        sb.append(this.category);
14641
      }
14642
      first = false;
14643
      sb.append(")");
14644
      return sb.toString();
14645
    }
14646
 
14647
    public void validate() throws org.apache.thrift.TException {
14648
      // check for required fields
14649
    }
14650
 
14651
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14652
      try {
14653
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14654
      } catch (org.apache.thrift.TException te) {
14655
        throw new java.io.IOException(te);
14656
      }
14657
    }
14658
 
14659
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14660
      try {
14661
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14662
      } catch (org.apache.thrift.TException te) {
14663
        throw new java.io.IOException(te);
14664
      }
14665
    }
14666
 
14667
  }
14668
 
14669
  public static class markPaymentAsProcessed_result implements org.apache.thrift.TBase<markPaymentAsProcessed_result, markPaymentAsProcessed_result._Fields>, java.io.Serializable, Cloneable   {
14670
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_result");
14671
 
14672
 
14673
 
14674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14675
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14676
;
14677
 
14678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14679
 
14680
      static {
14681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14682
          byName.put(field.getFieldName(), field);
14683
        }
14684
      }
14685
 
14686
      /**
14687
       * Find the _Fields constant that matches fieldId, or null if its not found.
14688
       */
14689
      public static _Fields findByThriftId(int fieldId) {
14690
        switch(fieldId) {
14691
          default:
14692
            return null;
14693
        }
14694
      }
14695
 
14696
      /**
14697
       * Find the _Fields constant that matches fieldId, throwing an exception
14698
       * if it is not found.
14699
       */
14700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14701
        _Fields fields = findByThriftId(fieldId);
14702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14703
        return fields;
14704
      }
14705
 
14706
      /**
14707
       * Find the _Fields constant that matches name, or null if its not found.
14708
       */
14709
      public static _Fields findByName(String name) {
14710
        return byName.get(name);
14711
      }
14712
 
14713
      private final short _thriftId;
14714
      private final String _fieldName;
14715
 
14716
      _Fields(short thriftId, String fieldName) {
14717
        _thriftId = thriftId;
14718
        _fieldName = fieldName;
14719
      }
14720
 
14721
      public short getThriftFieldId() {
14722
        return _thriftId;
14723
      }
14724
 
14725
      public String getFieldName() {
14726
        return _fieldName;
14727
      }
14728
    }
14729
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14730
    static {
14731
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14732
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14733
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_result.class, metaDataMap);
14734
    }
14735
 
14736
    public markPaymentAsProcessed_result() {
14737
    }
14738
 
14739
    /**
14740
     * Performs a deep copy on <i>other</i>.
14741
     */
14742
    public markPaymentAsProcessed_result(markPaymentAsProcessed_result other) {
14743
    }
14744
 
14745
    public markPaymentAsProcessed_result deepCopy() {
14746
      return new markPaymentAsProcessed_result(this);
14747
    }
14748
 
14749
    @Override
14750
    public void clear() {
14751
    }
14752
 
14753
    public void setFieldValue(_Fields field, Object value) {
14754
      switch (field) {
14755
      }
14756
    }
14757
 
14758
    public Object getFieldValue(_Fields field) {
14759
      switch (field) {
14760
      }
14761
      throw new IllegalStateException();
14762
    }
14763
 
14764
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14765
    public boolean isSet(_Fields field) {
14766
      if (field == null) {
14767
        throw new IllegalArgumentException();
14768
      }
14769
 
14770
      switch (field) {
14771
      }
14772
      throw new IllegalStateException();
14773
    }
14774
 
14775
    @Override
14776
    public boolean equals(Object that) {
14777
      if (that == null)
14778
        return false;
14779
      if (that instanceof markPaymentAsProcessed_result)
14780
        return this.equals((markPaymentAsProcessed_result)that);
14781
      return false;
14782
    }
14783
 
14784
    public boolean equals(markPaymentAsProcessed_result that) {
14785
      if (that == null)
14786
        return false;
14787
 
14788
      return true;
14789
    }
14790
 
14791
    @Override
14792
    public int hashCode() {
14793
      return 0;
14794
    }
14795
 
14796
    public int compareTo(markPaymentAsProcessed_result other) {
14797
      if (!getClass().equals(other.getClass())) {
14798
        return getClass().getName().compareTo(other.getClass().getName());
14799
      }
14800
 
14801
      int lastComparison = 0;
14802
      markPaymentAsProcessed_result typedOther = (markPaymentAsProcessed_result)other;
14803
 
14804
      return 0;
14805
    }
14806
 
14807
    public _Fields fieldForId(int fieldId) {
14808
      return _Fields.findByThriftId(fieldId);
14809
    }
14810
 
14811
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14812
      org.apache.thrift.protocol.TField field;
14813
      iprot.readStructBegin();
14814
      while (true)
14815
      {
14816
        field = iprot.readFieldBegin();
14817
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14818
          break;
14819
        }
14820
        switch (field.id) {
14821
          default:
14822
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14823
        }
14824
        iprot.readFieldEnd();
14825
      }
14826
      iprot.readStructEnd();
14827
      validate();
14828
    }
14829
 
14830
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14831
      oprot.writeStructBegin(STRUCT_DESC);
14832
 
14833
      oprot.writeFieldStop();
14834
      oprot.writeStructEnd();
14835
    }
14836
 
14837
    @Override
14838
    public String toString() {
14839
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_result(");
14840
      boolean first = true;
14841
 
14842
      sb.append(")");
14843
      return sb.toString();
14844
    }
14845
 
14846
    public void validate() throws org.apache.thrift.TException {
14847
      // check for required fields
14848
    }
14849
 
14850
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14851
      try {
14852
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14853
      } catch (org.apache.thrift.TException te) {
14854
        throw new java.io.IOException(te);
14855
      }
14856
    }
14857
 
14858
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14859
      try {
14860
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14861
      } catch (org.apache.thrift.TException te) {
14862
        throw new java.io.IOException(te);
14863
      }
14864
    }
14865
 
14866
  }
14867
 
123 ashish 14868
}