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);
32
  private static final TField MERCHANT_TXN_ID_FIELD_DESC = new TField("merchantTxnId", TType.STRING, (short)4);
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;
52
  private String merchantTxnId;
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;
149
  private static final int __AMOUNT_ISSET_ID = 2;
150
  private static final int __USERID_ISSET_ID = 3;
151
  private static final int __INITTIMESTAMP_ISSET_ID = 4;
152
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 5;
153
  private static final int __ERRORTIMESTAMP_ISSET_ID = 6;
154
  private BitSet __isset_bit_vector = new BitSet(7);
123 ashish 155
 
156
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 157
    put(_Fields.PAYMENT_ID, new FieldMetaData("paymentId", TFieldRequirementType.DEFAULT, 
158
        new FieldValueMetaData(TType.I64)));
159
    put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
160
        new FieldValueMetaData(TType.I64)));
161
    put(_Fields.GATEWAY_PAYMENT_ID, new FieldMetaData("gatewayPaymentId", TFieldRequirementType.DEFAULT, 
420 ashish 162
        new FieldValueMetaData(TType.STRING)));
695 rajveer 163
    put(_Fields.MERCHANT_TXN_ID, new FieldMetaData("merchantTxnId", TFieldRequirementType.DEFAULT, 
420 ashish 164
        new FieldValueMetaData(TType.STRING)));
695 rajveer 165
    put(_Fields.GATEWAY_TXN_ID, new FieldMetaData("gatewayTxnId", TFieldRequirementType.DEFAULT, 
166
        new FieldValueMetaData(TType.STRING)));
123 ashish 167
    put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
168
        new FieldValueMetaData(TType.DOUBLE)));
695 rajveer 169
    put(_Fields.GATEWAY_TXN_STATUS, new FieldMetaData("gatewayTxnStatus", TFieldRequirementType.DEFAULT, 
123 ashish 170
        new FieldValueMetaData(TType.STRING)));
171
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
172
        new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 173
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
123 ashish 174
        new FieldValueMetaData(TType.I64)));
695 rajveer 175
    put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, 
420 ashish 176
        new FieldValueMetaData(TType.STRING)));
695 rajveer 177
    put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
420 ashish 178
        new FieldValueMetaData(TType.STRING)));
695 rajveer 179
    put(_Fields.AUTH_CODE, new FieldMetaData("authCode", TFieldRequirementType.DEFAULT, 
420 ashish 180
        new FieldValueMetaData(TType.STRING)));
695 rajveer 181
    put(_Fields.REFERENCE_CODE, new FieldMetaData("referenceCode", TFieldRequirementType.DEFAULT, 
420 ashish 182
        new FieldValueMetaData(TType.STRING)));
695 rajveer 183
    put(_Fields.SESSION_ID, new FieldMetaData("sessionId", TFieldRequirementType.DEFAULT, 
420 ashish 184
        new FieldValueMetaData(TType.STRING)));
695 rajveer 185
    put(_Fields.GATEWAY_TXN_DATE, new FieldMetaData("gatewayTxnDate", TFieldRequirementType.DEFAULT, 
420 ashish 186
        new FieldValueMetaData(TType.STRING)));
695 rajveer 187
    put(_Fields.ATTRIBUTES, new FieldMetaData("attributes", TFieldRequirementType.DEFAULT, 
188
        new ListMetaData(TType.LIST, 
189
            new StructMetaData(TType.STRUCT, Attribute.class))));
190
    put(_Fields.INIT_TIMESTAMP, new FieldMetaData("initTimestamp", TFieldRequirementType.DEFAULT, 
191
        new FieldValueMetaData(TType.I64)));
192
    put(_Fields.SUCCESS_TIMESTAMP, new FieldMetaData("successTimestamp", TFieldRequirementType.DEFAULT, 
193
        new FieldValueMetaData(TType.I64)));
194
    put(_Fields.ERROR_TIMESTAMP, new FieldMetaData("errorTimestamp", TFieldRequirementType.DEFAULT, 
195
        new FieldValueMetaData(TType.I64)));
123 ashish 196
  }});
197
 
198
  static {
199
    FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
200
  }
201
 
202
  public Payment() {
203
  }
204
 
205
  public Payment(
695 rajveer 206
    long paymentId,
207
    long gatewayId,
208
    String gatewayPaymentId,
209
    String merchantTxnId,
210
    String gatewayTxnId,
123 ashish 211
    double amount,
695 rajveer 212
    String gatewayTxnStatus,
123 ashish 213
    PaymentStatus status,
695 rajveer 214
    long userId,
215
    String errorCode,
216
    String description,
217
    String authCode,
218
    String referenceCode,
219
    String sessionId,
220
    String gatewayTxnDate,
221
    List<Attribute> attributes,
222
    long initTimestamp,
223
    long successTimestamp,
224
    long errorTimestamp)
123 ashish 225
  {
226
    this();
695 rajveer 227
    this.paymentId = paymentId;
228
    setPaymentIdIsSet(true);
229
    this.gatewayId = gatewayId;
230
    setGatewayIdIsSet(true);
231
    this.gatewayPaymentId = gatewayPaymentId;
232
    this.merchantTxnId = merchantTxnId;
233
    this.gatewayTxnId = gatewayTxnId;
123 ashish 234
    this.amount = amount;
235
    setAmountIsSet(true);
695 rajveer 236
    this.gatewayTxnStatus = gatewayTxnStatus;
123 ashish 237
    this.status = status;
695 rajveer 238
    this.userId = userId;
239
    setUserIdIsSet(true);
240
    this.errorCode = errorCode;
241
    this.description = description;
242
    this.authCode = authCode;
243
    this.referenceCode = referenceCode;
244
    this.sessionId = sessionId;
245
    this.gatewayTxnDate = gatewayTxnDate;
246
    this.attributes = attributes;
247
    this.initTimestamp = initTimestamp;
248
    setInitTimestampIsSet(true);
249
    this.successTimestamp = successTimestamp;
250
    setSuccessTimestampIsSet(true);
251
    this.errorTimestamp = errorTimestamp;
252
    setErrorTimestampIsSet(true);
123 ashish 253
  }
254
 
255
  /**
256
   * Performs a deep copy on <i>other</i>.
257
   */
