Subversion Repositories SmartDukaan

Rev

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

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