Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
123 ashish 1
/**
2
 * Autogenerated by Thrift
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;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
695 rajveer 26
public class Payment implements TBase<Payment._Fields>, java.io.Serializable, Cloneable, Comparable<Payment> {
123 ashish 27
  private static final TStruct STRUCT_DESC = new TStruct("Payment");
28
 
695 rajveer 29
  private static final TField PAYMENT_ID_FIELD_DESC = new TField("paymentId", TType.I64, (short)1);
30
  private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)2);
31
  private static final TField GATEWAY_PAYMENT_ID_FIELD_DESC = new TField("gatewayPaymentId", TType.STRING, (short)3);
705 chandransh 32
  private static final TField MERCHANT_TXN_ID_FIELD_DESC = new TField("merchantTxnId", TType.I64, (short)4);
695 rajveer 33
  private static final TField GATEWAY_TXN_ID_FIELD_DESC = new TField("gatewayTxnId", TType.STRING, (short)5);
34
  private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)6);
35
  private static final TField GATEWAY_TXN_STATUS_FIELD_DESC = new TField("gatewayTxnStatus", TType.STRING, (short)7);
36
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)8);
37
  private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)9);
38
  private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.STRING, (short)10);
39
  private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)11);
40
  private static final TField AUTH_CODE_FIELD_DESC = new TField("authCode", TType.STRING, (short)12);
41
  private static final TField REFERENCE_CODE_FIELD_DESC = new TField("referenceCode", TType.STRING, (short)13);
42
  private static final TField SESSION_ID_FIELD_DESC = new TField("sessionId", TType.STRING, (short)14);
43
  private static final TField GATEWAY_TXN_DATE_FIELD_DESC = new TField("gatewayTxnDate", TType.STRING, (short)15);
44
  private static final TField ATTRIBUTES_FIELD_DESC = new TField("attributes", TType.LIST, (short)16);
45
  private static final TField INIT_TIMESTAMP_FIELD_DESC = new TField("initTimestamp", TType.I64, (short)17);
46
  private static final TField SUCCESS_TIMESTAMP_FIELD_DESC = new TField("successTimestamp", TType.I64, (short)18);
47
  private static final TField ERROR_TIMESTAMP_FIELD_DESC = new TField("errorTimestamp", TType.I64, (short)19);
123 ashish 48
 
695 rajveer 49
  private long paymentId;
50
  private long gatewayId;
51
  private String gatewayPaymentId;
705 chandransh 52
  private long merchantTxnId;
695 rajveer 53
  private String gatewayTxnId;
123 ashish 54
  private double amount;
695 rajveer 55
  private String gatewayTxnStatus;
123 ashish 56
  private PaymentStatus status;
695 rajveer 57
  private long userId;
58
  private String errorCode;
59
  private String description;
60
  private String authCode;
61
  private String referenceCode;
62
  private String sessionId;
63
  private String gatewayTxnDate;
64
  private List<Attribute> attributes;
65
  private long initTimestamp;
66
  private long successTimestamp;
67
  private long errorTimestamp;
123 ashish 68
 
69
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
70
  public enum _Fields implements TFieldIdEnum {
695 rajveer 71
    PAYMENT_ID((short)1, "paymentId"),
72
    GATEWAY_ID((short)2, "gatewayId"),
73
    GATEWAY_PAYMENT_ID((short)3, "gatewayPaymentId"),
74
    MERCHANT_TXN_ID((short)4, "merchantTxnId"),
75
    GATEWAY_TXN_ID((short)5, "gatewayTxnId"),
76
    AMOUNT((short)6, "amount"),
77
    GATEWAY_TXN_STATUS((short)7, "gatewayTxnStatus"),
123 ashish 78
    /**
79
     * 
80
     * @see PaymentStatus
81
     */
695 rajveer 82
    STATUS((short)8, "status"),
83
    USER_ID((short)9, "userId"),
84
    ERROR_CODE((short)10, "errorCode"),
85
    DESCRIPTION((short)11, "description"),
86
    AUTH_CODE((short)12, "authCode"),
87
    REFERENCE_CODE((short)13, "referenceCode"),
88
    SESSION_ID((short)14, "sessionId"),
89
    GATEWAY_TXN_DATE((short)15, "gatewayTxnDate"),
90
    ATTRIBUTES((short)16, "attributes"),
91
    INIT_TIMESTAMP((short)17, "initTimestamp"),
92
    SUCCESS_TIMESTAMP((short)18, "successTimestamp"),
93
    ERROR_TIMESTAMP((short)19, "errorTimestamp");
123 ashish 94
 
95
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
96
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
97
 
98
    static {
99
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
100
        byId.put((int)field._thriftId, field);
101
        byName.put(field.getFieldName(), field);
102
      }
103
    }
104
 
105
    /**
106
     * Find the _Fields constant that matches fieldId, or null if its not found.
107
     */
108
    public static _Fields findByThriftId(int fieldId) {
109
      return byId.get(fieldId);
110
    }
111
 
112
    /**
113
     * Find the _Fields constant that matches fieldId, throwing an exception
114
     * if it is not found.
115
     */
116
    public static _Fields findByThriftIdOrThrow(int fieldId) {
117
      _Fields fields = findByThriftId(fieldId);
118
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
119
      return fields;
120
    }
121
 
122
    /**
123
     * Find the _Fields constant that matches name, or null if its not found.
124
     */
125
    public static _Fields findByName(String name) {
126
      return byName.get(name);
127
    }
128
 
129
    private final short _thriftId;
130
    private final String _fieldName;
131
 
132
    _Fields(short thriftId, String fieldName) {
133
      _thriftId = thriftId;
134
      _fieldName = fieldName;
135
    }
136
 
137
    public short getThriftFieldId() {
138
      return _thriftId;
139
    }
140
 
141
    public String getFieldName() {
142
      return _fieldName;
143
    }
144
  }
145
 
146
  // isset id assignments
695 rajveer 147
  private static final int __PAYMENTID_ISSET_ID = 0;
148
  private static final int __GATEWAYID_ISSET_ID = 1;
705 chandransh 149
  private static final int __MERCHANTTXNID_ISSET_ID = 2;
150
  private static final int __AMOUNT_ISSET_ID = 3;
151
  private static final int __USERID_ISSET_ID = 4;
152
  private static final int __INITTIMESTAMP_ISSET_ID = 5;
153
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 6;
154
  private static final int __ERRORTIMESTAMP_ISSET_ID = 7;
155
  private BitSet __isset_bit_vector = new BitSet(8);
123 ashish 156
 
157
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 158
    put(_Fields.PAYMENT_ID, new FieldMetaData("paymentId", TFieldRequirementType.DEFAULT, 
159
        new FieldValueMetaData(TType.I64)));
160
    put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
161
        new FieldValueMetaData(TType.I64)));
162
    put(_Fields.GATEWAY_PAYMENT_ID, new FieldMetaData("gatewayPaymentId", TFieldRequirementType.DEFAULT, 
420 ashish 163
        new FieldValueMetaData(TType.STRING)));
695 rajveer 164
    put(_Fields.MERCHANT_TXN_ID, new FieldMetaData("merchantTxnId", TFieldRequirementType.DEFAULT, 
705 chandransh 165
        new FieldValueMetaData(TType.I64)));
695 rajveer 166
    put(_Fields.GATEWAY_TXN_ID, new FieldMetaData("gatewayTxnId", TFieldRequirementType.DEFAULT, 
167
        new FieldValueMetaData(TType.STRING)));
123 ashish 168
    put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
169
        new FieldValueMetaData(TType.DOUBLE)));
695 rajveer 170
    put(_Fields.GATEWAY_TXN_STATUS, new FieldMetaData("gatewayTxnStatus", TFieldRequirementType.DEFAULT, 
123 ashish 171
        new FieldValueMetaData(TType.STRING)));
172
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
173
        new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 174
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
123 ashish 175
        new FieldValueMetaData(TType.I64)));
695 rajveer 176
    put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, 
420 ashish 177
        new FieldValueMetaData(TType.STRING)));
695 rajveer 178
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
420 ashish 179
        new FieldValueMetaData(TType.STRING)));
695 rajveer 180
    put(_Fields.AUTH_CODE, new FieldMetaData("authCode", TFieldRequirementType.DEFAULT, 
420 ashish 181
        new FieldValueMetaData(TType.STRING)));
695 rajveer 182
    put(_Fields.REFERENCE_CODE, new FieldMetaData("referenceCode", TFieldRequirementType.DEFAULT, 
420 ashish 183
        new FieldValueMetaData(TType.STRING)));
695 rajveer 184
    put(_Fields.SESSION_ID, new FieldMetaData("sessionId", TFieldRequirementType.DEFAULT, 
420 ashish 185
        new FieldValueMetaData(TType.STRING)));
695 rajveer 186
    put(_Fields.GATEWAY_TXN_DATE, new FieldMetaData("gatewayTxnDate", TFieldRequirementType.DEFAULT, 
420 ashish 187
        new FieldValueMetaData(TType.STRING)));