258
  public Payment(Payment other) {
259
    __isset_bit_vector.clear();
260
    __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 261
    this.paymentId = other.paymentId;
262
    this.gatewayId = other.gatewayId;
263
    if (other.isSetGatewayPaymentId()) {
264
      this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 265
    }
695 rajveer 266
    if (other.isSetMerchantTxnId()) {
267
      this.merchantTxnId = other.merchantTxnId;
420 ashish 268
    }
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
 
695 rajveer 389
  public String getMerchantTxnId() {
390
    return this.merchantTxnId;
123 ashish 391
  }
392
 
695 rajveer 393
  public Payment setMerchantTxnId(String merchantTxnId) {
394
    this.merchantTxnId = merchantTxnId;
123 ashish 395
    return this;
396
  }
397
 
695 rajveer 398
  public void unsetMerchantTxnId() {
399
    this.merchantTxnId = null;
123 ashish 400
  }
401
 
695 rajveer 402
  /** Returns true if field merchantTxnId is set (has been asigned a value) and false otherwise */
403
  public boolean isSetMerchantTxnId() {
404
    return this.merchantTxnId != null;
123 ashish 405
  }
406
 
695 rajveer 407
  public void setMerchantTxnIdIsSet(boolean value) {
408
    if (!value) {
409
      this.merchantTxnId = null;
410
    }
123 ashish 411
  }
412
 
695 rajveer 413
  public String getGatewayTxnId() {
414
    return this.gatewayTxnId;
123 ashish 415
  }
416
 
695 rajveer 417
  public Payment setGatewayTxnId(String gatewayTxnId) {
418
    this.gatewayTxnId = gatewayTxnId;
123 ashish 419
    return this;
420
  }
421
 
695 rajveer 422
  public void unsetGatewayTxnId() {
423
    this.gatewayTxnId = null;
123 ashish 424
  }
425
 
695 rajveer 426
  /** Returns true if field gatewayTxnId is set (has been asigned a value) and false otherwise */
427
  public boolean isSetGatewayTxnId() {
428
    return this.gatewayTxnId != null;
123 ashish 429
  }
430
 
695 rajveer 431
  public void setGatewayTxnIdIsSet(boolean value) {
432
    if (!value) {
433
      this.gatewayTxnId = null;
434
    }
123 ashish 435
  }
436
 
695 rajveer 437
  public double getAmount() {
438
    return this.amount;
123 ashish 439
  }
440
 
695 rajveer 441
  public Payment setAmount(double amount) {
442
    this.amount = amount;
443
    setAmountIsSet(true);
123 ashish 444
    return this;
445
  }
446
 
695 rajveer 447
  public void unsetAmount() {
448
    __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
123 ashish 449
  }
450
 
695 rajveer 451
  /** Returns true if field amount is set (has been asigned a value) and false otherwise */
452
  public boolean isSetAmount() {
453
    return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
123 ashish 454
  }
455
 
695 rajveer 456
  public void setAmountIsSet(boolean value) {
457
    __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
123 ashish 458
  }
459
 
695 rajveer 460
  public String getGatewayTxnStatus() {
461
    return this.gatewayTxnStatus;
123 ashish 462
  }
463
 
695 rajveer 464
  public Payment setGatewayTxnStatus(String gatewayTxnStatus) {
465
    this.gatewayTxnStatus = gatewayTxnStatus;
123 ashish 466
    return this;
467
  }
468
 
695 rajveer 469
  public void unsetGatewayTxnStatus() {
470
    this.gatewayTxnStatus = null;
123 ashish 471
  }
472
 
695 rajveer 473
  /** Returns true if field gatewayTxnStatus is set (has been asigned a value) and false otherwise */
474
  public boolean isSetGatewayTxnStatus() {
475
    return this.gatewayTxnStatus != null;
123 ashish 476
  }
477
 
695 rajveer 478
  public void setGatewayTxnStatusIsSet(boolean value) {
123 ashish 479
    if (!value) {
695 rajveer 480
      this.gatewayTxnStatus = null;
123 ashish 481
    }
482
  }
483
 
484
  /**
485
   * 
486
   * @see PaymentStatus
487
   */
488
  public PaymentStatus getStatus() {
489
    return this.status;
490
  }
491
 
492
  /**
493
   * 
494
   * @see PaymentStatus
495
   */
496
  public Payment setStatus(PaymentStatus status) {
497
    this.status = status;
498
    return this;
499
  }
500
 
501
  public void unsetStatus() {
502
    this.status = null;
503
  }
504
 
505
  /** Returns true if field status is set (has been asigned a value) and false otherwise */
506
  public boolean isSetStatus() {
507
    return this.status != null;
508
  }
509
 
510
  public void setStatusIsSet(boolean value) {
511
    if (!value) {
512
      this.status = null;
513
    }
514
  }
515
 
695 rajveer 516
  public long getUserId() {
517
    return this.userId;
123 ashish 518
  }
519
 
695 rajveer 520
  public Payment setUserId(long userId) {
521
    this.userId = userId;
522
    setUserIdIsSet(true);
123 ashish 523
    return this;
524
  }
525
 
695 rajveer 526
  public void unsetUserId() {
527
    __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 528
  }
529
 
695 rajveer 530
  /** Returns true if field userId is set (has been asigned a value) and false otherwise */
531
  public boolean isSetUserId() {
532
    return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 533
  }
534
 
695 rajveer 535
  public void setUserIdIsSet(boolean value) {
536
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 537
  }
538
 
695 rajveer 539
  public String getErrorCode() {
540
    return this.errorCode;
123 ashish 541
  }
542
 
695 rajveer 543
  public Payment setErrorCode(String errorCode) {
544
    this.errorCode = errorCode;
123 ashish 545
    return this;
546
  }
547
 
695 rajveer 548
  public void unsetErrorCode() {
549
    this.errorCode = null;
123 ashish 550
  }
551
 
695 rajveer 552
  /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */
553
  public boolean isSetErrorCode() {
554
    return this.errorCode != null;
123 ashish 555
  }
556
 
695 rajveer 557
  public void setErrorCodeIsSet(boolean value) {
558
    if (!value) {
559
      this.errorCode = null;
560
    }
123 ashish 561
  }
562
 
695 rajveer 563
  public String getDescription() {
564
    return this.description;
123 ashish 565
  }
566
 
695 rajveer 567
  public Payment setDescription(String description) {
568
    this.description = description;
123 ashish 569
    return this;
570
  }
571
 
695 rajveer 572
  public void unsetDescription() {
573
    this.description = null;
123 ashish 574
  }
575
 
695 rajveer 576
  /** Returns true if field description is set (has been asigned a value) and false otherwise */
577
  public boolean isSetDescription() {
578
    return this.description != null;
123 ashish 579
  }
580
 
695 rajveer 581
  public void setDescriptionIsSet(boolean value) {
582
    if (!value) {
583
      this.description = null;
123 ashish 584
    }
585
  }
586
 
695 rajveer 587
  public String getAuthCode() {
588
    return this.authCode;
123 ashish 589
  }
590
 
695 rajveer 591
  public Payment setAuthCode(String authCode) {
592
    this.authCode = authCode;
123 ashish 593
    return this;
594
  }
595
 
695 rajveer 596
  public void unsetAuthCode() {
597
    this.authCode = null;
123 ashish 598
  }
599
 
695 rajveer 600
  /** Returns true if field authCode is set (has been asigned a value) and false otherwise */
601
  public boolean isSetAuthCode() {
602
    return this.authCode != null;
123 ashish 603
  }
604
 
695 rajveer 605
  public void setAuthCodeIsSet(boolean value) {
123 ashish 606
    if (!value) {
695 rajveer 607
      this.authCode = null;
123 ashish 608
    }
609
  }
610
 
695 rajveer 611
  public String getReferenceCode() {
612
    return this.referenceCode;
123 ashish 613
  }
614
 
695 rajveer 615
  public Payment setReferenceCode(String referenceCode) {
616
    this.referenceCode = referenceCode;
123 ashish 617
    return this;
618
  }
619
 
695 rajveer 620
  public void unsetReferenceCode() {
621
    this.referenceCode = null;
123 ashish 622
  }
623
 
695 rajveer 624
  /** Returns true if field referenceCode is set (has been asigned a value) and false otherwise */
625
  public boolean isSetReferenceCode() {
626
    return this.referenceCode != null;
123 ashish 627
  }
628
 
695 rajveer 629
  public void setReferenceCodeIsSet(boolean value) {
630
    if (!value) {
631
      this.referenceCode = null;
632
    }
420 ashish 633
  }
634
 
695 rajveer 635
  public String getSessionId() {
636
    return this.sessionId;
420 ashish 637
  }
638
 
695 rajveer 639
  public Payment setSessionId(String sessionId) {
640
    this.sessionId = sessionId;
420 ashish 641
    return this;
642
  }
643
 
695 rajveer 644
  public void unsetSessionId() {
645
    this.sessionId = null;
420 ashish 646
  }
647
 
695 rajveer 648
  /** Returns true if field sessionId is set (has been asigned a value) and false otherwise */
649
  public boolean isSetSessionId() {
650
    return this.sessionId != null;
420 ashish 651
  }
652
 
695 rajveer 653
  public void setSessionIdIsSet(boolean value) {
123 ashish 654
    if (!value) {
695 rajveer 655
      this.sessionId = null;
123 ashish 656
    }
657
  }
658
 
695 rajveer 659
  public String getGatewayTxnDate() {
660
    return this.gatewayTxnDate;
420 ashish 661
  }
662
 
695 rajveer 663
  public Payment setGatewayTxnDate(String gatewayTxnDate) {
664
    this.gatewayTxnDate = gatewayTxnDate;
420 ashish 665
    return this;
666
  }
667
 
695 rajveer 668
  public void unsetGatewayTxnDate() {
669
    this.gatewayTxnDate = null;
420 ashish 670
  }
671
 
695 rajveer 672
  /** Returns true if field gatewayTxnDate is set (has been asigned a value) and false otherwise */
673
  public boolean isSetGatewayTxnDate() {
674
    return this.gatewayTxnDate != null;
420 ashish 675
  }
676
 
695 rajveer 677
  public void setGatewayTxnDateIsSet(boolean value) {
420 ashish 678
    if (!value) {
695 rajveer 679
      this.gatewayTxnDate = null;
420 ashish 680
    }
681
  }
682
 
695 rajveer 683
  public int getAttributesSize() {
684
    return (this.attributes == null) ? 0 : this.attributes.size();
420 ashish 685
  }
686
 
695 rajveer 687
  public java.util.Iterator<Attribute> getAttributesIterator() {
688
    return (this.attributes == null) ? null : this.attributes.iterator();
689
  }
690
 
691
  public void addToAttributes(Attribute elem) {
692
    if (this.attributes == null) {
693
      this.attributes = new ArrayList<Attribute>();
694
    }
695
    this.attributes.add(elem);
696
  }
697
 
698
  public List<Attribute> getAttributes() {
699
    return this.attributes;
700
  }
701
 
702
  public Payment setAttributes(List<Attribute> attributes) {
703
    this.attributes = attributes;
420 ashish 704
    return this;
705
  }
706
 
695 rajveer 707
  public void unsetAttributes() {
708
    this.attributes = null;
420 ashish 709
  }
710
 
695 rajveer 711
  /** Returns true if field attributes is set (has been asigned a value) and false otherwise */
712
  public boolean isSetAttributes() {
713
    return this.attributes != null;
420 ashish 714
  }
715
 
695 rajveer 716
  public void setAttributesIsSet(boolean value) {
420 ashish 717
    if (!value) {
695 rajveer 718
      this.attributes = null;
420 ashish 719
    }
720
  }
721
 
695 rajveer 722
  public long getInitTimestamp() {
723
    return this.initTimestamp;
420 ashish 724
  }
725
 
695 rajveer 726
  public Payment setInitTimestamp(long initTimestamp) {
727
    this.initTimestamp = initTimestamp;
728
    setInitTimestampIsSet(true);
420 ashish 729
    return this;
730
  }
731
 
695 rajveer 732
  public void unsetInitTimestamp() {
733
    __isset_bit_vector.clear(__INITTIMESTAMP_ISSET_ID);
420 ashish 734
  }
735
 
695 rajveer 736
  /** Returns true if field initTimestamp is set (has been asigned a value) and false otherwise */
737
  public boolean isSetInitTimestamp() {
738
    return __isset_bit_vector.get(__INITTIMESTAMP_ISSET_ID);
420 ashish 739
  }
740
 
695 rajveer 741
  public void setInitTimestampIsSet(boolean value) {
742
    __isset_bit_vector.set(__INITTIMESTAMP_ISSET_ID, value);
420 ashish 743
  }
744
 
695 rajveer 745
  public long getSuccessTimestamp() {
746
    return this.successTimestamp;
420 ashish 747
  }
748
 
695 rajveer 749
  public Payment setSuccessTimestamp(long successTimestamp) {
750
    this.successTimestamp = successTimestamp;
751
    setSuccessTimestampIsSet(true);
420 ashish 752
    return this;
753
  }
754
 
695 rajveer 755
  public void unsetSuccessTimestamp() {
756
    __isset_bit_vector.clear(__SUCCESSTIMESTAMP_ISSET_ID);
420 ashish 757
  }
758
 
695 rajveer 759
  /** Returns true if field successTimestamp is set (has been asigned a value) and false otherwise */
760
  public boolean isSetSuccessTimestamp() {
761
    return __isset_bit_vector.get(__SUCCESSTIMESTAMP_ISSET_ID);
420 ashish 762
  }
763
 
695 rajveer 764
  public void setSuccessTimestampIsSet(boolean value) {
765
    __isset_bit_vector.set(__SUCCESSTIMESTAMP_ISSET_ID, value);
420 ashish 766
  }
767
 
695 rajveer 768
  public long getErrorTimestamp() {
769
    return this.errorTimestamp;
420 ashish 770
  }
771
 
695 rajveer 772
  public Payment setErrorTimestamp(long errorTimestamp) {
773
    this.errorTimestamp = errorTimestamp;
774
    setErrorTimestampIsSet(true);
420 ashish 775
    return this;
776
  }
777
 
695 rajveer 778
  public void unsetErrorTimestamp() {
779
    __isset_bit_vector.clear(__ERRORTIMESTAMP_ISSET_ID);
420 ashish 780
  }
781
 
695 rajveer 782
  /** Returns true if field errorTimestamp is set (has been asigned a value) and false otherwise */
783
  public boolean isSetErrorTimestamp() {
784
    return __isset_bit_vector.get(__ERRORTIMESTAMP_ISSET_ID);
420 ashish 785
  }
786
 
695 rajveer 787
  public void setErrorTimestampIsSet(boolean value) {
788
    __isset_bit_vector.set(__ERRORTIMESTAMP_ISSET_ID, value);
420 ashish 789
  }
790
 
123 ashish 791
  public void setFieldValue(_Fields field, Object value) {
792
    switch (field) {
695 rajveer 793
    case PAYMENT_ID:
123 ashish 794
      if (value == null) {
695 rajveer 795
        unsetPaymentId();
123 ashish 796
      } else {
695 rajveer 797
        setPaymentId((Long)value);
123 ashish 798
      }
799
      break;
800
 
695 rajveer 801
    case GATEWAY_ID:
123 ashish 802
      if (value == null) {
695 rajveer 803
        unsetGatewayId();
123 ashish 804
      } else {
695 rajveer 805
        setGatewayId((Long)value);
123 ashish 806
      }
807
      break;
808
 
695 rajveer 809
    case GATEWAY_PAYMENT_ID:
123 ashish 810
      if (value == null) {
695 rajveer 811
        unsetGatewayPaymentId();
123 ashish 812
      } else {
695 rajveer 813
        setGatewayPaymentId((String)value);
123 ashish 814
      }
815
      break;
816
 
695 rajveer 817
    case MERCHANT_TXN_ID:
123 ashish 818
      if (value == null) {
695 rajveer 819
        unsetMerchantTxnId();
123 ashish 820
      } else {
695 rajveer 821
        setMerchantTxnId((String)value);
123 ashish 822
      }
823
      break;
824
 
695 rajveer 825
    case GATEWAY_TXN_ID:
123 ashish 826
      if (value == null) {
695 rajveer 827
        unsetGatewayTxnId();
123 ashish 828
      } else {
695 rajveer 829
        setGatewayTxnId((String)value);
123 ashish 830
      }
831
      break;
832
 
695 rajveer 833
    case AMOUNT:
123 ashish 834
      if (value == null) {
695 rajveer 835
        unsetAmount();
123 ashish 836
      } else {
695 rajveer 837
        setAmount((Double)value);
123 ashish 838
      }
839
      break;
840
 
695 rajveer 841
    case GATEWAY_TXN_STATUS:
842
      if (value == null) {
843
        unsetGatewayTxnStatus();
844
      } else {
845
        setGatewayTxnStatus((String)value);
846
      }
847
      break;
848
 
123 ashish 849
    case STATUS:
850
      if (value == null) {
851
        unsetStatus();
852
      } else {
853
        setStatus((PaymentStatus)value);
854
      }
855
      break;
856
 
695 rajveer 857
    case USER_ID:
123 ashish 858
      if (value == null) {
695 rajveer 859
        unsetUserId();
123 ashish 860
      } else {
695 rajveer 861
        setUserId((Long)value);
123 ashish 862
      }
863
      break;
864
 
695 rajveer 865
    case ERROR_CODE:
123 ashish 866
      if (value == null) {
695 rajveer 867
        unsetErrorCode();
123 ashish 868
      } else {
695 rajveer 869
        setErrorCode((String)value);
123 ashish 870
      }
871
      break;
872
 
695 rajveer 873
    case DESCRIPTION:
123 ashish 874
      if (value == null) {
695 rajveer 875
        unsetDescription();
123 ashish 876
      } else {
695 rajveer 877
        setDescription((String)value);
123 ashish 878
      }
879
      break;
880
 
695 rajveer 881
    case AUTH_CODE:
123 ashish 882
      if (value == null) {
695 rajveer 883
        unsetAuthCode();
123 ashish 884
      } else {
695 rajveer 885
        setAuthCode((String)value);
123 ashish 886
      }
887
      break;
888
 
695 rajveer 889
    case REFERENCE_CODE:
123 ashish 890
      if (value == null) {
695 rajveer 891
        unsetReferenceCode();
123 ashish 892
      } else {
695 rajveer 893
        setReferenceCode((String)value);
123 ashish 894
      }
895
      break;
896
 
695 rajveer 897
    case SESSION_ID:
420 ashish 898
      if (value == null) {
695 rajveer 899
        unsetSessionId();
420 ashish 900
      } else {
695 rajveer 901
        setSessionId((String)value);
420 ashish 902
      }
903
      break;
904
 
695 rajveer 905
    case GATEWAY_TXN_DATE:
420 ashish 906
      if (value == null) {
695 rajveer 907
        unsetGatewayTxnDate();
420 ashish 908
      } else {
695 rajveer 909
        setGatewayTxnDate((String)value);
420 ashish 910
      }
911
      break;
912
 
695 rajveer 913
    case ATTRIBUTES:
420 ashish 914
      if (value == null) {
695 rajveer 915
        unsetAttributes();
420 ashish 916
      } else {
695 rajveer 917
        setAttributes((List<Attribute>)value);
420 ashish 918
      }
919
      break;
920
 
695 rajveer 921
    case INIT_TIMESTAMP:
420 ashish 922
      if (value == null) {
695 rajveer 923
        unsetInitTimestamp();
420 ashish 924
      } else {
695 rajveer 925
        setInitTimestamp((Long)value);
420 ashish 926
      }
927
      break;
928
 
695 rajveer 929
    case SUCCESS_TIMESTAMP:
420 ashish 930
      if (value == null) {
695 rajveer 931
        unsetSuccessTimestamp();
420 ashish 932
      } else {
695 rajveer 933
        setSuccessTimestamp((Long)value);
420 ashish 934
      }
935
      break;
936
 
695 rajveer 937
    case ERROR_TIMESTAMP:
420 ashish 938
      if (value == null) {
695 rajveer 939
        unsetErrorTimestamp();
420 ashish 940
      } else {
695 rajveer 941
        setErrorTimestamp((Long)value);
420 ashish 942
      }
943
      break;
944
 
123 ashish 945
    }
946
  }
947
 
948
  public void setFieldValue(int fieldID, Object value) {
949
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
950
  }
951
 
952
  public Object getFieldValue(_Fields field) {
953
    switch (field) {
695 rajveer 954
    case PAYMENT_ID:
955
      return new Long(getPaymentId());
123 ashish 956
 
695 rajveer 957
    case GATEWAY_ID:
958
      return new Long(getGatewayId());
123 ashish 959
 
695 rajveer 960
    case GATEWAY_PAYMENT_ID:
961
      return getGatewayPaymentId();
962
 
963
    case MERCHANT_TXN_ID:
964
      return getMerchantTxnId();
965
 
966
    case GATEWAY_TXN_ID:
967
      return getGatewayTxnId();
968
 
123 ashish 969
    case AMOUNT:
970
      return new Double(getAmount());
971
 
695 rajveer 972
    case GATEWAY_TXN_STATUS:
973
      return getGatewayTxnStatus();
123 ashish 974
 
975
    case STATUS:
976
      return getStatus();
977
 
978
    case USER_ID:
695 rajveer 979
      return new Long(getUserId());
123 ashish 980
 
695 rajveer 981
    case ERROR_CODE:
982
      return getErrorCode();
123 ashish 983
 
695 rajveer 984
    case DESCRIPTION:
985
      return getDescription();
123 ashish 986
 
695 rajveer 987
    case AUTH_CODE:
988
      return getAuthCode();
123 ashish 989
 
695 rajveer 990
    case REFERENCE_CODE:
991
      return getReferenceCode();
420 ashish 992
 
993
    case SESSION_ID:
695 rajveer 994
      return getSessionId();
420 ashish 995
 
695 rajveer 996
    case GATEWAY_TXN_DATE:
997
      return getGatewayTxnDate();
420 ashish 998
 
695 rajveer 999
    case ATTRIBUTES:
1000
      return getAttributes();
420 ashish 1001
 
695 rajveer 1002
    case INIT_TIMESTAMP:
1003
      return new Long(getInitTimestamp());
420 ashish 1004
 
695 rajveer 1005
    case SUCCESS_TIMESTAMP:
1006
      return new Long(getSuccessTimestamp());
1007
 
1008
    case ERROR_TIMESTAMP:
1009
      return new Long(getErrorTimestamp());
1010
 
123 ashish 1011
    }
1012
    throw new IllegalStateException();
1013
  }
1014
 
1015
  public Object getFieldValue(int fieldId) {
1016
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1017
  }
1018
 
1019
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1020
  public boolean isSet(_Fields field) {
1021
    switch (field) {
695 rajveer 1022
    case PAYMENT_ID:
1023
      return isSetPaymentId();
1024
    case GATEWAY_ID:
1025
      return isSetGatewayId();
1026
    case GATEWAY_PAYMENT_ID:
1027
      return isSetGatewayPaymentId();
1028
    case MERCHANT_TXN_ID:
1029
      return isSetMerchantTxnId();
1030
    case GATEWAY_TXN_ID:
1031
      return isSetGatewayTxnId();
123 ashish 1032
    case AMOUNT:
1033
      return isSetAmount();
695 rajveer 1034
    case GATEWAY_TXN_STATUS:
1035
      return isSetGatewayTxnStatus();
123 ashish 1036
    case STATUS:
1037
      return isSetStatus();
1038
    case USER_ID:
695 rajveer 1039
      return isSetUserId();
420 ashish 1040
    case ERROR_CODE:
695 rajveer 1041
      return isSetErrorCode();
1042
    case DESCRIPTION:
1043
      return isSetDescription();
1044
    case AUTH_CODE:
1045
      return isSetAuthCode();
1046
    case REFERENCE_CODE:
1047
      return isSetReferenceCode();
420 ashish 1048
    case SESSION_ID:
695 rajveer 1049
      return isSetSessionId();
1050
    case GATEWAY_TXN_DATE:
1051
      return isSetGatewayTxnDate();
1052
    case ATTRIBUTES:
1053
      return isSetAttributes();
1054
    case INIT_TIMESTAMP:
1055
      return isSetInitTimestamp();
1056
    case SUCCESS_TIMESTAMP:
1057
      return isSetSuccessTimestamp();
1058
    case ERROR_TIMESTAMP:
1059
      return isSetErrorTimestamp();
123 ashish 1060
    }
1061
    throw new IllegalStateException();
1062
  }
1063
 
1064
  public boolean isSet(int fieldID) {
1065
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1066
  }
1067
 
1068
  @Override
1069
  public boolean equals(Object that) {
1070
    if (that == null)
1071
      return false;
1072
    if (that instanceof Payment)
1073
      return this.equals((Payment)that);
1074
    return false;
1075
  }
1076
 
1077
  public boolean equals(Payment that) {
1078
    if (that == null)
1079
      return false;
1080
 
695 rajveer 1081
    boolean this_present_paymentId = true;
1082
    boolean that_present_paymentId = true;
1083
    if (this_present_paymentId || that_present_paymentId) {
1084
      if (!(this_present_paymentId && that_present_paymentId))
123 ashish 1085
        return false;
695 rajveer 1086
      if (this.paymentId != that.paymentId)
123 ashish 1087
        return false;
1088
    }
1089
 
695 rajveer 1090
    boolean this_present_gatewayId = true;
1091
    boolean that_present_gatewayId = true;
1092
    if (this_present_gatewayId || that_present_gatewayId) {
1093
      if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 1094
        return false;
695 rajveer 1095
      if (this.gatewayId != that.gatewayId)
123 ashish 1096
        return false;
1097
    }
1098
 
695 rajveer 1099
    boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
1100
    boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
1101
    if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
1102
      if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
123 ashish 1103
        return false;
695 rajveer 1104
      if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
123 ashish 1105
        return false;
1106
    }
1107
 
695 rajveer 1108
    boolean this_present_merchantTxnId = true && this.isSetMerchantTxnId();
1109
    boolean that_present_merchantTxnId = true && that.isSetMerchantTxnId();
1110
    if (this_present_merchantTxnId || that_present_merchantTxnId) {
1111
      if (!(this_present_merchantTxnId && that_present_merchantTxnId))
123 ashish 1112
        return false;
695 rajveer 1113
      if (!this.merchantTxnId.equals(that.merchantTxnId))
123 ashish 1114
        return false;
1115
    }
1116
 
695 rajveer 1117
    boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
1118
    boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
1119
    if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
1120
      if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
123 ashish 1121
        return false;
695 rajveer 1122
      if (!this.gatewayTxnId.equals(that.gatewayTxnId))
123 ashish 1123
        return false;
1124
    }
