Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
6000 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class RechargeOrder implements org.apache.thrift.TBase<RechargeOrder, RechargeOrder._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RechargeOrder");
25
 
6031 rajveer 26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField DISPLAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("displayId", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField TOTAL_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalAmount", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("walletAmount", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField ORDER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("orderType", org.apache.thrift.protocol.TType.I32, (short)7);
33
  private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField RECHARGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("rechargeType", org.apache.thrift.protocol.TType.I32, (short)9);
35
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)10);
36
  private static final org.apache.thrift.protocol.TField DEVICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceNumber", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  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)12);
38
  private static final org.apache.thrift.protocol.TField USER_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmailId", org.apache.thrift.protocol.TType.STRING, (short)13);
39
  private static final org.apache.thrift.protocol.TField CREATION_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTimestamp", org.apache.thrift.protocol.TType.I64, (short)14);
6000 mandeep.dh 40
 
6031 rajveer 41
  private long id; // required
42
  private String displayId; // required
43
  private long totalAmount; // required
44
  private long walletAmount; // required
6000 mandeep.dh 45
  private long transactionId; // required
46
  private String invoiceNumber; // required
47
  private OrderType orderType; // required
48
  private long operatorId; // required
49
  private RechargeType rechargeType; // required
6031 rajveer 50
  private RechargeOrderStatus status; // required
6000 mandeep.dh 51
  private String deviceNumber; // required
6031 rajveer 52
  private long userId; // required
53
  private String userEmailId; // required
6000 mandeep.dh 54
  private long creationTimestamp; // required
55
 
56
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
58
    ID((short)1, "id"),
6031 rajveer 59
    DISPLAY_ID((short)2, "displayId"),
60
    TOTAL_AMOUNT((short)3, "totalAmount"),
61
    WALLET_AMOUNT((short)4, "walletAmount"),
62
    TRANSACTION_ID((short)5, "transactionId"),
63
    INVOICE_NUMBER((short)6, "invoiceNumber"),
6000 mandeep.dh 64
    /**
65
     * 
66
     * @see OrderType
67
     */
6031 rajveer 68
    ORDER_TYPE((short)7, "orderType"),
69
    OPERATOR_ID((short)8, "operatorId"),
6000 mandeep.dh 70
    /**
71
     * 
72
     * @see RechargeType
73
     */
6031 rajveer 74
    RECHARGE_TYPE((short)9, "rechargeType"),
6000 mandeep.dh 75
    /**
76
     * 
77
     * @see RechargeOrderStatus
78
     */
6031 rajveer 79
    STATUS((short)10, "status"),
80
    DEVICE_NUMBER((short)11, "deviceNumber"),
81
    USER_ID((short)12, "userId"),
82
    USER_EMAIL_ID((short)13, "userEmailId"),
83
    CREATION_TIMESTAMP((short)14, "creationTimestamp");
6000 mandeep.dh 84
 
85
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
86
 
87
    static {
88
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
89
        byName.put(field.getFieldName(), field);
90
      }
91
    }
92
 
93
    /**
94
     * Find the _Fields constant that matches fieldId, or null if its not found.
95
     */
96
    public static _Fields findByThriftId(int fieldId) {
97
      switch(fieldId) {
98
        case 1: // ID
99
          return ID;
6031 rajveer 100
        case 2: // DISPLAY_ID
101
          return DISPLAY_ID;
102
        case 3: // TOTAL_AMOUNT
103
          return TOTAL_AMOUNT;
104
        case 4: // WALLET_AMOUNT
105
          return WALLET_AMOUNT;
106
        case 5: // TRANSACTION_ID
6000 mandeep.dh 107
          return TRANSACTION_ID;
6031 rajveer 108
        case 6: // INVOICE_NUMBER
6000 mandeep.dh 109
          return INVOICE_NUMBER;
6031 rajveer 110
        case 7: // ORDER_TYPE
6000 mandeep.dh 111
          return ORDER_TYPE;
6031 rajveer 112
        case 8: // OPERATOR_ID
6000 mandeep.dh 113
          return OPERATOR_ID;
6031 rajveer 114
        case 9: // RECHARGE_TYPE
6000 mandeep.dh 115
          return RECHARGE_TYPE;
6031 rajveer 116
        case 10: // STATUS
117
          return STATUS;
118
        case 11: // DEVICE_NUMBER
6000 mandeep.dh 119
          return DEVICE_NUMBER;
6031 rajveer 120
        case 12: // USER_ID
121
          return USER_ID;
122
        case 13: // USER_EMAIL_ID
123
          return USER_EMAIL_ID;
124
        case 14: // CREATION_TIMESTAMP
6000 mandeep.dh 125
          return CREATION_TIMESTAMP;
126
        default:
127
          return null;
128
      }
129
    }
130
 
131
    /**
132
     * Find the _Fields constant that matches fieldId, throwing an exception
133
     * if it is not found.
134
     */
135
    public static _Fields findByThriftIdOrThrow(int fieldId) {
136
      _Fields fields = findByThriftId(fieldId);
137
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
138
      return fields;
139
    }
140
 
141
    /**
142
     * Find the _Fields constant that matches name, or null if its not found.
143
     */
144
    public static _Fields findByName(String name) {
145
      return byName.get(name);
146
    }
147
 
148
    private final short _thriftId;
149
    private final String _fieldName;
150
 
151
    _Fields(short thriftId, String fieldName) {
152
      _thriftId = thriftId;
153
      _fieldName = fieldName;
154
    }
155
 
156
    public short getThriftFieldId() {
157
      return _thriftId;
158
    }
159
 
160
    public String getFieldName() {
161
      return _fieldName;
162
    }
163
  }
164
 
165
  // isset id assignments
6031 rajveer 166
  private static final int __ID_ISSET_ID = 0;
167
  private static final int __TOTALAMOUNT_ISSET_ID = 1;
168
  private static final int __WALLETAMOUNT_ISSET_ID = 2;
169
  private static final int __TRANSACTIONID_ISSET_ID = 3;
170
  private static final int __OPERATORID_ISSET_ID = 4;
171
  private static final int __USERID_ISSET_ID = 5;
172
  private static final int __CREATIONTIMESTAMP_ISSET_ID = 6;
173
  private BitSet __isset_bit_vector = new BitSet(7);
6000 mandeep.dh 174
 