695 rajveer 188
    put(_Fields.ATTRIBUTES, new FieldMetaData("attributes", TFieldRequirementType.DEFAULT, 
189
        new ListMetaData(TType.LIST, 
190
            new StructMetaData(TType.STRUCT, Attribute.class))));
191
    put(_Fields.INIT_TIMESTAMP, new FieldMetaData("initTimestamp", TFieldRequirementType.DEFAULT, 
192
        new FieldValueMetaData(TType.I64)));
193
    put(_Fields.SUCCESS_TIMESTAMP, new FieldMetaData("successTimestamp", TFieldRequirementType.DEFAULT, 
194
        new FieldValueMetaData(TType.I64)));
195
    put(_Fields.ERROR_TIMESTAMP, new FieldMetaData("errorTimestamp", TFieldRequirementType.DEFAULT, 
196
        new FieldValueMetaData(TType.I64)));
123 ashish 197
  }});
198
 
199
  static {
200
    FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
201
  }
202
 
203
  public Payment() {
204
  }
205
 
206
  public Payment(
695 rajveer 207
    long paymentId,
208
    long gatewayId,
209
    String gatewayPaymentId,
705 chandransh 210
    long merchantTxnId,
695 rajveer 211
    String gatewayTxnId,
123 ashish 212
    double amount,
695 rajveer 213
    String gatewayTxnStatus,
123 ashish 214
    PaymentStatus status,
695 rajveer 215
    long userId,
216
    String errorCode,
217
    String description,
218
    String authCode,
219
    String referenceCode,
220
    String sessionId,
221
    String gatewayTxnDate,
222
    List<Attribute> attributes,
223
    long initTimestamp,
224
    long successTimestamp,
225
    long errorTimestamp)
123 ashish 226
  {
227
    this();
695 rajveer 228
    this.paymentId = paymentId;
229
    setPaymentIdIsSet(true);
230
    this.gatewayId = gatewayId;
231
    setGatewayIdIsSet(true);
232
    this.gatewayPaymentId = gatewayPaymentId;
233
    this.merchantTxnId = merchantTxnId;
705 chandransh 234
    setMerchantTxnIdIsSet(true);
695 rajveer 235
    this.gatewayTxnId = gatewayTxnId;
123 ashish 236
    this.amount = amount;
237
    setAmountIsSet(true);
695 rajveer 238
    this.gatewayTxnStatus = gatewayTxnStatus;
123 ashish 239
    this.status = status;
695 rajveer 240
    this.userId = userId;
241
    setUserIdIsSet(true);
242
    this.errorCode = errorCode;
243
    this.description = description;
244
    this.authCode = authCode;
245
    this.referenceCode = referenceCode;
246
    this.sessionId = sessionId;
247
    this.gatewayTxnDate = gatewayTxnDate;
248
    this.attributes = attributes;
249
    this.initTimestamp = initTimestamp;
250
    setInitTimestampIsSet(true);
251
    this.successTimestamp = successTimestamp;
252
    setSuccessTimestampIsSet(true);
253
    this.errorTimestamp = errorTimestamp;
254
    setErrorTimestampIsSet(true);
123 ashish 255
  }
256
 
257
  /**
258
   * Performs a deep copy on <i>other</i>.
259
   */
260
  public Payment(Payment other) {
261
    __isset_bit_vector.clear();
262
    __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 263
    this.paymentId = other.paymentId;
264
    this.gatewayId = other.gatewayId;
265
    if (other.isSetGatewayPaymentId()) {
266
      this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 267
    }
705 chandransh 268
    this.merchantTxnId = other.merchantTxnId;
695 rajveer 269
    if (other.isSetGatewayTxnId()) {
270
      this.gatewayTxnId = other.gatewayTxnId;
271
    }
123 ashish 272
    this.amount = other.amount;
695 rajveer 273
    if (other.isSetGatewayTxnStatus()) {
274
      this.gatewayTxnStatus = other.gatewayTxnStatus;
123 ashish 275
    }
276
    if (other.isSetStatus()) {
277
      this.status = other.status;
278
    }
695 rajveer 279
    this.userId = other.userId;
280
    if (other.isSetErrorCode()) {
281
      this.errorCode = other.errorCode;
123 ashish 282
    }
695 rajveer 283
    if (other.isSetDescription()) {
284
      this.description = other.description;
123 ashish 285
    }
695 rajveer 286
    if (other.isSetAuthCode()) {
287
      this.authCode = other.authCode;
123 ashish 288
    }
695 rajveer 289
    if (other.isSetReferenceCode()) {
290
      this.referenceCode = other.referenceCode;
420 ashish 291
    }
695 rajveer 292
    if (other.isSetSessionId()) {
293
      this.sessionId = other.sessionId;
420 ashish 294
    }
695 rajveer 295
    if (other.isSetGatewayTxnDate()) {
296
      this.gatewayTxnDate = other.gatewayTxnDate;
420 ashish 297
    }
695 rajveer 298
    if (other.isSetAttributes()) {
299
      List<Attribute> __this__attributes = new ArrayList<Attribute>();
300
      for (Attribute other_element : other.attributes) {
301
        __this__attributes.add(new Attribute(other_element));
302
      }
303
      this.attributes = __this__attributes;
420 ashish 304
    }
695 rajveer 305
    this.initTimestamp = other.initTimestamp;
306
    this.successTimestamp = other.successTimestamp;
307
    this.errorTimestamp = other.errorTimestamp;
123 ashish 308
  }
309
 
310
  public Payment deepCopy() {
311
    return new Payment(this);
312
  }
313
 
314
  @Deprecated
315
  public Payment clone() {
316
    return new Payment(this);
317
  }
318
 
695 rajveer 319
  public long getPaymentId() {
320
    return this.paymentId;
123 ashish 321
  }
322
 
695 rajveer 323
  public Payment setPaymentId(long paymentId) {
324
    this.paymentId = paymentId;
325
    setPaymentIdIsSet(true);
123 ashish 326
    return this;
327
  }
328
 
695 rajveer 329
  public void unsetPaymentId() {
330
    __isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
123 ashish 331
  }
332
 
695 rajveer 333
  /** Returns true if field paymentId is set (has been asigned a value) and false otherwise */
334
  public boolean isSetPaymentId() {
335
    return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
123 ashish 336
  }
337
 
695 rajveer 338
  public void setPaymentIdIsSet(boolean value) {
339
    __isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
123 ashish 340
  }
341
 
695 rajveer 342
  public long getGatewayId() {
343
    return this.gatewayId;
123 ashish 344
  }
345
 
695 rajveer 346
  public Payment setGatewayId(long gatewayId) {
347
    this.gatewayId = gatewayId;
348
    setGatewayIdIsSet(true);
123 ashish 349
    return this;
350
  }
351
 
695 rajveer 352
  public void unsetGatewayId() {
353
    __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 354
  }
355
 
695 rajveer 356
  /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
357
  public boolean isSetGatewayId() {
358
    return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 359
  }
360
 
695 rajveer 361
  public void setGatewayIdIsSet(boolean value) {
362
    __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
363
  }
364
 
365
  public String getGatewayPaymentId() {
366
    return this.gatewayPaymentId;
367
  }
368
 
369
  public Payment setGatewayPaymentId(String gatewayPaymentId) {
370
    this.gatewayPaymentId = gatewayPaymentId;
371
    return this;
372
  }
373
 
374
  public void unsetGatewayPaymentId() {
375
    this.gatewayPaymentId = null;
376
  }
377
 
378
  /** Returns true if field gatewayPaymentId is set (has been asigned a value) and false otherwise */
379
  public boolean isSetGatewayPaymentId() {
380
    return this.gatewayPaymentId != null;
381
  }
382
 
383
  public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 384
    if (!value) {
695 rajveer 385
      this.gatewayPaymentId = null;
420 ashish 386
    }
123 ashish 387
  }
388
 
705 chandransh 389
  public long getMerchantTxnId() {
695 rajveer 390
    return this.merchantTxnId;
123 ashish 391
  }
392
 
705 chandransh 393
  public Payment setMerchantTxnId(long merchantTxnId) {
695 rajveer 394
    this.merchantTxnId = merchantTxnId;
705 chandransh 395
    setMerchantTxnIdIsSet(true);
123 ashish 396
    return this;
397
  }
398
 
695 rajveer 399
  public void unsetMerchantTxnId() {
705 chandransh 400
    __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
123 ashish 401
  }
402
 
695 rajveer 403
  /** Returns true if field merchantTxnId is set (has been asigned a value) and false otherwise */
404
  public boolean isSetMerchantTxnId() {
705 chandransh 405
    return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
123 ashish 406
  }
407
 
695 rajveer 408
  public void setMerchantTxnIdIsSet(boolean value) {
705 chandransh 409
    __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
123 ashish 410
  }
411
 
695 rajveer 412
  public String getGatewayTxnId() {
413
    return this.gatewayTxnId;
123 ashish 414
  }
415
 