1125
 
695 rajveer 1126
    boolean this_present_amount = true;
1127
    boolean that_present_amount = true;
1128
    if (this_present_amount || that_present_amount) {
1129
      if (!(this_present_amount && that_present_amount))
123 ashish 1130
        return false;
695 rajveer 1131
      if (this.amount != that.amount)
123 ashish 1132
        return false;
1133
    }
1134
 
695 rajveer 1135
    boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
1136
    boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
1137
    if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
1138
      if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
1139
        return false;
1140
      if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
1141
        return false;
1142
    }
1143
 
123 ashish 1144
    boolean this_present_status = true && this.isSetStatus();
1145
    boolean that_present_status = true && that.isSetStatus();
1146
    if (this_present_status || that_present_status) {
1147
      if (!(this_present_status && that_present_status))
1148
        return false;
1149
      if (!this.status.equals(that.status))
1150
        return false;
1151
    }
1152
 
695 rajveer 1153
    boolean this_present_userId = true;
1154
    boolean that_present_userId = true;
1155
    if (this_present_userId || that_present_userId) {
1156
      if (!(this_present_userId && that_present_userId))
123 ashish 1157
        return false;
695 rajveer 1158
      if (this.userId != that.userId)
123 ashish 1159
        return false;
1160
    }