175
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
176
  static {
177
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
178
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6031 rajveer 179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
180
    tmpMap.put(_Fields.DISPLAY_ID, new org.apache.thrift.meta_data.FieldMetaData("displayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6000 mandeep.dh 181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6031 rajveer 182
    tmpMap.put(_Fields.TOTAL_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6000 mandeep.dh 183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6031 rajveer 184
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("walletAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6000 mandeep.dh 186
    tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
188
    tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
190
    tmpMap.put(_Fields.ORDER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("orderType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
191
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, OrderType.class)));
192
    tmpMap.put(_Fields.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
194
    tmpMap.put(_Fields.RECHARGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("rechargeType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
195
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeType.class)));
6031 rajveer 196
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6000 mandeep.dh 197
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeOrderStatus.class)));
198
    tmpMap.put(_Fields.DEVICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("deviceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
199
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6031 rajveer 200
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6000 mandeep.dh 201
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6031 rajveer 202
    tmpMap.put(_Fields.USER_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("userEmailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
203
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6000 mandeep.dh 204
    tmpMap.put(_Fields.CREATION_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("creationTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
206
    metaDataMap = Collections.unmodifiableMap(tmpMap);
207
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
208
  }
209
 
210
  public RechargeOrder() {
211
  }
212
 
213
  public RechargeOrder(
6031 rajveer 214
    long id,
215
    String displayId,
216
    long totalAmount,
217
    long walletAmount,
6000 mandeep.dh 218
    long transactionId,
219
    String invoiceNumber,
220
    OrderType orderType,
221
    long operatorId,
222
    RechargeType rechargeType,
6031 rajveer 223
    RechargeOrderStatus status,
6000 mandeep.dh 224
    String deviceNumber,
6031 rajveer 225
    long userId,
226
    String userEmailId,
6000 mandeep.dh 227
    long creationTimestamp)
228
  {
229
    this();
230
    this.id = id;
6031 rajveer 231
    setIdIsSet(true);
232
    this.displayId = displayId;
233
    this.totalAmount = totalAmount;
234
    setTotalAmountIsSet(true);
235
    this.walletAmount = walletAmount;
236
    setWalletAmountIsSet(true);
6000 mandeep.dh 237
    this.transactionId = transactionId;
238
    setTransactionIdIsSet(true);
239
    this.invoiceNumber = invoiceNumber;
240
    this.orderType = orderType;
241
    this.operatorId = operatorId;
242
    setOperatorIdIsSet(true);
243
    this.rechargeType = rechargeType;
6031 rajveer 244
    this.status = status;
6000 mandeep.dh 245
    this.deviceNumber = deviceNumber;
6031 rajveer 246
    this.userId = userId;
247
    setUserIdIsSet(true);
248
    this.userEmailId = userEmailId;
6000 mandeep.dh 249
    this.creationTimestamp = creationTimestamp;
250
    setCreationTimestampIsSet(true);
251
  }
252
 
253
  /**
254
   * Performs a deep copy on <i>other</i>.
255
   */
256
  public RechargeOrder(RechargeOrder other) {
257
    __isset_bit_vector.clear();
258
    __isset_bit_vector.or(other.__isset_bit_vector);
6031 rajveer 259
    this.id = other.id;
260
    if (other.isSetDisplayId()) {
261
      this.displayId = other.displayId;
6000 mandeep.dh 262
    }
6031 rajveer 263
    this.totalAmount = other.totalAmount;
264
    this.walletAmount = other.walletAmount;
6000 mandeep.dh 265
    this.transactionId = other.transactionId;
266
    if (other.isSetInvoiceNumber()) {
267
      this.invoiceNumber = other.invoiceNumber;
268
    }
269
    if (other.isSetOrderType()) {
270
      this.orderType = other.orderType;
271
    }
272
    this.operatorId = other.operatorId;
273
    if (other.isSetRechargeType()) {
274
      this.rechargeType = other.rechargeType;
275
    }
6031 rajveer 276
    if (other.isSetStatus()) {
277
      this.status = other.status;
6000 mandeep.dh 278
    }
279
    if (other.isSetDeviceNumber()) {
280
      this.deviceNumber = other.deviceNumber;
281
    }
6031 rajveer 282
    this.userId = other.userId;
283
    if (other.isSetUserEmailId()) {
284
      this.userEmailId = other.userEmailId;
285
    }
6000 mandeep.dh 286
    this.creationTimestamp = other.creationTimestamp;
287
  }
288
 
289
  public RechargeOrder deepCopy() {
290
    return new RechargeOrder(this);
291
  }
292
 
293
  @Override
294
  public void clear() {
6031 rajveer 295
    setIdIsSet(false);
296
    this.id = 0;
297
    this.displayId = null;
298
    setTotalAmountIsSet(false);
299
    this.totalAmount = 0;
300
    setWalletAmountIsSet(false);
301
    this.walletAmount = 0;
6000 mandeep.dh 302
    setTransactionIdIsSet(false);
303
    this.transactionId = 0;
304
    this.invoiceNumber = null;
305
    this.orderType = null;
306
    setOperatorIdIsSet(false);
307
    this.operatorId = 0;
308
    this.rechargeType = null;
6031 rajveer 309
    this.status = null;
6000 mandeep.dh 310
    this.deviceNumber = null;
6031 rajveer 311
    setUserIdIsSet(false);
312
    this.userId = 0;
313
    this.userEmailId = null;
6000 mandeep.dh 314
    setCreationTimestampIsSet(false);
315
    this.creationTimestamp = 0;
316
  }
317
 
6031 rajveer 318
  public long getId() {
6000 mandeep.dh 319
    return this.id;
320
  }
321
 
6031 rajveer 322
  public void setId(long id) {
6000 mandeep.dh 323
    this.id = id;
6031 rajveer 324
    setIdIsSet(true);
6000 mandeep.dh 325
  }
326
 
327
  public void unsetId() {
6031 rajveer 328
    __isset_bit_vector.clear(__ID_ISSET_ID);
6000 mandeep.dh 329
  }
330
 
331
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
332
  public boolean isSetId() {
6031 rajveer 333
    return __isset_bit_vector.get(__ID_ISSET_ID);
6000 mandeep.dh 334
  }
335
 
336
  public void setIdIsSet(boolean value) {
6031 rajveer 337
    __isset_bit_vector.set(__ID_ISSET_ID, value);
338
  }
339
 
340
  public String getDisplayId() {
341
    return this.displayId;
342
  }
343
 
344
  public void setDisplayId(String displayId) {
345
    this.displayId = displayId;
346
  }
347
 
348
  public void unsetDisplayId() {
349
    this.displayId = null;
350
  }
351
 
352
  /** Returns true if field displayId is set (has been assigned a value) and false otherwise */
353
  public boolean isSetDisplayId() {
354
    return this.displayId != null;
355
  }
356
 
357
  public void setDisplayIdIsSet(boolean value) {
6000 mandeep.dh 358
    if (!value) {
6031 rajveer 359
      this.displayId = null;
6000 mandeep.dh 360
    }
361
  }
362
 
6031 rajveer 363
  public long getTotalAmount() {
364
    return this.totalAmount;
6000 mandeep.dh 365
  }
366
 
6031 rajveer 367
  public void setTotalAmount(long totalAmount) {
368
    this.totalAmount = totalAmount;
369
    setTotalAmountIsSet(true);
6000 mandeep.dh 370
  }
371
 
6031 rajveer 372
  public void unsetTotalAmount() {
373
    __isset_bit_vector.clear(__TOTALAMOUNT_ISSET_ID);
6000 mandeep.dh 374
  }
375
 
6031 rajveer 376
  /** Returns true if field totalAmount is set (has been assigned a value) and false otherwise */
377
  public boolean isSetTotalAmount() {
378
    return __isset_bit_vector.get(__TOTALAMOUNT_ISSET_ID);
6000 mandeep.dh 379
  }
380
 
6031 rajveer 381
  public void setTotalAmountIsSet(boolean value) {
382
    __isset_bit_vector.set(__TOTALAMOUNT_ISSET_ID, value);
6000 mandeep.dh 383
  }
384
 
6031 rajveer 385
  public long getWalletAmount() {
386
    return this.walletAmount;
387
  }
388
 
389
  public void setWalletAmount(long walletAmount) {
390
    this.walletAmount = walletAmount;
391
    setWalletAmountIsSet(true);
392
  }
393
 
394
  public void unsetWalletAmount() {
395
    __isset_bit_vector.clear(__WALLETAMOUNT_ISSET_ID);
396
  }
397
 
398
  /** Returns true if field walletAmount is set (has been assigned a value) and false otherwise */
399
  public boolean isSetWalletAmount() {
400
    return __isset_bit_vector.get(__WALLETAMOUNT_ISSET_ID);
401
  }
402
 
403
  public void setWalletAmountIsSet(boolean value) {
404
    __isset_bit_vector.set(__WALLETAMOUNT_ISSET_ID, value);
405
  }
406
 
6000 mandeep.dh 407
  public long getTransactionId() {
408
    return this.transactionId;
409
  }
410
 
411
  public void setTransactionId(long transactionId) {
412
    this.transactionId = transactionId;
413
    setTransactionIdIsSet(true);
414
  }
415
 
416
  public void unsetTransactionId() {
417
    __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
418
  }
419
 
420
  /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
421
  public boolean isSetTransactionId() {
422
    return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
423
  }
424
 
425
  public void setTransactionIdIsSet(boolean value) {
426
    __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
427
  }
428
 
429
  public String getInvoiceNumber() {
430
    return this.invoiceNumber;
431
  }
432
 
433
  public void setInvoiceNumber(String invoiceNumber) {
434
    this.invoiceNumber = invoiceNumber;
435
  }
436
 
437
  public void unsetInvoiceNumber() {
438
    this.invoiceNumber = null;
439
  }
440
 
441
  /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
442
  public boolean isSetInvoiceNumber() {
443
    return this.invoiceNumber != null;
444
  }
445
 
446
  public void setInvoiceNumberIsSet(boolean value) {
447
    if (!value) {
448
      this.invoiceNumber = null;
449
    }
450
  }
451
 
452
  /**
453
   * 
454
   * @see OrderType
455
   */
456
  public OrderType getOrderType() {
457
    return this.orderType;
458
  }
459
 
460
  /**
461
   * 
462
   * @see OrderType
463
   */
464
  public void setOrderType(OrderType orderType) {
465
    this.orderType = orderType;
466
  }
467
 
468
  public void unsetOrderType() {
469
    this.orderType = null;
470
  }
471
 
472
  /** Returns true if field orderType is set (has been assigned a value) and false otherwise */
473
  public boolean isSetOrderType() {
474
    return this.orderType != null;
475
  }
476
 
477
  public void setOrderTypeIsSet(boolean value) {
478
    if (!value) {
479
      this.orderType = null;
480
    }
481
  }
482
 
483
  public long getOperatorId() {
484
    return this.operatorId;
485
  }
486
 
487
  public void setOperatorId(long operatorId) {
488
    this.operatorId = operatorId;
489
    setOperatorIdIsSet(true);
490
  }
491
 
492
  public void unsetOperatorId() {
493
    __isset_bit_vector.clear(__OPERATORID_ISSET_ID);
494
  }
495
 
496
  /** Returns true if field operatorId is set (has been assigned a value) and false otherwise */
497
  public boolean isSetOperatorId() {
498
    return __isset_bit_vector.get(__OPERATORID_ISSET_ID);
499
  }
500
 
501
  public void setOperatorIdIsSet(boolean value) {
502
    __isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
503
  }
504
 
505
  /**
506
   * 
507
   * @see RechargeType
508
   */
509
  public RechargeType getRechargeType() {
510
    return this.rechargeType;
511
  }
512
 
513
  /**
514
   * 
515
   * @see RechargeType
516
   */
517
  public void setRechargeType(RechargeType rechargeType) {
518
    this.rechargeType = rechargeType;
519
  }
520
 
521
  public void unsetRechargeType() {
522
    this.rechargeType = null;
523
  }
524
 
525
  /** Returns true if field rechargeType is set (has been assigned a value) and false otherwise */
526
  public boolean isSetRechargeType() {
527
    return this.rechargeType != null;
528
  }
529
 
530
  public void setRechargeTypeIsSet(boolean value) {
531
    if (!value) {
532
      this.rechargeType = null;
533
    }
534
  }
535
 
536
  /**
537
   * 
538
   * @see RechargeOrderStatus
539
   */
6031 rajveer 540
  public RechargeOrderStatus getStatus() {
541
    return this.status;
6000 mandeep.dh 542
  }
543
 
544
  /**
545
   * 
546
   * @see RechargeOrderStatus
547
   */
6031 rajveer 548
  public void setStatus(RechargeOrderStatus status) {
549
    this.status = status;
6000 mandeep.dh 550
  }
551
 
6031 rajveer 552
  public void unsetStatus() {
553
    this.status = null;
6000 mandeep.dh 554
  }
555
 
6031 rajveer 556
  /** Returns true if field status is set (has been assigned a value) and false otherwise */
557
  public boolean isSetStatus() {
558
    return this.status != null;
6000 mandeep.dh 559
  }
560
 
6031 rajveer 561
  public void setStatusIsSet(boolean value) {
6000 mandeep.dh 562
    if (!value) {
6031 rajveer 563
      this.status = null;
6000 mandeep.dh 564
    }
565
  }
566
 
567
  public String getDeviceNumber() {
568
    return this.deviceNumber;
569
  }
570
 
571
  public void setDeviceNumber(String deviceNumber) {
572
    this.deviceNumber = deviceNumber;
573
  }
574
 
575
  public void unsetDeviceNumber() {
576
    this.deviceNumber = null;
577
  }
578
 
579
  /** Returns true if field deviceNumber is set (has been assigned a value) and false otherwise */
580
  public boolean isSetDeviceNumber() {
581
    return this.deviceNumber != null;
582
  }
583
 
584
  public void setDeviceNumberIsSet(boolean value) {
585
    if (!value) {
586
      this.deviceNumber = null;
587
    }
588
  }
589
 
6031 rajveer 590
  public long getUserId() {
591
    return this.userId;
6000 mandeep.dh 592
  }
593
 
6031 rajveer 594
  public void setUserId(long userId) {
595
    this.userId = userId;
596
    setUserIdIsSet(true);
6000 mandeep.dh 597
  }
598
 
6031 rajveer 599
  public void unsetUserId() {
600
    __isset_bit_vector.clear(__USERID_ISSET_ID);
6000 mandeep.dh 601
  }
602
 
6031 rajveer 603
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
604
  public boolean isSetUserId() {
605
    return __isset_bit_vector.get(__USERID_ISSET_ID);
6000 mandeep.dh 606
  }
607
 
6031 rajveer 608
  public void setUserIdIsSet(boolean value) {
609
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
6000 mandeep.dh 610
  }
611
 
6031 rajveer 612
  public String getUserEmailId() {
613
    return this.userEmailId;
6000 mandeep.dh 614
  }
615
 
6031 rajveer 616
  public void setUserEmailId(String userEmailId) {
617
    this.userEmailId = userEmailId;
6000 mandeep.dh 618
  }
619
 
6031 rajveer 620
  public void unsetUserEmailId() {
621
    this.userEmailId = null;
6000 mandeep.dh 622
  }
623
 
6031 rajveer 624
  /** Returns true if field userEmailId is set (has been assigned a value) and false otherwise */
625
  public boolean isSetUserEmailId() {
626
    return this.userEmailId != null;
6000 mandeep.dh 627
  }
628
 
6031 rajveer 629
  public void setUserEmailIdIsSet(boolean value) {
630
    if (!value) {
631
      this.userEmailId = null;
632
    }
6000 mandeep.dh 633
  }
634
 
635
  public long getCreationTimestamp() {
636
    return this.creationTimestamp;
637
  }
638
 
639
  public void setCreationTimestamp(long creationTimestamp) {
640
    this.creationTimestamp = creationTimestamp;
641
    setCreationTimestampIsSet(true);
642
  }
643
 
644
  public void unsetCreationTimestamp() {
645
    __isset_bit_vector.clear(__CREATIONTIMESTAMP_ISSET_ID);
646
  }
647
 
648
  /** Returns true if field creationTimestamp is set (has been assigned a value) and false otherwise */
649
  public boolean isSetCreationTimestamp() {
650
    return __isset_bit_vector.get(__CREATIONTIMESTAMP_ISSET_ID);
651
  }
652
 
653
  public void setCreationTimestampIsSet(boolean value) {
654
    __isset_bit_vector.set(__CREATIONTIMESTAMP_ISSET_ID, value);
655
  }
656
 
657
  public void setFieldValue(_Fields field, Object value) {
658
    switch (field) {
659
    case ID:
660
      if (value == null) {
661
        unsetId();
662
      } else {
6031 rajveer 663
        setId((Long)value);
6000 mandeep.dh 664
      }
665
      break;
666
 
6031 rajveer 667
    case DISPLAY_ID:
6000 mandeep.dh 668
      if (value == null) {
6031 rajveer 669
        unsetDisplayId();
6000 mandeep.dh 670
      } else {
6031 rajveer 671
        setDisplayId((String)value);
6000 mandeep.dh 672
      }
673
      break;
674
 
6031 rajveer 675
    case TOTAL_AMOUNT:
676
      if (value == null) {
677
        unsetTotalAmount();
678
      } else {
679
        setTotalAmount((Long)value);
680
      }
681
      break;
682
 
683
    case WALLET_AMOUNT:
684
      if (value == null) {
685
        unsetWalletAmount();
686
      } else {
687
        setWalletAmount((Long)value);
688
      }
689
      break;
690
 
6000 mandeep.dh 691
    case TRANSACTION_ID:
692
      if (value == null) {
693
        unsetTransactionId();
694
      } else {
695
        setTransactionId((Long)value);
696
      }
697
      break;
698
 
699
    case INVOICE_NUMBER:
700
      if (value == null) {
701
        unsetInvoiceNumber();
702
      } else {
703
        setInvoiceNumber((String)value);
704
      }
705
      break;
706
 
707
    case ORDER_TYPE:
708
      if (value == null) {
709
        unsetOrderType();
710
      } else {
711
        setOrderType((OrderType)value);
712
      }
713
      break;
714
 
715
    case OPERATOR_ID:
716
      if (value == null) {
717
        unsetOperatorId();
718
      } else {
719
        setOperatorId((Long)value);
720
      }
721
      break;
722
 
723
    case RECHARGE_TYPE:
724
      if (value == null) {
725
        unsetRechargeType();
726
      } else {
727
        setRechargeType((RechargeType)value);
728
      }
729
      break;
730
 
6031 rajveer 731
    case STATUS:
6000 mandeep.dh 732
      if (value == null) {
6031 rajveer 733
        unsetStatus();
6000 mandeep.dh 734
      } else {
6031 rajveer 735
        setStatus((RechargeOrderStatus)value);
6000 mandeep.dh 736
      }
737
      break;
738
 
739
    case DEVICE_NUMBER:
740
      if (value == null) {
741
        unsetDeviceNumber();
742
      } else {
743
        setDeviceNumber((String)value);
744
      }
745
      break;
746
 
6031 rajveer 747
    case USER_ID:
6000 mandeep.dh 748
      if (value == null) {
6031 rajveer 749
        unsetUserId();
6000 mandeep.dh 750
      } else {
6031 rajveer 751
        setUserId((Long)value);
6000 mandeep.dh 752
      }
753
      break;
754
 
6031 rajveer 755
    case USER_EMAIL_ID:
6000 mandeep.dh 756
      if (value == null) {
6031 rajveer 757
        unsetUserEmailId();
6000 mandeep.dh 758
      } else {
6031 rajveer 759
        setUserEmailId((String)value);
6000 mandeep.dh 760
      }
761
      break;
762
 
763
    case CREATION_TIMESTAMP:
764
      if (value == null) {
765
        unsetCreationTimestamp();
766
      } else {
767
        setCreationTimestamp((Long)value);
768
      }
769
      break;
770
 
771
    }
772
  }
773
 
774
  public Object getFieldValue(_Fields field) {
775
    switch (field) {
776
    case ID:
6031 rajveer 777
      return Long.valueOf(getId());
6000 mandeep.dh 778
 
6031 rajveer 779
    case DISPLAY_ID:
780
      return getDisplayId();
6000 mandeep.dh 781
 
6031 rajveer 782
    case TOTAL_AMOUNT:
783
      return Long.valueOf(getTotalAmount());
784
 
785
    case WALLET_AMOUNT:
786
      return Long.valueOf(getWalletAmount());
787
 
6000 mandeep.dh 788
    case TRANSACTION_ID:
789
      return Long.valueOf(getTransactionId());
790
 
791
    case INVOICE_NUMBER:
792
      return getInvoiceNumber();
793
 
794
    case ORDER_TYPE:
795
      return getOrderType();
796
 
797
    case OPERATOR_ID:
798
      return Long.valueOf(getOperatorId());
799
 
800
    case RECHARGE_TYPE:
801
      return getRechargeType();
802
 
6031 rajveer 803
    case STATUS:
804
      return getStatus();
6000 mandeep.dh 805
 
806
    case DEVICE_NUMBER:
807
      return getDeviceNumber();
808
 
6031 rajveer 809
    case USER_ID:
810
      return Long.valueOf(getUserId());
6000 mandeep.dh 811
 
6031 rajveer 812
    case USER_EMAIL_ID:
813
      return getUserEmailId();
6000 mandeep.dh 814
 
815
    case CREATION_TIMESTAMP:
816
      return Long.valueOf(getCreationTimestamp());
817
 
818
    }
819
    throw new IllegalStateException();
820
  }
821
 
822
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
823
  public boolean isSet(_Fields field) {
824
    if (field == null) {
825
      throw new IllegalArgumentException();
826
    }
827
 
828
    switch (field) {
829
    case ID:
830
      return isSetId();
6031 rajveer 831
    case DISPLAY_ID:
832
      return isSetDisplayId();
833
    case TOTAL_AMOUNT:
834
      return isSetTotalAmount();
835
    case WALLET_AMOUNT:
836
      return isSetWalletAmount();
6000 mandeep.dh 837
    case TRANSACTION_ID:
838
      return isSetTransactionId();
839
    case INVOICE_NUMBER:
840
      return isSetInvoiceNumber();
841
    case ORDER_TYPE:
842
      return isSetOrderType();
843
    case OPERATOR_ID:
844
      return isSetOperatorId();
845
    case RECHARGE_TYPE:
846
      return isSetRechargeType();
6031 rajveer 847
    case STATUS:
848
      return isSetStatus();
6000 mandeep.dh 849
    case DEVICE_NUMBER:
850
      return isSetDeviceNumber();
6031 rajveer 851
    case USER_ID:
852
      return isSetUserId();
853
    case USER_EMAIL_ID:
854
      return isSetUserEmailId();
6000 mandeep.dh 855
    case CREATION_TIMESTAMP:
856
      return isSetCreationTimestamp();
857
    }
858
    throw new IllegalStateException();
859
  }
860
 
861
  @Override
862
  public boolean equals(Object that) {
863
    if (that == null)
864
      return false;
865
    if (that instanceof RechargeOrder)
866
      return this.equals((RechargeOrder)that);
867
    return false;
868
  }
869
 
870
  public boolean equals(RechargeOrder that) {
871
    if (that == null)
872
      return false;
873
 
6031 rajveer 874
    boolean this_present_id = true;
875
    boolean that_present_id = true;
6000 mandeep.dh 876
    if (this_present_id || that_present_id) {
877
      if (!(this_present_id && that_present_id))
878
        return false;
6031 rajveer 879
      if (this.id != that.id)
6000 mandeep.dh 880
        return false;
881
    }
882
 
6031 rajveer 883
    boolean this_present_displayId = true && this.isSetDisplayId();
884
    boolean that_present_displayId = true && that.isSetDisplayId();
885
    if (this_present_displayId || that_present_displayId) {
886
      if (!(this_present_displayId && that_present_displayId))
6000 mandeep.dh 887
        return false;
6031 rajveer 888
      if (!this.displayId.equals(that.displayId))
6000 mandeep.dh 889
        return false;
890
    }
891
 
6031 rajveer 892
    boolean this_present_totalAmount = true;
893
    boolean that_present_totalAmount = true;
894
    if (this_present_totalAmount || that_present_totalAmount) {
895
      if (!(this_present_totalAmount && that_present_totalAmount))
896
        return false;
897
      if (this.totalAmount != that.totalAmount)
898
        return false;
899
    }
900
 
901
    boolean this_present_walletAmount = true;
902
    boolean that_present_walletAmount = true;
903
    if (this_present_walletAmount || that_present_walletAmount) {
904
      if (!(this_present_walletAmount && that_present_walletAmount))
905
        return false;
906
      if (this.walletAmount != that.walletAmount)
907
        return false;
908
    }
909
 
6000 mandeep.dh 910
    boolean this_present_transactionId = true;
911
    boolean that_present_transactionId = true;
912
    if (this_present_transactionId || that_present_transactionId) {
913
      if (!(this_present_transactionId && that_present_transactionId))
914
        return false;
915
      if (this.transactionId != that.transactionId)
916
        return false;
917
    }
918
 
919
    boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
920
    boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
921
    if (this_present_invoiceNumber || that_present_invoiceNumber) {
922
      if (!(this_present_invoiceNumber && that_present_invoiceNumber))
923
        return false;
924
      if (!this.invoiceNumber.equals(that.invoiceNumber))
925
        return false;
926
    }
927
 
928
    boolean this_present_orderType = true && this.isSetOrderType();
929
    boolean that_present_orderType = true && that.isSetOrderType();
930
    if (this_present_orderType || that_present_orderType) {
931
      if (!(this_present_orderType && that_present_orderType))
932
        return false;
933
      if (!this.orderType.equals(that.orderType))
934
        return false;
935
    }
936
 
937
    boolean this_present_operatorId = true;
938
    boolean that_present_operatorId = true;
939
    if (this_present_operatorId || that_present_operatorId) {
940
      if (!(this_present_operatorId && that_present_operatorId))
941
        return false;
942
      if (this.operatorId != that.operatorId)
943
        return false;
944
    }
945
 
946
    boolean this_present_rechargeType = true && this.isSetRechargeType();
947
    boolean that_present_rechargeType = true && that.isSetRechargeType();
948
    if (this_present_rechargeType || that_present_rechargeType) {
949
      if (!(this_present_rechargeType && that_present_rechargeType))
950
        return false;
951
      if (!this.rechargeType.equals(that.rechargeType))
952
        return false;
953
    }
954
 
6031 rajveer 955
    boolean this_present_status = true && this.isSetStatus();
956
    boolean that_present_status = true && that.isSetStatus();
957
    if (this_present_status || that_present_status) {
958
      if (!(this_present_status && that_present_status))
6000 mandeep.dh 959
        return false;
6031 rajveer 960
      if (!this.status.equals(that.status))
6000 mandeep.dh 961
        return false;
962
    }
963
 
964
    boolean this_present_deviceNumber = true && this.isSetDeviceNumber();
965
    boolean that_present_deviceNumber = true && that.isSetDeviceNumber();
966
    if (this_present_deviceNumber || that_present_deviceNumber) {
967
      if (!(this_present_deviceNumber && that_present_deviceNumber))
968
        return false;
969
      if (!this.deviceNumber.equals(that.deviceNumber))
970
        return false;
971
    }
972
 
6031 rajveer 973
    boolean this_present_userId = true;
974
    boolean that_present_userId = true;
975
    if (this_present_userId || that_present_userId) {
976
      if (!(this_present_userId && that_present_userId))
6000 mandeep.dh 977
        return false;
6031 rajveer 978
      if (this.userId != that.userId)
6000 mandeep.dh 979
        return false;
980
    }
981
 
6031 rajveer 982
    boolean this_present_userEmailId = true && this.isSetUserEmailId();
983
    boolean that_present_userEmailId = true && that.isSetUserEmailId();
984
    if (this_present_userEmailId || that_present_userEmailId) {
985
      if (!(this_present_userEmailId && that_present_userEmailId))
6000 mandeep.dh 986
        return false;
6031 rajveer 987
      if (!this.userEmailId.equals(that.userEmailId))
6000 mandeep.dh 988
        return false;
989
    }
990
 
991
    boolean this_present_creationTimestamp = true;
992
    boolean that_present_creationTimestamp = true;
993
    if (this_present_creationTimestamp || that_present_creationTimestamp) {
994
      if (!(this_present_creationTimestamp && that_present_creationTimestamp))
995
        return false;
996
      if (this.creationTimestamp != that.creationTimestamp)
997
        return false;
998
    }
999
 
1000
    return true;
1001
  }
1002
 
1003
  @Override
1004
  public int hashCode() {
1005
    return 0;
1006
  }
1007
 
1008
  public int compareTo(RechargeOrder other) {
1009
    if (!getClass().equals(other.getClass())) {
1010
      return getClass().getName().compareTo(other.getClass().getName());
1011
    }
1012
 
1013
    int lastComparison = 0;
1014
    RechargeOrder typedOther = (RechargeOrder)other;
1015
 
1016
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
1017
    if (lastComparison != 0) {
1018
      return lastComparison;
1019
    }
1020
    if (isSetId()) {
1021
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
1022
      if (lastComparison != 0) {
1023
        return lastComparison;
1024
      }
1025
    }
6031 rajveer 1026
    lastComparison = Boolean.valueOf(isSetDisplayId()).compareTo(typedOther.isSetDisplayId());
6000 mandeep.dh 1027
    if (lastComparison != 0) {
1028
      return lastComparison;
1029
    }
6031 rajveer 1030
    if (isSetDisplayId()) {
1031
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayId, typedOther.displayId);
6000 mandeep.dh 1032
      if (lastComparison != 0) {
1033
        return lastComparison;
1034
      }
1035
    }
6031 rajveer 1036
    lastComparison = Boolean.valueOf(isSetTotalAmount()).compareTo(typedOther.isSetTotalAmount());
1037
    if (lastComparison != 0) {
1038
      return lastComparison;
1039
    }
1040
    if (isSetTotalAmount()) {
1041
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalAmount, typedOther.totalAmount);
1042
      if (lastComparison != 0) {
1043
        return lastComparison;
1044
      }
1045
    }
1046
    lastComparison = Boolean.valueOf(isSetWalletAmount()).compareTo(typedOther.isSetWalletAmount());
1047
    if (lastComparison != 0) {
1048
      return lastComparison;
1049
    }
1050
    if (isSetWalletAmount()) {
1051
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.walletAmount, typedOther.walletAmount);
1052
      if (lastComparison != 0) {
1053
        return lastComparison;
1054
      }
1055
    }
6000 mandeep.dh 1056
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(typedOther.isSetTransactionId());
1057
    if (lastComparison != 0) {
1058
      return lastComparison;
1059
    }
1060
    if (isSetTransactionId()) {
1061
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, typedOther.transactionId);
1062
      if (lastComparison != 0) {
1063
        return lastComparison;
1064
      }
1065
    }
1066
    lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
1067
    if (lastComparison != 0) {
1068
      return lastComparison;
1069
    }
1070
    if (isSetInvoiceNumber()) {
1071
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
1072
      if (lastComparison != 0) {
1073
        return lastComparison;
1074
      }
1075
    }
1076
    lastComparison = Boolean.valueOf(isSetOrderType()).compareTo(typedOther.isSetOrderType());
1077
    if (lastComparison != 0) {
1078
      return lastComparison;
1079
    }
1080
    if (isSetOrderType()) {
1081
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderType, typedOther.orderType);
1082
      if (lastComparison != 0) {
1083
        return lastComparison;
1084
      }
1085
    }
1086
    lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId());
1087
    if (lastComparison != 0) {
1088
      return lastComparison;
1089
    }
1090
    if (isSetOperatorId()) {
1091
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
1092
      if (lastComparison != 0) {
1093
        return lastComparison;
1094
      }
1095
    }
1096
    lastComparison = Boolean.valueOf(isSetRechargeType()).compareTo(typedOther.isSetRechargeType());
1097
    if (lastComparison != 0) {
1098
      return lastComparison;
1099
    }
1100
    if (isSetRechargeType()) {
1101
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeType, typedOther.rechargeType);
1102
      if (lastComparison != 0) {
1103
        return lastComparison;
1104
      }
1105
    }