695 rajveer 416
  public Payment setGatewayTxnId(String gatewayTxnId) {
417
    this.gatewayTxnId = gatewayTxnId;
123 ashish 418
    return this;
419
  }
420
 
695 rajveer 421
  public void unsetGatewayTxnId() {
422
    this.gatewayTxnId = null;
123 ashish 423
  }
424
 
695 rajveer 425
  /** Returns true if field gatewayTxnId is set (has been asigned a value) and false otherwise */
426
  public boolean isSetGatewayTxnId() {
427
    return this.gatewayTxnId != null;
123 ashish 428
  }
429
 
695 rajveer 430
  public void setGatewayTxnIdIsSet(boolean value) {
431
    if (!value) {
432
      this.gatewayTxnId = null;
433
    }
123 ashish 434
  }
435
 
695 rajveer 436
  public double getAmount() {
437
    return this.amount;
123 ashish 438
  }
439
 
695 rajveer 440
  public Payment setAmount(double amount) {
441
    this.amount = amount;
442
    setAmountIsSet(true);
123 ashish 443
    return this;
444
  }
445
 
695 rajveer 446
  public void unsetAmount() {
447
    __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
123 ashish 448
  }
449
 
695 rajveer 450
  /** Returns true if field amount is set (has been asigned a value) and false otherwise */
451
  public boolean isSetAmount() {
452
    return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
123 ashish 453
  }
454
 
695 rajveer 455
  public void setAmountIsSet(boolean value) {
456
    __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
123 ashish 457
  }
458
 
695 rajveer 459
  public String getGatewayTxnStatus() {
460
    return this.gatewayTxnStatus;
123 ashish 461
  }
462
 
695 rajveer 463
  public Payment setGatewayTxnStatus(String gatewayTxnStatus) {
464
    this.gatewayTxnStatus = gatewayTxnStatus;
123 ashish 465
    return this;
466
  }
467
 
695 rajveer 468
  public void unsetGatewayTxnStatus() {
469
    this.gatewayTxnStatus = null;
123 ashish 470
  }
471
 
695 rajveer 472
  /** Returns true if field gatewayTxnStatus is set (has been asigned a value) and false otherwise */
473
  public boolean isSetGatewayTxnStatus() {
474
    return this.gatewayTxnStatus != null;
123 ashish 475
  }
476
 
695 rajveer 477
  public void setGatewayTxnStatusIsSet(boolean value) {
123 ashish 478
    if (!value) {
695 rajveer 479
      this.gatewayTxnStatus = null;
123 ashish 480
    }
481
  }
482
 
483
  /**
484
   * 
485
   * @see PaymentStatus
486
   */
487
  public PaymentStatus getStatus() {
488
    return this.status;
489
  }
490
 
491
  /**
492
   * 
493
   * @see PaymentStatus
494
   */
495
  public Payment setStatus(PaymentStatus status) {
496
    this.status = status;
497
    return this;
498
  }
499
 
500
  public void unsetStatus() {
501
    this.status = null;
502
  }
503
 
504
  /** Returns true if field status is set (has been asigned a value) and false otherwise */
505
  public boolean isSetStatus() {
506
    return this.status != null;
507
  }
508
 
509
  public void setStatusIsSet(boolean value) {
510
    if (!value) {
511
      this.status = null;
512
    }
513
  }
514
 
695 rajveer 515
  public long getUserId() {
516
    return this.userId;
123 ashish 517
  }
518
 
695 rajveer 519
  public Payment setUserId(long userId) {
520
    this.userId = userId;
521
    setUserIdIsSet(true);
123 ashish 522
    return this;
523
  }
524
 
695 rajveer 525
  public void unsetUserId() {
526
    __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 527
  }
528
 
695 rajveer 529
  /** Returns true if field userId is set (has been asigned a value) and false otherwise */
530
  public boolean isSetUserId() {
531
    return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 532
  }
533
 
695 rajveer 534
  public void setUserIdIsSet(boolean value) {
535
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 536
  }
537
 
695 rajveer 538
  public String getErrorCode() {
539
    return this.errorCode;
123 ashish 540
  }
541
 
695 rajveer 542
  public Payment setErrorCode(String errorCode) {
543
    this.errorCode = errorCode;
123 ashish 544
    return this;
545
  }
546
 
695 rajveer 547
  public void unsetErrorCode() {
548
    this.errorCode = null;
123 ashish 549
  }
550
 
695 rajveer 551
  /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */
552
  public boolean isSetErrorCode() {
553
    return this.errorCode != null;
123 ashish 554
  }
555
 
695 rajveer 556
  public void setErrorCodeIsSet(boolean value) {
557
    if (!value) {
558
      this.errorCode = null;
559
    }
123 ashish 560
  }
561
 
695 rajveer 562
  public String getDescription() {
563
    return this.description;
123 ashish 564
  }
565
 
695 rajveer 566
  public Payment setDescription(String description) {
567
    this.description = description;
123 ashish 568
    return this;
569
  }
570
 
695 rajveer 571
  public void unsetDescription() {
572
    this.description = null;
123 ashish 573
  }
574
 
695 rajveer 575
  /** Returns true if field description is set (has been asigned a value) and false otherwise */
576
  public boolean isSetDescription() {
577
    return this.description != null;
123 ashish 578
  }
579
 
695 rajveer 580
  public void setDescriptionIsSet(boolean value) {
581
    if (!value) {
582
      this.description = null;
123 ashish 583
    }
584
  }
585
 
695 rajveer 586
  public String getAuthCode() {
587
    return this.authCode;
123 ashish 588
  }
589
 
695 rajveer 590
  public Payment setAuthCode(String authCode) {
591
    this.authCode = authCode;
123 ashish 592
    return this;
593
  }
594
 
695 rajveer 595
  public void unsetAuthCode() {
596
    this.authCode = null;
123 ashish 597
  }
598
 
695 rajveer 599
  /** Returns true if field authCode is set (has been asigned a value) and false otherwise */
600
  public boolean isSetAuthCode() {
601
    return this.authCode != null;
123 ashish 602
  }
603
 
695 rajveer 604
  public void setAuthCodeIsSet(boolean value) {
123 ashish 605
    if (!value) {
695 rajveer 606
      this.authCode = null;
123 ashish 607
    }
608
  }
609
 
695 rajveer 610
  public String getReferenceCode() {
611
    return this.referenceCode;
123 ashish 612
  }
613
 
695 rajveer 614
  public Payment setReferenceCode(String referenceCode) {
615
    this.referenceCode = referenceCode;
123 ashish 616
    return this;
617
  }
618
 
695 rajveer 619
  public void unsetReferenceCode() {
620
    this.referenceCode = null;
123 ashish 621
  }
622
 
695 rajveer 623
  /** Returns true if field referenceCode is set (has been asigned a value) and false otherwise */
624
  public boolean isSetReferenceCode() {
625
    return this.referenceCode != null;
123 ashish 626
  }
627
 
695 rajveer 628
  public void setReferenceCodeIsSet(boolean value) {
629
    if (!value) {
630
      this.referenceCode = null;
631
    }
420 ashish 632
  }
633
 
695 rajveer 634
  public String getSessionId() {
635
    return this.sessionId;
420 ashish 636
  }
637
 
695 rajveer 638
  public Payment setSessionId(String sessionId) {
639
    this.sessionId = sessionId;
420 ashish 640
    return this;
641
  }
642
 
695 rajveer 643
  public void unsetSessionId() {
644
    this.sessionId = null;
420 ashish 645
  }
646
 
695 rajveer 647
  /** Returns true if field sessionId is set (has been asigned a value) and false otherwise */
648
  public boolean isSetSessionId() {
649
    return this.sessionId != null;
420 ashish 650
  }
651
 
695 rajveer 652
  public void setSessionIdIsSet(boolean value) {
123 ashish 653
    if (!value) {
695 rajveer 654
      this.sessionId = null;
123 ashish 655
    }
656
  }
657
 
695 rajveer 658
  public String getGatewayTxnDate() {
659
    return this.gatewayTxnDate;
420 ashish 660
  }
661
 
695 rajveer 662
  public Payment setGatewayTxnDate(String gatewayTxnDate) {
663
    this.gatewayTxnDate = gatewayTxnDate;
420 ashish 664
    return this;
665
  }
666
 
695 rajveer 667
  public void unsetGatewayTxnDate() {
668
    this.gatewayTxnDate = null;
420 ashish 669
  }
670
 
695 rajveer 671
  /** Returns true if field gatewayTxnDate is set (has been asigned a value) and false otherwise */
672
  public boolean isSetGatewayTxnDate() {
673
    return this.gatewayTxnDate != null;
420 ashish 674
  }
675
 
695 rajveer 676
  public void setGatewayTxnDateIsSet(boolean value) {
420 ashish 677
    if (!value) {
695 rajveer 678
      this.gatewayTxnDate = null;
420 ashish 679
    }
680
  }
681
 
695 rajveer 682
  public int getAttributesSize() {
683
    return (this.attributes == null) ? 0 : this.attributes.size();
420 ashish 684
  }
685
 