1161
 
695 rajveer 1162
    boolean this_present_errorCode = true && this.isSetErrorCode();
1163
    boolean that_present_errorCode = true && that.isSetErrorCode();
1164
    if (this_present_errorCode || that_present_errorCode) {
1165
      if (!(this_present_errorCode && that_present_errorCode))
123 ashish 1166
        return false;
695 rajveer 1167
      if (!this.errorCode.equals(that.errorCode))
123 ashish 1168
        return false;
1169
    }
1170
 
695 rajveer 1171
    boolean this_present_description = true && this.isSetDescription();
1172
    boolean that_present_description = true && that.isSetDescription();
1173
    if (this_present_description || that_present_description) {
1174
      if (!(this_present_description && that_present_description))
123 ashish 1175
        return false;
695 rajveer 1176
      if (!this.description.equals(that.description))
123 ashish 1177
        return false;
1178
    }
1179
 
695 rajveer 1180
    boolean this_present_authCode = true && this.isSetAuthCode();
1181
    boolean that_present_authCode = true && that.isSetAuthCode();
1182
    if (this_present_authCode || that_present_authCode) {
1183
      if (!(this_present_authCode && that_present_authCode))
123 ashish 1184
        return false;
695 rajveer 1185
      if (!this.authCode.equals(that.authCode))
123 ashish 1186
        return false;
1187
    }