6031 rajveer 1106
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
6000 mandeep.dh 1107
    if (lastComparison != 0) {
1108
      return lastComparison;
1109
    }
6031 rajveer 1110
    if (isSetStatus()) {
1111
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
6000 mandeep.dh 1112
      if (lastComparison != 0) {
1113
        return lastComparison;
1114
      }
1115
    }
1116
    lastComparison = Boolean.valueOf(isSetDeviceNumber()).compareTo(typedOther.isSetDeviceNumber());
1117
    if (lastComparison != 0) {
1118
      return lastComparison;
1119
    }
1120
    if (isSetDeviceNumber()) {
1121
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceNumber, typedOther.deviceNumber);
1122
      if (lastComparison != 0) {
1123
        return lastComparison;
1124
      }
1125
    }
6031 rajveer 1126
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
6000 mandeep.dh 1127
    if (lastComparison != 0) {
1128
      return lastComparison;
1129
    }
6031 rajveer 1130
    if (isSetUserId()) {
1131
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
6000 mandeep.dh 1132
      if (lastComparison != 0) {
1133
        return lastComparison;
1134
      }
1135
    }
6031 rajveer 1136
    lastComparison = Boolean.valueOf(isSetUserEmailId()).compareTo(typedOther.isSetUserEmailId());