695 rajveer 686
  public java.util.Iterator<Attribute> getAttributesIterator() {
687
    return (this.attributes == null) ? null : this.attributes.iterator();
688
  }
689
 
690
  public void addToAttributes(Attribute elem) {
691
    if (this.attributes == null) {
692
      this.attributes = new ArrayList<Attribute>();
693
    }
694
    this.attributes.add(elem);
695
  }
696
 
697
  public List<Attribute> getAttributes() {
698
    return this.attributes;
699
  }
700
 
701
  public Payment setAttributes(List<Attribute> attributes) {
702
    this.attributes = attributes;
420 ashish 703
    return this;
704
  }
705
 
695 rajveer 706
  public void unsetAttributes() {
707
    this.attributes = null;
420 ashish 708
  }
709
 
695 rajveer 710
  /** Returns true if field attributes is set (has been asigned a value) and false otherwise */
711
  public boolean isSetAttributes() {
712
    return this.attributes != null;
420 ashish 713
  }
714
 
695 rajveer 715
  public void setAttributesIsSet(boolean value) {
420 ashish 716
    if (!value) {
695 rajveer 717
      this.attributes = null;
420 ashish 718
    }
719
  }
720
 
695 rajveer 721
  public long getInitTimestamp() {
722
    return this.initTimestamp;
420 ashish 723
  }
724
 
695 rajveer 725
  public Payment setInitTimestamp(long initTimestamp) {
726
    this.initTimestamp = initTimestamp;
727
    setInitTimestampIsSet(true);
420 ashish 728
    return this;
729
  }
730
 
695 rajveer 731
  public void unsetInitTimestamp() {
732
    __isset_bit_vector.clear(__INITTIMESTAMP_ISSET_ID);
420 ashish 733
  }
734
 
695 rajveer 735
  /** Returns true if field initTimestamp is set (has been asigned a value) and false otherwise */
736
  public boolean isSetInitTimestamp() {
737
    return __isset_bit_vector.get(__INITTIMESTAMP_ISSET_ID);
420 ashish 738
  }
739
 
695 rajveer 740
  public void setInitTimestampIsSet(boolean value) {
741
    __isset_bit_vector.set(__INITTIMESTAMP_ISSET_ID, value);
420 ashish 742
  }
743
 
695 rajveer 744
  public long getSuccessTimestamp() {
745
    return this.successTimestamp;
420 ashish 746
  }
747
 
695 rajveer 748
  public Payment setSuccessTimestamp(long successTimestamp) {
749
    this.successTimestamp = successTimestamp;
750
    setSuccessTimestampIsSet(true);
420 ashish 751
    return this;
752
  }
753
 
695 rajveer 754
  public void unsetSuccessTimestamp() {
755
    __isset_bit_vector.clear(__SUCCESSTIMESTAMP_ISSET_ID);
420 ashish 756
  }
757
 
695 rajveer 758
  /** Returns true if field successTimestamp is set (has been asigned a value) and false otherwise */
759
  public boolean isSetSuccessTimestamp() {
760
    return __isset_bit_vector.get(__SUCCESSTIMESTAMP_ISSET_ID);
420 ashish 761
  }
762
 
695 rajveer 763
  public void setSuccessTimestampIsSet(boolean value) {
764
    __isset_bit_vector.set(__SUCCESSTIMESTAMP_ISSET_ID, value);
420 ashish 765
  }
766
 
695 rajveer 767
  public long getErrorTimestamp() {
768
    return this.errorTimestamp;
420 ashish 769
  }
770
 
695 rajveer 771
  public Payment setErrorTimestamp(long errorTimestamp) {
772
    this.errorTimestamp = errorTimestamp;
773
    setErrorTimestampIsSet(true);
420 ashish 774
    return this;
775
  }
776
 
695 rajveer 777
  public void unsetErrorTimestamp() {
778
    __isset_bit_vector.clear(__ERRORTIMESTAMP_ISSET_ID);
420 ashish 779
  }
780
 
695 rajveer 781
  /** Returns true if field errorTimestamp is set (has been asigned a value) and false otherwise */
782
  public boolean isSetErrorTimestamp() {
783
    return __isset_bit_vector.get(__ERRORTIMESTAMP_ISSET_ID);
420 ashish 784
  }
785
 
695 rajveer 786
  public void setErrorTimestampIsSet(boolean value) {
787
    __isset_bit_vector.set(__ERRORTIMESTAMP_ISSET_ID, value);
420 ashish 788
  }
789
 
123 ashish 790
  public void setFieldValue(_Fields field, Object value) {
791
    switch (field) {
695 rajveer 792
    case PAYMENT_ID:
123 ashish 793
      if (value == null) {
695 rajveer 794
        unsetPaymentId();
123 ashish 795
      } else {
695 rajveer 796
        setPaymentId((Long)value);
123 ashish 797
      }
798
      break;
799
 
695 rajveer 800
    case GATEWAY_ID:
123 ashish 801
      if (value == null) {
695 rajveer 802
        unsetGatewayId();
123 ashish 803
      } else {
695 rajveer 804
        setGatewayId((Long)value);
123 ashish 805
      }
806
      break;
807
 
695 rajveer 808
    case GATEWAY_PAYMENT_ID:
123 ashish 809
      if (value == null) {
695 rajveer 810
        unsetGatewayPaymentId();
123 ashish 811
      } else {
695 rajveer 812
        setGatewayPaymentId((String)value);
123 ashish 813
      }
814
      break;
815
 
695 rajveer 816
    case MERCHANT_TXN_ID:
123 ashish 817
      if (value == null) {
695 rajveer 818
        unsetMerchantTxnId();
123 ashish 819
      } else {
705 chandransh 820
        setMerchantTxnId((Long)value);
123 ashish 821
      }
822
      break;
823
 
695 rajveer 824
    case GATEWAY_TXN_ID:
123 ashish 825
      if (value == null) {
695 rajveer 826
        unsetGatewayTxnId();
123 ashish 827
      } else {
695 rajveer 828
        setGatewayTxnId((String)value);
123 ashish 829
      }
830
      break;
831
 
695 rajveer 832
    case AMOUNT:
123 ashish 833
      if (value == null) {
695 rajveer 834
        unsetAmount();
123 ashish 835
      } else {
695 rajveer 836
        setAmount((Double)value);
123 ashish 837
      }
838
      break;
839
 
695 rajveer 840
    case GATEWAY_TXN_STATUS:
841
      if (value == null) {
842
        unsetGatewayTxnStatus();
843
      } else {
844
        setGatewayTxnStatus((String)value);
845
      }
846
      break;
847
 
123 ashish 848
    case STATUS:
849
      if (value == null) {
850
        unsetStatus();
851
      } else {
852
        setStatus((PaymentStatus)value);
853
      }
854
      break;
855
 
695 rajveer 856
    case USER_ID:
123 ashish 857
      if (value == null) {
695 rajveer 858
        unsetUserId();
123 ashish 859
      } else {
695 rajveer 860
        setUserId((Long)value);
123 ashish 861
      }
862
      break;
863
 
695 rajveer 864
    case ERROR_CODE:
123 ashish 865
      if (value == null) {
695 rajveer 866
        unsetErrorCode();
123 ashish 867
      } else {
695 rajveer 868
        setErrorCode((String)value);
123 ashish 869
      }
870
      break;
871
 
695 rajveer 872
    case DESCRIPTION:
123 ashish 873
      if (value == null) {
695 rajveer 874
        unsetDescription();
123 ashish 875
      } else {
695 rajveer 876
        setDescription((String)value);
123 ashish 877
      }
878
      break;
879
 
695 rajveer 880
    case AUTH_CODE:
123 ashish 881
      if (value == null) {
695 rajveer 882
        unsetAuthCode();
123 ashish 883
      } else {
695 rajveer 884
        setAuthCode((String)value);
123 ashish 885
      }
886
      break;
887
 
695 rajveer 888
    case REFERENCE_CODE:
123 ashish 889
      if (value == null) {
695 rajveer 890
        unsetReferenceCode();
123 ashish 891
      } else {
695 rajveer 892
        setReferenceCode((String)value);
123 ashish 893
      }
894
      break;
895
 
695 rajveer 896
    case SESSION_ID:
420 ashish 897
      if (value == null) {
695 rajveer 898
        unsetSessionId();
420 ashish 899
      } else {
695 rajveer 900
        setSessionId((String)value);
420 ashish 901
      }
902
      break;
903
 
695 rajveer 904
    case GATEWAY_TXN_DATE:
420 ashish 905
      if (value == null) {
695 rajveer 906
        unsetGatewayTxnDate();
420 ashish 907
      } else {
695 rajveer 908
        setGatewayTxnDate((String)value);
420 ashish 909
      }
910
      break;
911
 
695 rajveer 912
    case ATTRIBUTES:
420 ashish 913
      if (value == null) {
695 rajveer 914
        unsetAttributes();
420 ashish 915
      } else {
695 rajveer 916
        setAttributes((List<Attribute>)value);
420 ashish 917
      }
918
      break;
919
 
695 rajveer 920
    case INIT_TIMESTAMP:
420 ashish 921
      if (value == null) {
695 rajveer 922
        unsetInitTimestamp();
420 ashish 923
      } else {
695 rajveer 924
        setInitTimestamp((Long)value);
420 ashish 925
      }
926
      break;
927
 
695 rajveer 928
    case SUCCESS_TIMESTAMP:
420 ashish 929
      if (value == null) {
695 rajveer 930
        unsetSuccessTimestamp();
420 ashish 931
      } else {
695 rajveer 932
        setSuccessTimestamp((Long)value);
420 ashish 933
      }
934
      break;
935
 
695 rajveer 936
    case ERROR_TIMESTAMP:
420 ashish 937
      if (value == null) {
695 rajveer 938
        unsetErrorTimestamp();
420 ashish 939
      } else {
695 rajveer 940
        setErrorTimestamp((Long)value);
420 ashish 941
      }
942
      break;
943
 
123 ashish 944
    }
945
  }