1188
 
695 rajveer 1189
    boolean this_present_referenceCode = true && this.isSetReferenceCode();
1190
    boolean that_present_referenceCode = true && that.isSetReferenceCode();
1191
    if (this_present_referenceCode || that_present_referenceCode) {
1192
      if (!(this_present_referenceCode && that_present_referenceCode))
123 ashish 1193
        return false;
695 rajveer 1194
      if (!this.referenceCode.equals(that.referenceCode))
123 ashish 1195
        return false;
1196
    }
1197
 
695 rajveer 1198
    boolean this_present_sessionId = true && this.isSetSessionId();
1199
    boolean that_present_sessionId = true && that.isSetSessionId();
1200
    if (this_present_sessionId || that_present_sessionId) {
1201
      if (!(this_present_sessionId && that_present_sessionId))
420 ashish 1202
        return false;
695 rajveer 1203
      if (!this.sessionId.equals(that.sessionId))
420 ashish 1204
        return false;
1205
    }
1206
 
695 rajveer 1207
    boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
1208
    boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
1209
    if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
1210
      if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
420 ashish 1211
        return false;
695 rajveer 1212
      if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
420 ashish 1213
        return false;
1214
    }
1215
 
695 rajveer 1216
    boolean this_present_attributes = true && this.isSetAttributes();