6000 mandeep.dh 1137
    if (lastComparison != 0) {
1138
      return lastComparison;
1139
    }
6031 rajveer 1140
    if (isSetUserEmailId()) {
1141
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmailId, typedOther.userEmailId);
6000 mandeep.dh 1142
      if (lastComparison != 0) {
1143
        return lastComparison;
1144
      }
1145
    }
1146
    lastComparison = Boolean.valueOf(isSetCreationTimestamp()).compareTo(typedOther.isSetCreationTimestamp());
1147
    if (lastComparison != 0) {
1148
      return lastComparison;
1149
    }
1150
    if (isSetCreationTimestamp()) {
1151
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTimestamp, typedOther.creationTimestamp);
1152
      if (lastComparison != 0) {
1153
        return lastComparison;
1154
      }
1155
    }
1156
    return 0;
1157
  }
1158
 
1159
  public _Fields fieldForId(int fieldId) {
1160
    return _Fields.findByThriftId(fieldId);
1161
  }
1162
 
1163
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1164
    org.apache.thrift.protocol.TField field;
1165
    iprot.readStructBegin();
1166
    while (true)
1167
    {
1168
      field = iprot.readFieldBegin();
1169
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1170
        break;
1171
      }
1172
      switch (field.id) {
1173
        case 1: // ID
6031 rajveer 1174
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1175
            this.id = iprot.readI64();
1176
            setIdIsSet(true);
1177
          } else { 
1178
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1179
          }