946
 
947
  public void setFieldValue(int fieldID, Object value) {
948
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
949
  }
950
 
951
  public Object getFieldValue(_Fields field) {
952
    switch (field) {
695 rajveer 953
    case PAYMENT_ID:
954
      return new Long(getPaymentId());
123 ashish 955
 
695 rajveer 956
    case GATEWAY_ID:
957
      return new Long(getGatewayId());
123 ashish 958
 
695 rajveer 959
    case GATEWAY_PAYMENT_ID:
960
      return getGatewayPaymentId();
961
 
962
    case MERCHANT_TXN_ID:
705 chandransh 963
      return new Long(getMerchantTxnId());
695 rajveer 964
 
965
    case GATEWAY_TXN_ID:
966
      return getGatewayTxnId();
967
 
123 ashish 968
    case AMOUNT:
969
      return new Double(getAmount());
970
 
695 rajveer 971
    case GATEWAY_TXN_STATUS:
972
      return getGatewayTxnStatus();
123 ashish 973
 
974
    case STATUS:
975
      return getStatus();
976
 
977
    case USER_ID:
695 rajveer 978
      return new Long(getUserId());
123 ashish 979
 
695 rajveer 980
    case ERROR_CODE:
981
      return getErrorCode();
123 ashish 982
 
695 rajveer 983
    case DESCRIPTION:
984
      return getDescription();
123 ashish 985
 
695 rajveer 986
    case AUTH_CODE:
987
      return getAuthCode();
123 ashish 988
 
695 rajveer 989
    case REFERENCE_CODE:
990
      return getReferenceCode();
420 ashish 991
 
992
    case SESSION_ID:
695 rajveer 993
      return getSessionId();
420 ashish 994
 
695 rajveer 995
    case GATEWAY_TXN_DATE:
996
      return getGatewayTxnDate();
420 ashish 997
 
695 rajveer 998
    case ATTRIBUTES:
999
      return getAttributes();
420 ashish 1000
 
695 rajveer 1001
    case INIT_TIMESTAMP:
1002
      return new Long(getInitTimestamp());
420 ashish 1003
 
695 rajveer 1004
    case SUCCESS_TIMESTAMP:
1005
      return new Long(getSuccessTimestamp());
1006
 
1007
    case ERROR_TIMESTAMP:
1008
      return new Long(getErrorTimestamp());
1009
 
123 ashish 1010
    }
1011
    throw new IllegalStateException();
1012
  }
1013
 
1014
  public Object getFieldValue(int fieldId) {
1015
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1016
  }
1017
 
1018
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1019
  public boolean isSet(_Fields field) {
1020
    switch (field) {
695 rajveer 1021
    case PAYMENT_ID:
1022
      return isSetPaymentId();
1023
    case GATEWAY_ID:
1024
      return isSetGatewayId();
1025
    case GATEWAY_PAYMENT_ID:
1026
      return isSetGatewayPaymentId();
1027
    case MERCHANT_TXN_ID:
1028
      return isSetMerchantTxnId();
1029
    case GATEWAY_TXN_ID:
1030
      return isSetGatewayTxnId();
123 ashish 1031
    case AMOUNT:
1032
      return isSetAmount();
695 rajveer 1033
    case GATEWAY_TXN_STATUS:
1034
      return isSetGatewayTxnStatus();
123 ashish 1035
    case STATUS:
1036
      return isSetStatus();
1037
    case USER_ID:
695 rajveer 1038
      return isSetUserId();
420 ashish 1039
    case ERROR_CODE:
695 rajveer 1040
      return isSetErrorCode();
1041
    case DESCRIPTION:
1042
      return isSetDescription();
1043
    case AUTH_CODE:
1044
      return isSetAuthCode();
1045
    case REFERENCE_CODE:
1046
      return isSetReferenceCode();
420 ashish 1047
    case SESSION_ID:
695 rajveer 1048
      return isSetSessionId();
1049
    case GATEWAY_TXN_DATE:
1050
      return isSetGatewayTxnDate();
1051
    case ATTRIBUTES:
1052
      return isSetAttributes();
1053
    case INIT_TIMESTAMP:
1054
      return isSetInitTimestamp();
1055
    case SUCCESS_TIMESTAMP:
1056
      return isSetSuccessTimestamp();
1057
    case ERROR_TIMESTAMP:
1058
      return isSetErrorTimestamp();
123 ashish 1059
    }
1060
    throw new IllegalStateException();
1061
  }
1062
 
1063
  public boolean isSet(int fieldID) {
1064
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1065
  }
1066
 
1067
  @Override
1068
  public boolean equals(Object that) {
1069
    if (that == null)
1070
      return false;
1071
    if (that instanceof Payment)
1072
      return this.equals((Payment)that);
1073
    return false;
1074
  }
1075
 
1076
  public boolean equals(Payment that) {
1077
    if (that == null)
1078
      return false;
1079
 
695 rajveer 1080
    boolean this_present_paymentId = true;
1081
    boolean that_present_paymentId = true;
1082
    if (this_present_paymentId || that_present_paymentId) {
1083
      if (!(this_present_paymentId && that_present_paymentId))
123 ashish 1084
        return false;
695 rajveer 1085
      if (this.paymentId != that.paymentId)
123 ashish 1086
        return false;
1087
    }
1088
 
695 rajveer 1089
    boolean this_present_gatewayId = true;
1090
    boolean that_present_gatewayId = true;
1091
    if (this_present_gatewayId || that_present_gatewayId) {
1092
      if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 1093
        return false;
695 rajveer 1094
      if (this.gatewayId != that.gatewayId)
123 ashish 1095
        return false;
1096
    }
1097
 
695 rajveer 1098
    boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
1099
    boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
1100
    if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
1101
      if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
123 ashish 1102
        return false;
695 rajveer 1103
      if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
123 ashish 1104
        return false;
1105
    }
1106
 
705 chandransh 1107
    boolean this_present_merchantTxnId = true;
1108
    boolean that_present_merchantTxnId = true;
695 rajveer 1109
    if (this_present_merchantTxnId || that_present_merchantTxnId) {
1110
      if (!(this_present_merchantTxnId && that_present_merchantTxnId))
123 ashish 1111
        return false;
705 chandransh 1112
      if (this.merchantTxnId != that.merchantTxnId)
123 ashish 1113
        return false;
1114
    }
1115
 
695 rajveer 1116
    boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
1117
    boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
1118
    if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
1119
      if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
123 ashish 1120
        return false;
695 rajveer 1121
      if (!this.gatewayTxnId.equals(that.gatewayTxnId))
123 ashish 1122
        return false;
1123
    }
1124
 
695 rajveer 1125
    boolean this_present_amount = true;
1126
    boolean that_present_amount = true;
1127
    if (this_present_amount || that_present_amount) {
1128
      if (!(this_present_amount && that_present_amount))
123 ashish 1129
        return false;
695 rajveer 1130
      if (this.amount != that.amount)
123 ashish 1131
        return false;
1132
    }
1133
 
695 rajveer 1134
    boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
1135
    boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
1136
    if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
1137
      if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
1138
        return false;
1139
      if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
1140
        return false;
1141
    }
1142
 
123 ashish 1143
    boolean this_present_status = true && this.isSetStatus();
1144
    boolean that_present_status = true && that.isSetStatus();
1145
    if (this_present_status || that_present_status) {
1146
      if (!(this_present_status && that_present_status))
1147
        return false;
1148
      if (!this.status.equals(that.status))
1149
        return false;
1150
    }
1151
 
695 rajveer 1152
    boolean this_present_userId = true;
1153
    boolean that_present_userId = true;
1154
    if (this_present_userId || that_present_userId) {
1155
      if (!(this_present_userId && that_present_userId))
123 ashish 1156
        return false;
695 rajveer 1157
      if (this.userId != that.userId)
123 ashish 1158
        return false;
1159
    }
1160
 
695 rajveer 1161
    boolean this_present_errorCode = true && this.isSetErrorCode();
1162
    boolean that_present_errorCode = true && that.isSetErrorCode();