1217
    boolean that_present_attributes = true && that.isSetAttributes();
1218
    if (this_present_attributes || that_present_attributes) {
1219
      if (!(this_present_attributes && that_present_attributes))
420 ashish 1220
        return false;
695 rajveer 1221
      if (!this.attributes.equals(that.attributes))
420 ashish 1222
        return false;
1223
    }
1224
 
695 rajveer 1225
    boolean this_present_initTimestamp = true;
1226
    boolean that_present_initTimestamp = true;
1227
    if (this_present_initTimestamp || that_present_initTimestamp) {
1228
      if (!(this_present_initTimestamp && that_present_initTimestamp))
420 ashish 1229
        return false;
695 rajveer 1230
      if (this.initTimestamp != that.initTimestamp)
420 ashish 1231
        return false;
1232
    }
1233
 
695 rajveer 1234
    boolean this_present_successTimestamp = true;
1235
    boolean that_present_successTimestamp = true;
1236
    if (this_present_successTimestamp || that_present_successTimestamp) {
1237
      if (!(this_present_successTimestamp && that_present_successTimestamp))
420 ashish 1238
        return false;
695 rajveer 1239
      if (this.successTimestamp != that.successTimestamp)
420 ashish 1240
        return false;
1241
    }
1242
 
695 rajveer 1243
    boolean this_present_errorTimestamp = true;
1244
    boolean that_present_errorTimestamp = true;
1245
    if (this_present_errorTimestamp || that_present_errorTimestamp) {
1246
      if (!(this_present_errorTimestamp && that_present_errorTimestamp))
420 ashish 1247
        return false;
695 rajveer 1248
      if (this.errorTimestamp != that.errorTimestamp)
420 ashish 1249
        return false;
1250
    }
1251
 
123 ashish 1252
    return true;
1253
  }
1254
 
1255
  @Override
1256
  public int hashCode() {
1257
    return 0;
1258
  }
1259
 
695 rajveer 1260
  public int compareTo(Payment other) {
1261
    if (!getClass().equals(other.getClass())) {
1262
      return getClass().getName().compareTo(other.getClass().getName());
1263
    }
1264
 
1265
    int lastComparison = 0;
1266
    Payment typedOther = (Payment)other;
1267
 
1268
    lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(isSetPaymentId());
1269
    if (lastComparison != 0) {
1270
      return lastComparison;
1271
    }
1272
    lastComparison = TBaseHelper.compareTo(paymentId, typedOther.paymentId);
1273
    if (lastComparison != 0) {
1274
      return lastComparison;
1275
    }
1276
    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
1277
    if (lastComparison != 0) {
1278
      return lastComparison;
1279
    }
1280
    lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
1281
    if (lastComparison != 0) {
1282
      return lastComparison;
1283
    }
1284
    lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(isSetGatewayPaymentId());
1285
    if (lastComparison != 0) {
1286
      return lastComparison;
1287
    }
1288
    lastComparison = TBaseHelper.compareTo(gatewayPaymentId, typedOther.gatewayPaymentId);
1289
    if (lastComparison != 0) {
1290
      return lastComparison;
1291
    }
1292
    lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(isSetMerchantTxnId());
1293
    if (lastComparison != 0) {
1294
      return lastComparison;
1295
    }
1296
    lastComparison = TBaseHelper.compareTo(merchantTxnId, typedOther.merchantTxnId);
1297
    if (lastComparison != 0) {
1298
      return lastComparison;
1299
    }
1300
    lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(isSetGatewayTxnId());
1301
    if (lastComparison != 0) {
1302
      return lastComparison;
1303
    }
1304
    lastComparison = TBaseHelper.compareTo(gatewayTxnId, typedOther.gatewayTxnId);
1305
    if (lastComparison != 0) {
1306
      return lastComparison;
1307
    }
1308
    lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());
1309
    if (lastComparison != 0) {
1310
      return lastComparison;
1311
    }
1312
    lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);
1313
    if (lastComparison != 0) {
1314
      return lastComparison;
1315
    }
1316
    lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(isSetGatewayTxnStatus());
1317
    if (lastComparison != 0) {
1318
      return lastComparison;
1319
    }
1320
    lastComparison = TBaseHelper.compareTo(gatewayTxnStatus, typedOther.gatewayTxnStatus);
1321
    if (lastComparison != 0) {
1322
      return lastComparison;
1323
    }
1324
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
1325
    if (lastComparison != 0) {
1326
      return lastComparison;
1327
    }
1328
    lastComparison = TBaseHelper.compareTo(status, typedOther.status);
1329
    if (lastComparison != 0) {
1330
      return lastComparison;
1331
    }
1332
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
1333
    if (lastComparison != 0) {
1334
      return lastComparison;
1335
    }
1336
    lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
1337
    if (lastComparison != 0) {
1338
      return lastComparison;
1339
    }
1340
    lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(isSetErrorCode());
1341
    if (lastComparison != 0) {
1342
      return lastComparison;
1343
    }