1180
          break;
1181
        case 2: // DISPLAY_ID
6000 mandeep.dh 1182
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
6031 rajveer 1183
            this.displayId = iprot.readString();
6000 mandeep.dh 1184
          } else { 
1185
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1186
          }
1187
          break;
6031 rajveer 1188
        case 3: // TOTAL_AMOUNT
6000 mandeep.dh 1189
          if (field.type == org.apache.thrift.protocol.TType.I64) {
6031 rajveer 1190
            this.totalAmount = iprot.readI64();
1191
            setTotalAmountIsSet(true);
6000 mandeep.dh 1192
          } else { 
1193
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1194
          }
1195
          break;
6031 rajveer 1196
        case 4: // WALLET_AMOUNT
6000 mandeep.dh 1197
          if (field.type == org.apache.thrift.protocol.TType.I64) {
6031 rajveer 1198
            this.walletAmount = iprot.readI64();
1199
            setWalletAmountIsSet(true);
1200
          } else { 
1201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1202
          }
1203
          break;
1204
        case 5: // TRANSACTION_ID
1205
          if (field.type == org.apache.thrift.protocol.TType.I64) {
6000 mandeep.dh 1206
            this.transactionId = iprot.readI64();
1207
            setTransactionIdIsSet(true);
1208
          } else { 
1209
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1210
          }
