Subversion Repositories SmartDukaan

Rev

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