1163
    if (this_present_errorCode || that_present_errorCode) {
1164
      if (!(this_present_errorCode && that_present_errorCode))
123 ashish 1165
        return false;
695 rajveer 1166
      if (!this.errorCode.equals(that.errorCode))
123 ashish 1167
        return false;
1168
    }
1169
 
695 rajveer 1170
    boolean this_present_description = true && this.isSetDescription();
1171
    boolean that_present_description = true && that.isSetDescription();
1172
    if (this_present_description || that_present_description) {
1173
      if (!(this_present_description && that_present_description))
123 ashish 1174
        return false;
695 rajveer 1175
      if (!this.description.equals(that.description))
123 ashish 1176
        return false;
1177
    }
1178
 
695 rajveer 1179
    boolean this_present_authCode = true && this.isSetAuthCode();
1180
    boolean that_present_authCode = true && that.isSetAuthCode();
1181
    if (this_present_authCode || that_present_authCode) {
1182
      if (!(this_present_authCode && that_present_authCode))
123 ashish 1183
        return false;
695 rajveer 1184
      if (!this.authCode.equals(that.authCode))
123 ashish 1185
        return false;
1186
    }
1187
 
695 rajveer 1188
    boolean this_present_referenceCode = true && this.isSetReferenceCode();
1189
    boolean that_present_referenceCode = true && that.isSetReferenceCode();
1190
    if (this_present_referenceCode || that_present_referenceCode) {
1191
      if (!(this_present_referenceCode && that_present_referenceCode))
123 ashish 1192
        return false;
695 rajveer 1193
      if (!this.referenceCode.equals(that.referenceCode))
123 ashish 1194
        return false;
1195
    }
1196
 
695 rajveer 1197
    boolean this_present_sessionId = true && this.isSetSessionId();
1198
    boolean that_present_sessionId = true && that.isSetSessionId();
1199
    if (this_present_sessionId || that_present_sessionId) {
1200
      if (!(this_present_sessionId && that_present_sessionId))
420 ashish 1201
        return false;
695 rajveer 1202
      if (!this.sessionId.equals(that.sessionId))
420 ashish 1203
        return false;
1204
    }
1205
 
695 rajveer 1206
    boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
1207
    boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
1208
    if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
1209
      if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
420 ashish 1210
        return false;
695 rajveer 1211
      if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
420 ashish 1212
        return false;
1213
    }
1214
 
695 rajveer 1215
    boolean this_present_attributes = true && this.isSetAttributes();
1216
    boolean that_present_attributes = true && that.isSetAttributes();
1217
    if (this_present_attributes || that_present_attributes) {
1218
      if (!(this_present_attributes && that_present_attributes))
420 ashish 1219
        return false;
695 rajveer 1220
      if (!this.attributes.equals(that.attributes))
420 ashish 1221
        return false;
1222
    }
1223
 
695 rajveer 1224
    boolean this_present_initTimestamp = true;
1225
    boolean that_present_initTimestamp = true;
1226
    if (this_present_initTimestamp || that_present_initTimestamp) {
1227
      if (!(this_present_initTimestamp && that_present_initTimestamp))
420 ashish 1228
        return false;
695 rajveer 1229
      if (this.initTimestamp != that.initTimestamp)
420 ashish 1230
        return false;
1231
    }
1232
 
695 rajveer 1233
    boolean this_present_successTimestamp = true;
1234
    boolean that_present_successTimestamp = true;
1235
    if (this_present_successTimestamp || that_present_successTimestamp) {
1236
      if (!(this_present_successTimestamp && that_present_successTimestamp))
420 ashish 1237
        return false;
695 rajveer 1238
      if (this.successTimestamp != that.successTimestamp)
420 ashish 1239
        return false;
1240
    }
1241
 
695 rajveer 1242
    boolean this_present_errorTimestamp = true;
1243
    boolean that_present_errorTimestamp = true;
1244
    if (this_present_errorTimestamp || that_present_errorTimestamp) {
1245
      if (!(this_present_errorTimestamp && that_present_errorTimestamp))
420 ashish 1246
        return false;
695 rajveer 1247
      if (this.errorTimestamp != that.errorTimestamp)
420 ashish 1248
        return false;
1249
    }
1250
 
123 ashish 1251
    return true;
1252
  }
1253
 
1254
  @Override
1255
  public int hashCode() {
1256
    return 0;
1257
  }
1258
 
695 rajveer 1259
  public int compareTo(Payment other) {
1260
    if (!getClass().equals(other.getClass())) {
1261
      return getClass().getName().compareTo(other.getClass().getName());
1262
    }
1263
 
1264
    int lastComparison = 0;
1265
    Payment typedOther = (Payment)other;
1266
 
1267
    lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(isSetPaymentId());
1268
    if (lastComparison != 0) {
1269
      return lastComparison;
1270
    }
1271
    lastComparison = TBaseHelper.compareTo(paymentId, typedOther.paymentId);
1272
    if (lastComparison != 0) {
1273
      return lastComparison;
1274
    }
1275
    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
1276
    if (lastComparison != 0) {
1277
      return lastComparison;
1278
    }
1279
    lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
1280
    if (lastComparison != 0) {
1281
      return lastComparison;
1282
    }
1283
    lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(isSetGatewayPaymentId());
1284
    if (lastComparison != 0) {
1285
      return lastComparison;
1286
    }
1287
    lastComparison = TBaseHelper.compareTo(gatewayPaymentId, typedOther.gatewayPaymentId);
1288
    if (lastComparison != 0) {
1289
      return lastComparison;
1290
    }
1291
    lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(isSetMerchantTxnId());
1292
    if (lastComparison != 0) {
1293
      return lastComparison;
1294
    }
1295
    lastComparison = TBaseHelper.compareTo(merchantTxnId, typedOther.merchantTxnId);
1296
    if (lastComparison != 0) {
1297
      return lastComparison;
1298
    }
1299
    lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(isSetGatewayTxnId());
1300
    if (lastComparison != 0) {
1301
      return lastComparison;
1302
    }
1303
    lastComparison = TBaseHelper.compareTo(gatewayTxnId, typedOther.gatewayTxnId);
1304
    if (lastComparison != 0) {
1305
      return lastComparison;
1306
    }
1307
    lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());
1308
    if (lastComparison != 0) {
1309
      return lastComparison;
1310
    }
1311
    lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);
1312
    if (lastComparison != 0) {
1313
      return lastComparison;
1314
    }
1315
    lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(isSetGatewayTxnStatus());
1316
    if (lastComparison != 0) {
1317
      return lastComparison;
1318
    }
1319
    lastComparison = TBaseHelper.compareTo(gatewayTxnStatus, typedOther.gatewayTxnStatus);
1320
    if (lastComparison != 0) {
1321
      return lastComparison;
1322
    }
1323
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
1324
    if (lastComparison != 0) {
1325
      return lastComparison;
1326
    }
1327
    lastComparison = TBaseHelper.compareTo(status, typedOther.status);
1328
    if (lastComparison != 0) {
1329
      return lastComparison;
1330
    }
1331
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
1332
    if (lastComparison != 0) {
1333
      return lastComparison;
1334
    }
1335
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
1336
    if (lastComparison != 0) {
1337
      return lastComparison;
1338
    }
1339
    lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(isSetErrorCode());
1340
    if (lastComparison != 0) {
1341
      return lastComparison;
1342
    }
1343
    lastComparison = TBaseHelper.compareTo(errorCode, typedOther.errorCode);
1344
    if (lastComparison != 0) {
1345
      return lastComparison;
1346
    }
1347
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
1348
    if (lastComparison != 0) {
1349
      return lastComparison;
1350
    }
1351
    lastComparison = TBaseHelper.compareTo(description, typedOther.description);
1352
    if (lastComparison != 0) {
1353
      return lastComparison;
1354
    }
1355
    lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(isSetAuthCode());
1356
    if (lastComparison != 0) {
1357
      return lastComparison;
1358
    }
1359
    lastComparison = TBaseHelper.compareTo(authCode, typedOther.authCode);
1360
    if (lastComparison != 0) {
1361
      return lastComparison;
1362
    }
1363
    lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(isSetReferenceCode());
1364
    if (lastComparison != 0) {
1365
      return lastComparison;
1366
    }
1367
    lastComparison = TBaseHelper.compareTo(referenceCode, typedOther.referenceCode);
1368
    if (lastComparison != 0) {
1369
      return lastComparison;
1370
    }
1371
    lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(isSetSessionId());
1372
    if (lastComparison != 0) {
1373
      return lastComparison;
1374
    }
1375
    lastComparison = TBaseHelper.compareTo(sessionId, typedOther.sessionId);
1376
    if (lastComparison != 0) {
1377
      return lastComparison;
1378
    }
1379
    lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(isSetGatewayTxnDate());
1380
    if (lastComparison != 0) {
1381
      return lastComparison;
1382
    }
1383
    lastComparison = TBaseHelper.compareTo(gatewayTxnDate, typedOther.gatewayTxnDate);