1211
          break;
6031 rajveer 1212
        case 6: // INVOICE_NUMBER
6000 mandeep.dh 1213
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1214
            this.invoiceNumber = iprot.readString();
1215
          } else { 
1216
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1217
          }
1218
          break;
6031 rajveer 1219
        case 7: // ORDER_TYPE
6000 mandeep.dh 1220
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1221
            this.orderType = OrderType.findByValue(iprot.readI32());
1222
          } else { 
1223
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1224
          }
1225
          break;
6031 rajveer 1226
        case 8: // OPERATOR_ID
6000 mandeep.dh 1227
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1228
            this.operatorId = iprot.readI64();
1229
            setOperatorIdIsSet(true);
1230
          } else { 
1231
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1232
          }
1233
          break;
6031 rajveer 1234
        case 9: // RECHARGE_TYPE
6000 mandeep.dh 1235
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1236
            this.rechargeType = RechargeType.findByValue(iprot.readI32());
1237
          } else { 
1238
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1239
          }
1240
          break;
6031 rajveer 1241
        case 10: // STATUS
6000 mandeep.dh 1242
          if (field.type == org.apache.thrift.protocol.TType.I32) {
6031 rajveer 1243
            this.status = RechargeOrderStatus.findByValue(iprot.readI32());
6000 mandeep.dh 1244
          } else { 
1245
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1246
          }