1344
    lastComparison = TBaseHelper.compareTo(errorCode, typedOther.errorCode);
1345
    if (lastComparison != 0) {
1346
      return lastComparison;
1347
    }
1348
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
1349
    if (lastComparison != 0) {
1350
      return lastComparison;
1351
    }
1352
    lastComparison = TBaseHelper.compareTo(description, typedOther.description);
1353
    if (lastComparison != 0) {
1354
      return lastComparison;
1355
    }
1356
    lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(isSetAuthCode());
1357
    if (lastComparison != 0) {
1358
      return lastComparison;
1359
    }
1360
    lastComparison = TBaseHelper.compareTo(authCode, typedOther.authCode);
1361
    if (lastComparison != 0) {
1362
      return lastComparison;
1363
    }
1364
    lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(isSetReferenceCode());
1365
    if (lastComparison != 0) {
1366
      return lastComparison;
1367
    }
1368
    lastComparison = TBaseHelper.compareTo(referenceCode, typedOther.referenceCode);
1369
    if (lastComparison != 0) {
1370
      return lastComparison;
1371
    }
1372
    lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(isSetSessionId());
1373
    if (lastComparison != 0) {
1374
      return lastComparison;
1375
    }
1376
    lastComparison = TBaseHelper.compareTo(sessionId, typedOther.sessionId);
1377
    if (lastComparison != 0) {
1378
      return lastComparison;
1379
    }
1380
    lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(isSetGatewayTxnDate());
1381
    if (lastComparison != 0) {
1382
      return lastComparison;
1383
    }
1384
    lastComparison = TBaseHelper.compareTo(gatewayTxnDate, typedOther.gatewayTxnDate);
1385
    if (lastComparison != 0) {
1386
      return lastComparison;
1387
    }
1388
    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(isSetAttributes());
1389
    if (lastComparison != 0) {
1390
      return lastComparison;
1391
    }
1392
    lastComparison = TBaseHelper.compareTo(attributes, typedOther.attributes);
1393
    if (lastComparison != 0) {
1394
      return lastComparison;
1395
    }
1396
    lastComparison = Boolean.valueOf(isSetInitTimestamp()).compareTo(isSetInitTimestamp());
1397
    if (lastComparison != 0) {
1398
      return lastComparison;
1399
    }
1400
    lastComparison = TBaseHelper.compareTo(initTimestamp, typedOther.initTimestamp);
1401
    if (lastComparison != 0) {
1402
      return lastComparison;
1403
    }
1404
    lastComparison = Boolean.valueOf(isSetSuccessTimestamp()).compareTo(isSetSuccessTimestamp());
1405
    if (lastComparison != 0) {
1406
      return lastComparison;
1407
    }
1408
    lastComparison = TBaseHelper.compareTo(successTimestamp, typedOther.successTimestamp);
1409
    if (lastComparison != 0) {
1410
      return lastComparison;
1411
    }
1412
    lastComparison = Boolean.valueOf(isSetErrorTimestamp()).compareTo(isSetErrorTimestamp());
1413
    if (lastComparison != 0) {
1414
      return lastComparison;
1415
    }
1416
    lastComparison = TBaseHelper.compareTo(errorTimestamp, typedOther.errorTimestamp);
1417
    if (lastComparison != 0) {
1418
      return lastComparison;
1419
    }
1420
    return 0;
1421
  }
1422
 