1384
    if (lastComparison != 0) {
1385
      return lastComparison;
1386
    }
1387
    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(isSetAttributes());
1388
    if (lastComparison != 0) {
1389
      return lastComparison;
1390
    }
1391
    lastComparison = TBaseHelper.compareTo(attributes, typedOther.attributes);
1392
    if (lastComparison != 0) {
1393
      return lastComparison;
1394
    }
1395
    lastComparison = Boolean.valueOf(isSetInitTimestamp()).compareTo(isSetInitTimestamp());
1396
    if (lastComparison != 0) {
1397
      return lastComparison;
1398
    }
1399
    lastComparison = TBaseHelper.compareTo(initTimestamp, typedOther.initTimestamp);
1400
    if (lastComparison != 0) {
1401
      return lastComparison;
1402
    }
1403
    lastComparison = Boolean.valueOf(isSetSuccessTimestamp()).compareTo(isSetSuccessTimestamp());
1404
    if (lastComparison != 0) {
1405
      return lastComparison;
1406
    }
1407
    lastComparison = TBaseHelper.compareTo(successTimestamp, typedOther.successTimestamp);
1408
    if (lastComparison != 0) {
1409
      return lastComparison;
1410
    }
1411
    lastComparison = Boolean.valueOf(isSetErrorTimestamp()).compareTo(isSetErrorTimestamp());
1412
    if (lastComparison != 0) {
1413
      return lastComparison;
1414
    }
1415
    lastComparison = TBaseHelper.compareTo(errorTimestamp, typedOther.errorTimestamp);
1416
    if (lastComparison != 0) {
1417
      return lastComparison;
1418
    }
1419
    return 0;
1420
  }
1421
 
123 ashish 1422
  public void read(TProtocol iprot) throws TException {
1423
    TField field;
1424
    iprot.readStructBegin();
1425
    while (true)
1426
    {
1427
      field = iprot.readFieldBegin();
1428
      if (field.type == TType.STOP) { 
1429
        break;
1430
      }
1431
      _Fields fieldId = _Fields.findByThriftId(field.id);
1432
      if (fieldId == null) {
1433
        TProtocolUtil.skip(iprot, field.type);
1434
      } else {
1435
        switch (fieldId) {
695 rajveer 1436
          case PAYMENT_ID:
1437
            if (field.type == TType.I64) {
1438
              this.paymentId = iprot.readI64();
1439
              setPaymentIdIsSet(true);
123 ashish 1440
            } else { 
1441
              TProtocolUtil.skip(iprot, field.type);
1442
            }
1443
            break;
695 rajveer 1444
          case GATEWAY_ID:
1445
            if (field.type == TType.I64) {
1446
              this.gatewayId = iprot.readI64();
1447
              setGatewayIdIsSet(true);
1448
            } else { 
1449
              TProtocolUtil.skip(iprot, field.type);
1450
            }
1451
            break;
1452
          case GATEWAY_PAYMENT_ID:
420 ashish 1453
            if (field.type == TType.STRING) {
695 rajveer 1454
              this.gatewayPaymentId = iprot.readString();
123 ashish 1455
            } else { 
1456
              TProtocolUtil.skip(iprot, field.type);
1457
            }
1458
            break;
695 rajveer 1459
          case MERCHANT_TXN_ID:
705 chandransh 1460
            if (field.type == TType.I64) {
1461
              this.merchantTxnId = iprot.readI64();
1462
              setMerchantTxnIdIsSet(true);
123 ashish 1463
            } else { 
1464
              TProtocolUtil.skip(iprot, field.type);
1465
            }
1466
            break;
695 rajveer 1467
          case GATEWAY_TXN_ID:
1468
            if (field.type == TType.STRING) {
1469
              this.gatewayTxnId = iprot.readString();
123 ashish 1470
            } else { 
1471
              TProtocolUtil.skip(iprot, field.type);
1472
            }
1473
            break;
695 rajveer 1474
          case AMOUNT:
1475
            if (field.type == TType.DOUBLE) {
1476
              this.amount = iprot.readDouble();
1477
              setAmountIsSet(true);
123 ashish 1478
            } else { 
1479
              TProtocolUtil.skip(iprot, field.type);
1480
            }
1481
            break;
695 rajveer 1482
          case GATEWAY_TXN_STATUS:
123 ashish 1483
            if (field.type == TType.STRING) {
695 rajveer 1484
              this.gatewayTxnStatus = iprot.readString();
123 ashish 1485
            } else { 
1486
              TProtocolUtil.skip(iprot, field.type);
1487
            }
1488
            break;
1489
          case STATUS:
1490
            if (field.type == TType.I32) {
1491
              this.status = PaymentStatus.findByValue(iprot.readI32());
1492
            } else { 
1493
              TProtocolUtil.skip(iprot, field.type);
1494
            }
1495
            break;
695 rajveer 1496
          case USER_ID:
1497
            if (field.type == TType.I64) {
1498
              this.userId = iprot.readI64();
1499
              setUserIdIsSet(true);
123 ashish 1500
            } else { 
1501
              TProtocolUtil.skip(iprot, field.type);
1502
            }
1503
            break;
695 rajveer 1504
          case ERROR_CODE:
1505
            if (field.type == TType.STRING) {
1506
              this.errorCode = iprot.readString();
123 ashish 1507
            } else { 
1508
              TProtocolUtil.skip(iprot, field.type);
1509
            }
1510
            break;
695 rajveer 1511
          case DESCRIPTION:
1512
            if (field.type == TType.STRING) {
1513
              this.description = iprot.readString();
123 ashish 1514
            } else { 
1515
              TProtocolUtil.skip(iprot, field.type);
1516
            }
1517
            break;
695 rajveer 1518
          case AUTH_CODE:
1519
            if (field.type == TType.STRING) {
1520
              this.authCode = iprot.readString();
123 ashish 1521
            } else { 
1522
              TProtocolUtil.skip(iprot, field.type);
1523
            }
1524
            break;
695 rajveer 1525
          case REFERENCE_CODE:
1526
            if (field.type == TType.STRING) {
1527
              this.referenceCode = iprot.readString();
123 ashish 1528
            } else { 
1529
              TProtocolUtil.skip(iprot, field.type);
1530
            }
1531
            break;
695 rajveer 1532
          case SESSION_ID:
420 ashish 1533
            if (field.type == TType.STRING) {
695 rajveer 1534
              this.sessionId = iprot.readString();
420 ashish 1535
            } else { 
1536
              TProtocolUtil.skip(iprot, field.type);
1537
            }
1538
            break;
695 rajveer 1539
          case GATEWAY_TXN_DATE:
420 ashish 1540
            if (field.type == TType.STRING) {
695 rajveer 1541
              this.gatewayTxnDate = iprot.readString();
420 ashish 1542
            } else { 
1543
              TProtocolUtil.skip(iprot, field.type);
1544
            }
1545
            break;
695 rajveer 1546
          case ATTRIBUTES:
1547
            if (field.type == TType.LIST) {
1548
              {
1549
                TList _list4 = iprot.readListBegin();
1550
                this.attributes = new ArrayList<Attribute>(_list4.size);
1551
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
1552
                {
1553
                  Attribute _elem6;
1554
                  _elem6 = new Attribute();
1555
                  _elem6.read(iprot);
1556
                  this.attributes.add(_elem6);
1557
                }
1558
                iprot.readListEnd();
1559
              }
420 ashish 1560
            } else { 
1561
              TProtocolUtil.skip(iprot, field.type);
1562
            }
1563
            break;
695 rajveer 1564
          case INIT_TIMESTAMP:
1565
            if (field.type == TType.I64) {
1566
              this.initTimestamp = iprot.readI64();
1567
              setInitTimestampIsSet(true);
420 ashish 1568
            } else { 
1569
              TProtocolUtil.skip(iprot, field.type);
1570
            }
1571
            break;
695 rajveer 1572
          case SUCCESS_TIMESTAMP:
1573
            if (field.type == TType.I64) {
1574
              this.successTimestamp = iprot.readI64();
1575
              setSuccessTimestampIsSet(true);
420 ashish 1576
            } else { 
1577
              TProtocolUtil.skip(iprot, field.type);
1578
            }
1579
            break;
695 rajveer 1580
          case ERROR_TIMESTAMP:
1581
            if (field.type == TType.I64) {
1582
              this.errorTimestamp = iprot.readI64();
1583
              setErrorTimestampIsSet(true);
420 ashish 1584
            } else { 
1585
              TProtocolUtil.skip(iprot, field.type);
1586
            }
1587
            break;
123 ashish 1588
        }
1589
        iprot.readFieldEnd();
1590
      }
1591
    }
1592
    iprot.readStructEnd();
1593
    validate();
1594
  }
1595
 