1247
          break;
6031 rajveer 1248
        case 11: // DEVICE_NUMBER
6000 mandeep.dh 1249
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1250
            this.deviceNumber = iprot.readString();
1251
          } else { 
1252
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1253
          }
1254
          break;
6031 rajveer 1255
        case 12: // USER_ID
6000 mandeep.dh 1256
          if (field.type == org.apache.thrift.protocol.TType.I64) {
6031 rajveer 1257
            this.userId = iprot.readI64();
1258
            setUserIdIsSet(true);
6000 mandeep.dh 1259
          } else { 
1260
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1261
          }
1262
          break;
6031 rajveer 1263
        case 13: // USER_EMAIL_ID
1264
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1265
            this.userEmailId = iprot.readString();
6000 mandeep.dh 1266
          } else { 
1267
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1268
          }
1269
          break;
6031 rajveer 1270
        case 14: // CREATION_TIMESTAMP
6000 mandeep.dh 1271
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1272
            this.creationTimestamp = iprot.readI64();
1273
            setCreationTimestampIsSet(true);
1274
          } else { 
1275
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1276
          }
1277
          break;
1278
        default:
1279
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1280
      }
1281
      iprot.readFieldEnd();
1282
    }
1283
    iprot.readStructEnd();
1284
    validate();
1285
  }
1286
 
1287
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1288
    validate();
1289
 
1290
    oprot.writeStructBegin(STRUCT_DESC);
6031 rajveer 1291
    oprot.writeFieldBegin(ID_FIELD_DESC);
1292
    oprot.writeI64(this.id);
1293
    oprot.writeFieldEnd();
1294
    if (this.displayId != null) {
1295
      oprot.writeFieldBegin(DISPLAY_ID_FIELD_DESC);
1296
      oprot.writeString(this.displayId);
6000 mandeep.dh 1297
      oprot.writeFieldEnd();
1298
    }