123 ashish 1423
  public void read(TProtocol iprot) throws TException {
1424
    TField field;
1425
    iprot.readStructBegin();
1426
    while (true)
1427
    {
1428
      field = iprot.readFieldBegin();
1429
      if (field.type == TType.STOP) { 
1430
        break;
1431
      }
1432
      _Fields fieldId = _Fields.findByThriftId(field.id);
1433
      if (fieldId == null) {
1434
        TProtocolUtil.skip(iprot, field.type);
1435
      } else {
1436
        switch (fieldId) {
695 rajveer 1437
          case PAYMENT_ID:
1438
            if (field.type == TType.I64) {
1439
              this.paymentId = iprot.readI64();
1440
              setPaymentIdIsSet(true);
123 ashish 1441
            } else { 
1442
              TProtocolUtil.skip(iprot, field.type);
1443
            }
1444
            break;
695 rajveer 1445
          case GATEWAY_ID:
1446
            if (field.type == TType.I64) {
1447
              this.gatewayId = iprot.readI64();
1448
              setGatewayIdIsSet(true);
1449
            } else { 
1450
              TProtocolUtil.skip(iprot, field.type);
1451
            }
1452
            break;
1453
          case GATEWAY_PAYMENT_ID:
420 ashish 1454
            if (field.type == TType.STRING) {
695 rajveer 1455
              this.gatewayPaymentId = iprot.readString();
123 ashish 1456
            } else { 
1457
              TProtocolUtil.skip(iprot, field.type);
1458
            }
1459
            break;
695 rajveer 1460
          case MERCHANT_TXN_ID:
1461
            if (field.type == TType.STRING) {
1462
              this.merchantTxnId = iprot.readString();
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
    }
695 rajveer 1611
    if (this.merchantTxnId != null) {
1612
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
1613
      oprot.writeString(this.merchantTxnId);
420 ashish 1614
      oprot.writeFieldEnd();
1615
    }
695 rajveer 1616
    if (this.gatewayTxnId != null) {
1617
      oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
1618
      oprot.writeString(this.gatewayTxnId);
1619
      oprot.writeFieldEnd();
1620
    }
123 ashish 1621
    oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1622
    oprot.writeDouble(this.amount);
1623
    oprot.writeFieldEnd();
695 rajveer 1624
    if (this.gatewayTxnStatus != null) {
1625
      oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
1626
      oprot.writeString(this.gatewayTxnStatus);
123 ashish 1627
      oprot.writeFieldEnd();
1628
    }
1629
    if (this.status != null) {
1630
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1631
      oprot.writeI32(this.status.getValue());
1632
      oprot.writeFieldEnd();
1633
    }
1634
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 1635
    oprot.writeI64(this.userId);
123 ashish 1636
    oprot.writeFieldEnd();
695 rajveer 1637
    if (this.errorCode != null) {
1638
      oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
1639
      oprot.writeString(this.errorCode);
123 ashish 1640
      oprot.writeFieldEnd();
1641
    }
695 rajveer 1642
    if (this.description != null) {
1643
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
1644
      oprot.writeString(this.description);
123 ashish 1645
      oprot.writeFieldEnd();
1646
    }
695 rajveer 1647
    if (this.authCode != null) {
1648
      oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
1649
      oprot.writeString(this.authCode);
420 ashish 1650
      oprot.writeFieldEnd();
1651
    }
695 rajveer 1652
    if (this.referenceCode != null) {
1653
      oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
1654
      oprot.writeString(this.referenceCode);
420 ashish 1655
      oprot.writeFieldEnd();
1656
    }
695 rajveer 1657
    if (this.sessionId != null) {
1658
      oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
1659
      oprot.writeString(this.sessionId);
420 ashish 1660
      oprot.writeFieldEnd();
1661
    }
695 rajveer 1662
    if (this.gatewayTxnDate != null) {
1663
      oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
1664
      oprot.writeString(this.gatewayTxnDate);
420 ashish 1665
      oprot.writeFieldEnd();
1666
    }
695 rajveer 1667
    if (this.attributes != null) {
1668
      oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
1669
      {
1670
        oprot.writeListBegin(new TList(TType.STRUCT, this.attributes.size()));
1671
        for (Attribute _iter7 : this.attributes)
1672
        {
1673
          _iter7.write(oprot);
1674
        }
1675
        oprot.writeListEnd();
1676
      }
420 ashish 1677
      oprot.writeFieldEnd();
1678
    }
695 rajveer 1679
    oprot.writeFieldBegin(INIT_TIMESTAMP_FIELD_DESC);
1680
    oprot.writeI64(this.initTimestamp);
1681
    oprot.writeFieldEnd();
1682
    oprot.writeFieldBegin(SUCCESS_TIMESTAMP_FIELD_DESC);
1683
    oprot.writeI64(this.successTimestamp);
1684
    oprot.writeFieldEnd();
1685
    oprot.writeFieldBegin(ERROR_TIMESTAMP_FIELD_DESC);
1686
    oprot.writeI64(this.errorTimestamp);
1687
    oprot.writeFieldEnd();
123 ashish 1688
    oprot.writeFieldStop();
1689
    oprot.writeStructEnd();
1690
  }
1691
 
1692
  @Override
1693
  public String toString() {
1694
    StringBuilder sb = new StringBuilder("Payment(");
1695
    boolean first = true;
1696
 
695 rajveer 1697
    sb.append("paymentId:");
1698
    sb.append(this.paymentId);
1699
    first = false;
1700
    if (!first) sb.append(", ");
1701
    sb.append("gatewayId:");
1702
    sb.append(this.gatewayId);
1703
    first = false;
1704
    if (!first) sb.append(", ");
1705
    sb.append("gatewayPaymentId:");
1706
    if (this.gatewayPaymentId == null) {
420 ashish 1707
      sb.append("null");
1708
    } else {
695 rajveer 1709
      sb.append(this.gatewayPaymentId);
420 ashish 1710
    }
123 ashish 1711
    first = false;
1712
    if (!first) sb.append(", ");
695 rajveer 1713
    sb.append("merchantTxnId:");
1714
    if (this.merchantTxnId == null) {
420 ashish 1715
      sb.append("null");
1716
    } else {
695 rajveer 1717
      sb.append(this.merchantTxnId);
420 ashish 1718
    }
123 ashish 1719
    first = false;
1720
    if (!first) sb.append(", ");
695 rajveer 1721
    sb.append("gatewayTxnId:");
1722
    if (this.gatewayTxnId == null) {
1723
      sb.append("null");
1724
    } else {
1725
      sb.append(this.gatewayTxnId);
1726
    }
1727
    first = false;
1728
    if (!first) sb.append(", ");
123 ashish 1729
    sb.append("amount:");
1730
    sb.append(this.amount);
1731
    first = false;
1732
    if (!first) sb.append(", ");
695 rajveer 1733
    sb.append("gatewayTxnStatus:");
1734
    if (this.gatewayTxnStatus == null) {
123 ashish 1735
      sb.append("null");
1736
    } else {
695 rajveer 1737
      sb.append(this.gatewayTxnStatus);
123 ashish 1738
    }
1739
    first = false;
1740
    if (!first) sb.append(", ");
1741
    sb.append("status:");
1742
    if (this.status == null) {
1743
      sb.append("null");
1744
    } else {
1745
      String status_name = status.name();
1746
      if (status_name != null) {
1747
        sb.append(status_name);
1748
        sb.append(" (");
1749
      }
1750
      sb.append(this.status);
1751
      if (status_name != null) {
1752
        sb.append(")");
1753
      }
1754
    }
1755
    first = false;
1756
    if (!first) sb.append(", ");
695 rajveer 1757
    sb.append("userId:");
1758
    sb.append(this.userId);
123 ashish 1759
    first = false;
1760
    if (!first) sb.append(", ");
695 rajveer 1761
    sb.append("errorCode:");
1762
    if (this.errorCode == null) {
123 ashish 1763
      sb.append("null");
1764
    } else {
695 rajveer 1765
      sb.append(this.errorCode);
123 ashish 1766
    }
1767
    first = false;
1768
    if (!first) sb.append(", ");
695 rajveer 1769
    sb.append("description:");
1770
    if (this.description == null) {
123 ashish 1771
      sb.append("null");
1772
    } else {
695 rajveer 1773
      sb.append(this.description);
123 ashish 1774
    }
1775
    first = false;
420 ashish 1776
    if (!first) sb.append(", ");
695 rajveer 1777
    sb.append("authCode:");
1778
    if (this.authCode == null) {
420 ashish 1779
      sb.append("null");
1780
    } else {
695 rajveer 1781
      sb.append(this.authCode);
420 ashish 1782
    }
1783
    first = false;
1784
    if (!first) sb.append(", ");
695 rajveer 1785
    sb.append("referenceCode:");
1786
    if (this.referenceCode == null) {
420 ashish 1787
      sb.append("null");
1788
    } else {
695 rajveer 1789
      sb.append(this.referenceCode);
420 ashish 1790
    }
1791
    first = false;
1792
    if (!first) sb.append(", ");
695 rajveer 1793
    sb.append("sessionId:");
1794
    if (this.sessionId == null) {
420 ashish 1795
      sb.append("null");
1796
    } else {
695 rajveer 1797
      sb.append(this.sessionId);
420 ashish 1798
    }
1799
    first = false;
1800
    if (!first) sb.append(", ");
695 rajveer 1801
    sb.append("gatewayTxnDate:");
1802
    if (this.gatewayTxnDate == null) {
420 ashish 1803
      sb.append("null");
1804
    } else {
695 rajveer 1805
      sb.append(this.gatewayTxnDate);
420 ashish 1806
    }
1807
    first = false;
1808
    if (!first) sb.append(", ");
695 rajveer 1809
    sb.append("attributes:");
1810
    if (this.attributes == null) {
420 ashish 1811
      sb.append("null");
1812
    } else {
695 rajveer 1813
      sb.append(this.attributes);
420 ashish 1814
    }
1815
    first = false;
695 rajveer 1816
    if (!first) sb.append(", ");
1817
    sb.append("initTimestamp:");
1818
    sb.append(this.initTimestamp);
1819
    first = false;
1820
    if (!first) sb.append(", ");
1821
    sb.append("successTimestamp:");
1822
    sb.append(this.successTimestamp);
1823
    first = false;
1824
    if (!first) sb.append(", ");
1825
    sb.append("errorTimestamp:");
1826
    sb.append(this.errorTimestamp);
1827
    first = false;
123 ashish 1828
    sb.append(")");
1829
    return sb.toString();
1830
  }
1831
 
1832
  public void validate() throws TException {
1833
    // check for required fields
1834
  }
1835
 
1836
}
1837