1596
  public void write(TProtocol oprot) throws TException {
1597
    validate();
1598
 
1599
    oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 1600
    oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
1601
    oprot.writeI64(this.paymentId);
1602
    oprot.writeFieldEnd();
1603
    oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
1604
    oprot.writeI64(this.gatewayId);
1605
    oprot.writeFieldEnd();
1606
    if (this.gatewayPaymentId != null) {
1607
      oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
1608
      oprot.writeString(this.gatewayPaymentId);
420 ashish 1609
      oprot.writeFieldEnd();
1610
    }
705 chandransh 1611
    oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
1612
    oprot.writeI64(this.merchantTxnId);
1613
    oprot.writeFieldEnd();
695 rajveer 1614
    if (this.gatewayTxnId != null) {
1615
      oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
1616
      oprot.writeString(this.gatewayTxnId);
1617
      oprot.writeFieldEnd();
1618
    }
123 ashish 1619
    oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1620
    oprot.writeDouble(this.amount);
1621
    oprot.writeFieldEnd();
695 rajveer 1622
    if (this.gatewayTxnStatus != null) {
1623
      oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
1624
      oprot.writeString(this.gatewayTxnStatus);
123 ashish 1625
      oprot.writeFieldEnd();
1626
    }
1627
    if (this.status != null) {
1628
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1629
      oprot.writeI32(this.status.getValue());
1630
      oprot.writeFieldEnd();
1631
    }
1632
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 1633
    oprot.writeI64(this.userId);
123 ashish 1634
    oprot.writeFieldEnd();
695 rajveer 1635
    if (this.errorCode != null) {
1636
      oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
1637
      oprot.writeString(this.errorCode);
123 ashish 1638
      oprot.writeFieldEnd();
1639
    }
695 rajveer 1640
    if (this.description != null) {
1641
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
1642
      oprot.writeString(this.description);
123 ashish 1643
      oprot.writeFieldEnd();
1644
    }
695 rajveer 1645
    if (this.authCode != null) {
1646
      oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
1647
      oprot.writeString(this.authCode);
420 ashish 1648
      oprot.writeFieldEnd();
1649
    }
695 rajveer 1650
    if (this.referenceCode != null) {
1651
      oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
1652
      oprot.writeString(this.referenceCode);
420 ashish 1653
      oprot.writeFieldEnd();
1654
    }
695 rajveer 1655
    if (this.sessionId != null) {
1656
      oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
1657
      oprot.writeString(this.sessionId);
420 ashish 1658
      oprot.writeFieldEnd();
1659
    }
695 rajveer 1660
    if (this.gatewayTxnDate != null) {
1661
      oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
1662
      oprot.writeString(this.gatewayTxnDate);
420 ashish 1663
      oprot.writeFieldEnd();
1664
    }
695 rajveer 1665
    if (this.attributes != null) {
1666
      oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
1667
      {
1668
        oprot.writeListBegin(new TList(TType.STRUCT, this.attributes.size()));
1669
        for (Attribute _iter7 : this.attributes)
1670
        {
1671
          _iter7.write(oprot);
1672
        }
1673
        oprot.writeListEnd();
1674
      }
420 ashish 1675
      oprot.writeFieldEnd();
1676
    }
695 rajveer 1677
    oprot.writeFieldBegin(INIT_TIMESTAMP_FIELD_DESC);
1678
    oprot.writeI64(this.initTimestamp);
1679
    oprot.writeFieldEnd();
1680
    oprot.writeFieldBegin(SUCCESS_TIMESTAMP_FIELD_DESC);
1681
    oprot.writeI64(this.successTimestamp);
1682
    oprot.writeFieldEnd();
1683
    oprot.writeFieldBegin(ERROR_TIMESTAMP_FIELD_DESC);
1684
    oprot.writeI64(this.errorTimestamp);
1685
    oprot.writeFieldEnd();
123 ashish 1686
    oprot.writeFieldStop();
1687
    oprot.writeStructEnd();
1688
  }
1689
 
1690
  @Override
1691
  public String toString() {
1692
    StringBuilder sb = new StringBuilder("Payment(");
1693
    boolean first = true;
1694
 
695 rajveer 1695
    sb.append("paymentId:");
1696
    sb.append(this.paymentId);
1697
    first = false;
1698
    if (!first) sb.append(", ");
1699
    sb.append("gatewayId:");
1700
    sb.append(this.gatewayId);
1701
    first = false;
1702
    if (!first) sb.append(", ");
1703
    sb.append("gatewayPaymentId:");
1704
    if (this.gatewayPaymentId == null) {
420 ashish 1705
      sb.append("null");
1706
    } else {
695 rajveer 1707
      sb.append(this.gatewayPaymentId);
420 ashish 1708
    }
123 ashish 1709
    first = false;
1710
    if (!first) sb.append(", ");
695 rajveer 1711
    sb.append("merchantTxnId:");
705 chandransh 1712
    sb.append(this.merchantTxnId);
123 ashish 1713
    first = false;
1714
    if (!first) sb.append(", ");
695 rajveer 1715
    sb.append("gatewayTxnId:");
1716
    if (this.gatewayTxnId == null) {
1717
      sb.append("null");
1718
    } else {
1719
      sb.append(this.gatewayTxnId);
1720
    }
1721
    first = false;
1722
    if (!first) sb.append(", ");
123 ashish 1723
    sb.append("amount:");
1724
    sb.append(this.amount);
1725
    first = false;
1726
    if (!first) sb.append(", ");
695 rajveer 1727
    sb.append("gatewayTxnStatus:");
1728
    if (this.gatewayTxnStatus == null) {
123 ashish 1729
      sb.append("null");
1730
    } else {
695 rajveer 1731
      sb.append(this.gatewayTxnStatus);
123 ashish 1732
    }
1733
    first = false;
1734
    if (!first) sb.append(", ");
1735
    sb.append("status:");
1736
    if (this.status == null) {
1737
      sb.append("null");
1738
    } else {
1739
      String status_name = status.name();
1740
      if (status_name != null) {
1741
        sb.append(status_name);
1742
        sb.append(" (");
1743
      }
1744
      sb.append(this.status);
1745
      if (status_name != null) {
1746
        sb.append(")");
1747
      }
1748
    }
1749
    first = false;
1750
    if (!first) sb.append(", ");
695 rajveer 1751
    sb.append("userId:");
1752
    sb.append(this.userId);
123 ashish 1753
    first = false;
1754
    if (!first) sb.append(", ");
695 rajveer 1755
    sb.append("errorCode:");
1756
    if (this.errorCode == null) {
123 ashish 1757
      sb.append("null");
1758
    } else {
695 rajveer 1759
      sb.append(this.errorCode);
123 ashish 1760
    }
1761
    first = false;
1762
    if (!first) sb.append(", ");
695 rajveer 1763
    sb.append("description:");
1764
    if (this.description == null) {
123 ashish 1765
      sb.append("null");
1766
    } else {
695 rajveer 1767
      sb.append(this.description);
123 ashish 1768
    }
1769
    first = false;
420 ashish 1770
    if (!first) sb.append(", ");
695 rajveer 1771
    sb.append("authCode:");
1772
    if (this.authCode == null) {
420 ashish 1773
      sb.append("null");
1774
    } else {
695 rajveer 1775
      sb.append(this.authCode);
420 ashish 1776
    }
1777
    first = false;
1778
    if (!first) sb.append(", ");
695 rajveer 1779
    sb.append("referenceCode:");
1780
    if (this.referenceCode == null) {
420 ashish 1781
      sb.append("null");
1782
    } else {
695 rajveer 1783
      sb.append(this.referenceCode);
420 ashish 1784
    }
1785
    first = false;
1786
    if (!first) sb.append(", ");
695 rajveer 1787
    sb.append("sessionId:");
1788
    if (this.sessionId == null) {
420 ashish 1789
      sb.append("null");
1790
    } else {
695 rajveer 1791
      sb.append(this.sessionId);
420 ashish 1792
    }
1793
    first = false;
1794
    if (!first) sb.append(", ");
695 rajveer 1795
    sb.append("gatewayTxnDate:");
1796
    if (this.gatewayTxnDate == null) {
420 ashish 1797
      sb.append("null");
1798
    } else {
695 rajveer 1799
      sb.append(this.gatewayTxnDate);
420 ashish 1800
    }
1801
    first = false;
1802
    if (!first) sb.append(", ");
695 rajveer 1803
    sb.append("attributes:");
1804
    if (this.attributes == null) {
420 ashish 1805
      sb.append("null");
1806
    } else {
695 rajveer 1807
      sb.append(this.attributes);
420 ashish 1808
    }
1809
    first = false;
695 rajveer 1810
    if (!first) sb.append(", ");
1811
    sb.append("initTimestamp:");
1812
    sb.append(this.initTimestamp);
1813
    first = false;
1814
    if (!first) sb.append(", ");
1815
    sb.append("successTimestamp:");
1816
    sb.append(this.successTimestamp);
1817
    first = false;
1818
    if (!first) sb.append(", ");
1819
    sb.append("errorTimestamp:");
1820
    sb.append(this.errorTimestamp);
1821
    first = false;
123 ashish 1822
    sb.append(")");
1823
    return sb.toString();
1824
  }
1825
 
1826
  public void validate() throws TException {
1827
    // check for required fields
1828
  }
1829
 
1830
}
1831