6031 rajveer 1299
    oprot.writeFieldBegin(TOTAL_AMOUNT_FIELD_DESC);
1300
    oprot.writeI64(this.totalAmount);
6000 mandeep.dh 1301
    oprot.writeFieldEnd();
6031 rajveer 1302
    oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);
1303
    oprot.writeI64(this.walletAmount);
1304
    oprot.writeFieldEnd();
6000 mandeep.dh 1305
    oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
1306
    oprot.writeI64(this.transactionId);
1307
    oprot.writeFieldEnd();
1308
    if (this.invoiceNumber != null) {
1309
      oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
1310
      oprot.writeString(this.invoiceNumber);
1311
      oprot.writeFieldEnd();
1312
    }
1313
    if (this.orderType != null) {
1314
      oprot.writeFieldBegin(ORDER_TYPE_FIELD_DESC);
1315
      oprot.writeI32(this.orderType.getValue());
1316
      oprot.writeFieldEnd();
1317
    }
1318
    oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
1319
    oprot.writeI64(this.operatorId);
1320
    oprot.writeFieldEnd();
1321
    if (this.rechargeType != null) {
1322
      oprot.writeFieldBegin(RECHARGE_TYPE_FIELD_DESC);
1323
      oprot.writeI32(this.rechargeType.getValue());
1324
      oprot.writeFieldEnd();
1325
    }
6031 rajveer 1326
    if (this.status != null) {
1327
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1328
      oprot.writeI32(this.status.getValue());
6000 mandeep.dh 1329
      oprot.writeFieldEnd();
1330
    }
1331
    if (this.deviceNumber != null) {
1332
      oprot.writeFieldBegin(DEVICE_NUMBER_FIELD_DESC);
1333
      oprot.writeString(this.deviceNumber);
1334
      oprot.writeFieldEnd();
1335
    }
6031 rajveer 1336
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
1337
    oprot.writeI64(this.userId);
6000 mandeep.dh 1338
    oprot.writeFieldEnd();
6031 rajveer 1339
    if (this.userEmailId != null) {
1340
      oprot.writeFieldBegin(USER_EMAIL_ID_FIELD_DESC);
1341
      oprot.writeString(this.userEmailId);
1342
      oprot.writeFieldEnd();
1343
    }
6000 mandeep.dh 1344
    oprot.writeFieldBegin(CREATION_TIMESTAMP_FIELD_DESC);
1345
    oprot.writeI64(this.creationTimestamp);
1346
    oprot.writeFieldEnd();
1347
    oprot.writeFieldStop();
1348
    oprot.writeStructEnd();
1349
  }
1350
 
1351
  @Override
1352
  public String toString() {
1353
    StringBuilder sb = new StringBuilder("RechargeOrder(");
1354
    boolean first = true;
1355
 
1356
    sb.append("id:");
6031 rajveer 1357
    sb.append(this.id);
1358
    first = false;
1359
    if (!first) sb.append(", ");
1360
    sb.append("displayId:");
1361
    if (this.displayId == null) {
6000 mandeep.dh 1362
      sb.append("null");
1363
    } else {
6031 rajveer 1364
      sb.append(this.displayId);
6000 mandeep.dh 1365
    }
1366
    first = false;
1367
    if (!first) sb.append(", ");
6031 rajveer 1368
    sb.append("totalAmount:");
1369
    sb.append(this.totalAmount);
6000 mandeep.dh 1370
    first = false;
1371
    if (!first) sb.append(", ");
6031 rajveer 1372
    sb.append("walletAmount:");
1373
    sb.append(this.walletAmount);
1374
    first = false;
1375
    if (!first) sb.append(", ");
6000 mandeep.dh 1376
    sb.append("transactionId:");
1377
    sb.append(this.transactionId);
1378
    first = false;
1379
    if (!first) sb.append(", ");
1380
    sb.append("invoiceNumber:");
1381
    if (this.invoiceNumber == null) {
1382
      sb.append("null");
1383
    } else {
1384
      sb.append(this.invoiceNumber);
1385
    }
1386
    first = false;
1387
    if (!first) sb.append(", ");
1388
    sb.append("orderType:");
1389
    if (this.orderType == null) {
1390
      sb.append("null");
1391
    } else {
1392
      sb.append(this.orderType);
1393
    }
1394
    first = false;
1395
    if (!first) sb.append(", ");
1396
    sb.append("operatorId:");
1397
    sb.append(this.operatorId);
1398
    first = false;
1399
    if (!first) sb.append(", ");
1400
    sb.append("rechargeType:");
1401
    if (this.rechargeType == null) {
1402
      sb.append("null");
1403
    } else {
1404
      sb.append(this.rechargeType);
1405
    }
1406
    first = false;
1407
    if (!first) sb.append(", ");
6031 rajveer 1408
    sb.append("status:");
1409
    if (this.status == null) {
6000 mandeep.dh 1410
      sb.append("null");
1411
    } else {
6031 rajveer 1412
      sb.append(this.status);
6000 mandeep.dh 1413
    }
1414
    first = false;
1415
    if (!first) sb.append(", ");
1416
    sb.append("deviceNumber:");
1417
    if (this.deviceNumber == null) {
1418
      sb.append("null");
1419
    } else {
1420
      sb.append(this.deviceNumber);
1421
    }
1422
    first = false;
1423
    if (!first) sb.append(", ");
6031 rajveer 1424
    sb.append("userId:");
1425
    sb.append(this.userId);
6000 mandeep.dh 1426
    first = false;
1427
    if (!first) sb.append(", ");
6031 rajveer 1428
    sb.append("userEmailId:");
1429
    if (this.userEmailId == null) {
1430
      sb.append("null");
1431
    } else {
1432
      sb.append(this.userEmailId);
1433
    }
6000 mandeep.dh 1434
    first = false;
1435
    if (!first) sb.append(", ");
1436
    sb.append("creationTimestamp:");
1437
    sb.append(this.creationTimestamp);
1438
    first = false;
1439
    sb.append(")");
1440
    return sb.toString();
1441
  }
1442
 
1443
  public void validate() throws org.apache.thrift.TException {
1444
    // check for required fields
1445
  }
1446
 
1447
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1448
    try {
1449
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1450
    } catch (org.apache.thrift.TException te) {
1451
      throw new java.io.IOException(te);
1452
    }
1453
  }
1454
 
1455
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1456
    try {
1457
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1458
      __isset_bit_vector = new BitSet(1);
1459
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1460
    } catch (org.apache.thrift.TException te) {
1461
      throw new java.io.IOException(te);
1462
    }
1463
  }
1464
 
1465
}
1466