Subversion Repositories SmartDukaan

Rev

Rev 18530 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18530 manish.sha 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.user;
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 CounterOnlineInfo implements org.apache.thrift.TBase<CounterOnlineInfo, CounterOnlineInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CounterOnlineInfo");
25
 
26
  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField TIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("tinNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField CST_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("cstNumber", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField DEALER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerName", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField DEALER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerAddress", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField PAN_FIELD_DESC = new org.apache.thrift.protocol.TField("pan", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField REGISTRATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("registrationDate", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField REGISTRATION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("registrationStatus", org.apache.thrift.protocol.TType.BOOL, (short)9);
35
  private static final org.apache.thrift.protocol.TField VALIDATED_TILL_FIELD_DESC = new org.apache.thrift.protocol.TField("validatedTill", org.apache.thrift.protocol.TType.I64, (short)10);
18634 manish.sha 36
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)11);
18530 manish.sha 37
 
38
  private long counterId; // required
39
  private String tinNumber; // required
40
  private String cstNumber; // required
41
  private String dealerName; // required
42
  private String dealerAddress; // required
43
  private String state; // required
44
  private String pan; // required
45
  private long registrationDate; // required
46
  private boolean registrationStatus; // required
47
  private long validatedTill; // required
18634 manish.sha 48
  private long created; // required
18530 manish.sha 49
 
50
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
51
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
52
    COUNTER_ID((short)1, "counterId"),
53
    TIN_NUMBER((short)2, "tinNumber"),
54
    CST_NUMBER((short)3, "cstNumber"),
55
    DEALER_NAME((short)4, "dealerName"),
56
    DEALER_ADDRESS((short)5, "dealerAddress"),
57
    STATE((short)6, "state"),
58
    PAN((short)7, "pan"),
59
    REGISTRATION_DATE((short)8, "registrationDate"),
60
    REGISTRATION_STATUS((short)9, "registrationStatus"),
18634 manish.sha 61
    VALIDATED_TILL((short)10, "validatedTill"),
62
    CREATED((short)11, "created");
18530 manish.sha 63
 
64
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
65
 
66
    static {
67
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
68
        byName.put(field.getFieldName(), field);
69
      }
70
    }
71
 
72
    /**
73
     * Find the _Fields constant that matches fieldId, or null if its not found.
74
     */
75
    public static _Fields findByThriftId(int fieldId) {
76
      switch(fieldId) {
77
        case 1: // COUNTER_ID
78
          return COUNTER_ID;
79
        case 2: // TIN_NUMBER
80
          return TIN_NUMBER;
81
        case 3: // CST_NUMBER
82
          return CST_NUMBER;
83
        case 4: // DEALER_NAME
84
          return DEALER_NAME;
85
        case 5: // DEALER_ADDRESS
86
          return DEALER_ADDRESS;
87
        case 6: // STATE
88
          return STATE;
89
        case 7: // PAN
90
          return PAN;
91
        case 8: // REGISTRATION_DATE
92
          return REGISTRATION_DATE;
93
        case 9: // REGISTRATION_STATUS
94
          return REGISTRATION_STATUS;
95
        case 10: // VALIDATED_TILL
96
          return VALIDATED_TILL;
18634 manish.sha 97
        case 11: // CREATED
98
          return CREATED;
18530 manish.sha 99
        default:
100
          return null;
101
      }
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches fieldId, throwing an exception
106
     * if it is not found.
107
     */
108
    public static _Fields findByThriftIdOrThrow(int fieldId) {
109
      _Fields fields = findByThriftId(fieldId);
110
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
111
      return fields;
112
    }
113
 
114
    /**
115
     * Find the _Fields constant that matches name, or null if its not found.
116
     */
117
    public static _Fields findByName(String name) {
118
      return byName.get(name);
119
    }
120
 
121
    private final short _thriftId;
122
    private final String _fieldName;
123
 
124
    _Fields(short thriftId, String fieldName) {
125
      _thriftId = thriftId;
126
      _fieldName = fieldName;
127
    }
128
 
129
    public short getThriftFieldId() {
130
      return _thriftId;
131
    }
132
 
133
    public String getFieldName() {
134
      return _fieldName;
135
    }
136
  }
137
 
138
  // isset id assignments
139
  private static final int __COUNTERID_ISSET_ID = 0;
140
  private static final int __REGISTRATIONDATE_ISSET_ID = 1;
141
  private static final int __REGISTRATIONSTATUS_ISSET_ID = 2;
142
  private static final int __VALIDATEDTILL_ISSET_ID = 3;
18634 manish.sha 143
  private static final int __CREATED_ISSET_ID = 4;
144
  private BitSet __isset_bit_vector = new BitSet(5);
18530 manish.sha 145
 
146
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
147
  static {
148
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
149
    tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
151
    tmpMap.put(_Fields.TIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("tinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
153
    tmpMap.put(_Fields.CST_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cstNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155
    tmpMap.put(_Fields.DEALER_NAME, new org.apache.thrift.meta_data.FieldMetaData("dealerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
157
    tmpMap.put(_Fields.DEALER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("dealerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
159
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
161
    tmpMap.put(_Fields.PAN, new org.apache.thrift.meta_data.FieldMetaData("pan", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
163
    tmpMap.put(_Fields.REGISTRATION_DATE, new org.apache.thrift.meta_data.FieldMetaData("registrationDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
165
    tmpMap.put(_Fields.REGISTRATION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("registrationStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
167
    tmpMap.put(_Fields.VALIDATED_TILL, new org.apache.thrift.meta_data.FieldMetaData("validatedTill", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18634 manish.sha 169
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18530 manish.sha 171
    metaDataMap = Collections.unmodifiableMap(tmpMap);
172
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CounterOnlineInfo.class, metaDataMap);
173
  }
174
 
175
  public CounterOnlineInfo() {
176
  }
177
 
178
  public CounterOnlineInfo(
179
    long counterId,
180
    String tinNumber,
181
    String cstNumber,
182
    String dealerName,
183
    String dealerAddress,
184
    String state,
185
    String pan,
186
    long registrationDate,
187
    boolean registrationStatus,
18634 manish.sha 188
    long validatedTill,
189
    long created)
18530 manish.sha 190
  {
191
    this();
192
    this.counterId = counterId;
193
    setCounterIdIsSet(true);
194
    this.tinNumber = tinNumber;
195
    this.cstNumber = cstNumber;
196
    this.dealerName = dealerName;
197
    this.dealerAddress = dealerAddress;
198
    this.state = state;
199
    this.pan = pan;
200
    this.registrationDate = registrationDate;
201
    setRegistrationDateIsSet(true);
202
    this.registrationStatus = registrationStatus;
203
    setRegistrationStatusIsSet(true);
204
    this.validatedTill = validatedTill;
205
    setValidatedTillIsSet(true);
18634 manish.sha 206
    this.created = created;
207
    setCreatedIsSet(true);
18530 manish.sha 208
  }
209
 
210
  /**
211
   * Performs a deep copy on <i>other</i>.
212
   */
213
  public CounterOnlineInfo(CounterOnlineInfo other) {
214
    __isset_bit_vector.clear();
215
    __isset_bit_vector.or(other.__isset_bit_vector);
216
    this.counterId = other.counterId;
217
    if (other.isSetTinNumber()) {
218
      this.tinNumber = other.tinNumber;
219
    }
220
    if (other.isSetCstNumber()) {
221
      this.cstNumber = other.cstNumber;
222
    }
223
    if (other.isSetDealerName()) {
224
      this.dealerName = other.dealerName;
225
    }
226
    if (other.isSetDealerAddress()) {
227
      this.dealerAddress = other.dealerAddress;
228
    }
229
    if (other.isSetState()) {
230
      this.state = other.state;
231
    }
232
    if (other.isSetPan()) {
233
      this.pan = other.pan;
234
    }
235
    this.registrationDate = other.registrationDate;
236
    this.registrationStatus = other.registrationStatus;
237
    this.validatedTill = other.validatedTill;
18634 manish.sha 238
    this.created = other.created;
18530 manish.sha 239
  }
240
 
241
  public CounterOnlineInfo deepCopy() {
242
    return new CounterOnlineInfo(this);
243
  }
244
 
245
  @Override
246
  public void clear() {
247
    setCounterIdIsSet(false);
248
    this.counterId = 0;
249
    this.tinNumber = null;
250
    this.cstNumber = null;
251
    this.dealerName = null;
252
    this.dealerAddress = null;
253
    this.state = null;
254
    this.pan = null;
255
    setRegistrationDateIsSet(false);
256
    this.registrationDate = 0;
257
    setRegistrationStatusIsSet(false);
258
    this.registrationStatus = false;
259
    setValidatedTillIsSet(false);
260
    this.validatedTill = 0;
18634 manish.sha 261
    setCreatedIsSet(false);
262
    this.created = 0;
18530 manish.sha 263
  }
264
 
265
  public long getCounterId() {
266
    return this.counterId;
267
  }
268
 
269
  public void setCounterId(long counterId) {
270
    this.counterId = counterId;
271
    setCounterIdIsSet(true);
272
  }
273
 
274
  public void unsetCounterId() {
275
    __isset_bit_vector.clear(__COUNTERID_ISSET_ID);
276
  }
277
 
278
  /** Returns true if field counterId is set (has been assigned a value) and false otherwise */
279
  public boolean isSetCounterId() {
280
    return __isset_bit_vector.get(__COUNTERID_ISSET_ID);
281
  }
282
 
283
  public void setCounterIdIsSet(boolean value) {
284
    __isset_bit_vector.set(__COUNTERID_ISSET_ID, value);
285
  }
286
 
287
  public String getTinNumber() {
288
    return this.tinNumber;
289
  }
290
 
291
  public void setTinNumber(String tinNumber) {
292
    this.tinNumber = tinNumber;
293
  }
294
 
295
  public void unsetTinNumber() {
296
    this.tinNumber = null;
297
  }
298
 
299
  /** Returns true if field tinNumber is set (has been assigned a value) and false otherwise */
300
  public boolean isSetTinNumber() {
301
    return this.tinNumber != null;
302
  }
303
 
304
  public void setTinNumberIsSet(boolean value) {
305
    if (!value) {
306
      this.tinNumber = null;
307
    }
308
  }
309
 
310
  public String getCstNumber() {
311
    return this.cstNumber;
312
  }
313
 
314
  public void setCstNumber(String cstNumber) {
315
    this.cstNumber = cstNumber;
316
  }
317
 
318
  public void unsetCstNumber() {
319
    this.cstNumber = null;
320
  }
321
 
322
  /** Returns true if field cstNumber is set (has been assigned a value) and false otherwise */
323
  public boolean isSetCstNumber() {
324
    return this.cstNumber != null;
325
  }
326
 
327
  public void setCstNumberIsSet(boolean value) {
328
    if (!value) {
329
      this.cstNumber = null;
330
    }
331
  }
332
 
333
  public String getDealerName() {
334
    return this.dealerName;
335
  }
336
 
337
  public void setDealerName(String dealerName) {
338
    this.dealerName = dealerName;
339
  }
340
 
341
  public void unsetDealerName() {
342
    this.dealerName = null;
343
  }
344
 
345
  /** Returns true if field dealerName is set (has been assigned a value) and false otherwise */
346
  public boolean isSetDealerName() {
347
    return this.dealerName != null;
348
  }
349
 
350
  public void setDealerNameIsSet(boolean value) {
351
    if (!value) {
352
      this.dealerName = null;
353
    }
354
  }
355
 
356
  public String getDealerAddress() {
357
    return this.dealerAddress;
358
  }
359
 
360
  public void setDealerAddress(String dealerAddress) {
361
    this.dealerAddress = dealerAddress;
362
  }
363
 
364
  public void unsetDealerAddress() {
365
    this.dealerAddress = null;
366
  }
367
 
368
  /** Returns true if field dealerAddress is set (has been assigned a value) and false otherwise */
369
  public boolean isSetDealerAddress() {
370
    return this.dealerAddress != null;
371
  }
372
 
373
  public void setDealerAddressIsSet(boolean value) {
374
    if (!value) {
375
      this.dealerAddress = null;
376
    }
377
  }
378
 
379
  public String getState() {
380
    return this.state;
381
  }
382
 
383
  public void setState(String state) {
384
    this.state = state;
385
  }
386
 
387
  public void unsetState() {
388
    this.state = null;
389
  }
390
 
391
  /** Returns true if field state is set (has been assigned a value) and false otherwise */
392
  public boolean isSetState() {
393
    return this.state != null;
394
  }
395
 
396
  public void setStateIsSet(boolean value) {
397
    if (!value) {
398
      this.state = null;
399
    }
400
  }
401
 
402
  public String getPan() {
403
    return this.pan;
404
  }
405
 
406
  public void setPan(String pan) {
407
    this.pan = pan;
408
  }
409
 
410
  public void unsetPan() {
411
    this.pan = null;
412
  }
413
 
414
  /** Returns true if field pan is set (has been assigned a value) and false otherwise */
415
  public boolean isSetPan() {
416
    return this.pan != null;
417
  }
418
 
419
  public void setPanIsSet(boolean value) {
420
    if (!value) {
421
      this.pan = null;
422
    }
423
  }
424
 
425
  public long getRegistrationDate() {
426
    return this.registrationDate;
427
  }
428
 
429
  public void setRegistrationDate(long registrationDate) {
430
    this.registrationDate = registrationDate;
431
    setRegistrationDateIsSet(true);
432
  }
433
 
434
  public void unsetRegistrationDate() {
435
    __isset_bit_vector.clear(__REGISTRATIONDATE_ISSET_ID);
436
  }
437
 
438
  /** Returns true if field registrationDate is set (has been assigned a value) and false otherwise */
439
  public boolean isSetRegistrationDate() {
440
    return __isset_bit_vector.get(__REGISTRATIONDATE_ISSET_ID);
441
  }
442
 
443
  public void setRegistrationDateIsSet(boolean value) {
444
    __isset_bit_vector.set(__REGISTRATIONDATE_ISSET_ID, value);
445
  }
446
 
447
  public boolean isRegistrationStatus() {
448
    return this.registrationStatus;
449
  }
450
 
451
  public void setRegistrationStatus(boolean registrationStatus) {
452
    this.registrationStatus = registrationStatus;
453
    setRegistrationStatusIsSet(true);
454
  }
455
 
456
  public void unsetRegistrationStatus() {
457
    __isset_bit_vector.clear(__REGISTRATIONSTATUS_ISSET_ID);
458
  }
459
 
460
  /** Returns true if field registrationStatus is set (has been assigned a value) and false otherwise */
461
  public boolean isSetRegistrationStatus() {
462
    return __isset_bit_vector.get(__REGISTRATIONSTATUS_ISSET_ID);
463
  }
464
 
465
  public void setRegistrationStatusIsSet(boolean value) {
466
    __isset_bit_vector.set(__REGISTRATIONSTATUS_ISSET_ID, value);
467
  }
468
 
469
  public long getValidatedTill() {
470
    return this.validatedTill;
471
  }
472
 
473
  public void setValidatedTill(long validatedTill) {
474
    this.validatedTill = validatedTill;
475
    setValidatedTillIsSet(true);
476
  }
477
 
478
  public void unsetValidatedTill() {
479
    __isset_bit_vector.clear(__VALIDATEDTILL_ISSET_ID);
480
  }
481
 
482
  /** Returns true if field validatedTill is set (has been assigned a value) and false otherwise */
483
  public boolean isSetValidatedTill() {
484
    return __isset_bit_vector.get(__VALIDATEDTILL_ISSET_ID);
485
  }
486
 
487
  public void setValidatedTillIsSet(boolean value) {
488
    __isset_bit_vector.set(__VALIDATEDTILL_ISSET_ID, value);
489
  }
490
 
18634 manish.sha 491
  public long getCreated() {
492
    return this.created;
493
  }
494
 
495
  public void setCreated(long created) {
496
    this.created = created;
497
    setCreatedIsSet(true);
498
  }
499
 
500
  public void unsetCreated() {
501
    __isset_bit_vector.clear(__CREATED_ISSET_ID);
502
  }
503
 
504
  /** Returns true if field created is set (has been assigned a value) and false otherwise */
505
  public boolean isSetCreated() {
506
    return __isset_bit_vector.get(__CREATED_ISSET_ID);
507
  }
508
 
509
  public void setCreatedIsSet(boolean value) {
510
    __isset_bit_vector.set(__CREATED_ISSET_ID, value);
511
  }
512
 
18530 manish.sha 513
  public void setFieldValue(_Fields field, Object value) {
514
    switch (field) {
515
    case COUNTER_ID:
516
      if (value == null) {
517
        unsetCounterId();
518
      } else {
519
        setCounterId((Long)value);
520
      }
521
      break;
522
 
523
    case TIN_NUMBER:
524
      if (value == null) {
525
        unsetTinNumber();
526
      } else {
527
        setTinNumber((String)value);
528
      }
529
      break;
530
 
531
    case CST_NUMBER:
532
      if (value == null) {
533
        unsetCstNumber();
534
      } else {
535
        setCstNumber((String)value);
536
      }
537
      break;
538
 
539
    case DEALER_NAME:
540
      if (value == null) {
541
        unsetDealerName();
542
      } else {
543
        setDealerName((String)value);
544
      }
545
      break;
546
 
547
    case DEALER_ADDRESS:
548
      if (value == null) {
549
        unsetDealerAddress();
550
      } else {
551
        setDealerAddress((String)value);
552
      }
553
      break;
554
 
555
    case STATE:
556
      if (value == null) {
557
        unsetState();
558
      } else {
559
        setState((String)value);
560
      }
561
      break;
562
 
563
    case PAN:
564
      if (value == null) {
565
        unsetPan();
566
      } else {
567
        setPan((String)value);
568
      }
569
      break;
570
 
571
    case REGISTRATION_DATE:
572
      if (value == null) {
573
        unsetRegistrationDate();
574
      } else {
575
        setRegistrationDate((Long)value);
576
      }
577
      break;
578
 
579
    case REGISTRATION_STATUS:
580
      if (value == null) {
581
        unsetRegistrationStatus();
582
      } else {
583
        setRegistrationStatus((Boolean)value);
584
      }
585
      break;
586
 
587
    case VALIDATED_TILL:
588
      if (value == null) {
589
        unsetValidatedTill();
590
      } else {
591
        setValidatedTill((Long)value);
592
      }
593
      break;
594
 
18634 manish.sha 595
    case CREATED:
596
      if (value == null) {
597
        unsetCreated();
598
      } else {
599
        setCreated((Long)value);
600
      }
601
      break;
602
 
18530 manish.sha 603
    }
604
  }
605
 
606
  public Object getFieldValue(_Fields field) {
607
    switch (field) {
608
    case COUNTER_ID:
609
      return Long.valueOf(getCounterId());
610
 
611
    case TIN_NUMBER:
612
      return getTinNumber();
613
 
614
    case CST_NUMBER:
615
      return getCstNumber();
616
 
617
    case DEALER_NAME:
618
      return getDealerName();
619
 
620
    case DEALER_ADDRESS:
621
      return getDealerAddress();
622
 
623
    case STATE:
624
      return getState();
625
 
626
    case PAN:
627
      return getPan();
628
 
629
    case REGISTRATION_DATE:
630
      return Long.valueOf(getRegistrationDate());
631
 
632
    case REGISTRATION_STATUS:
633
      return Boolean.valueOf(isRegistrationStatus());
634
 
635
    case VALIDATED_TILL:
636
      return Long.valueOf(getValidatedTill());
637
 
18634 manish.sha 638
    case CREATED:
639
      return Long.valueOf(getCreated());
640
 
18530 manish.sha 641
    }
642
    throw new IllegalStateException();
643
  }
644
 
645
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
646
  public boolean isSet(_Fields field) {
647
    if (field == null) {
648
      throw new IllegalArgumentException();
649
    }
650
 
651
    switch (field) {
652
    case COUNTER_ID:
653
      return isSetCounterId();
654
    case TIN_NUMBER:
655
      return isSetTinNumber();
656
    case CST_NUMBER:
657
      return isSetCstNumber();
658
    case DEALER_NAME:
659
      return isSetDealerName();
660
    case DEALER_ADDRESS:
661
      return isSetDealerAddress();
662
    case STATE:
663
      return isSetState();
664
    case PAN:
665
      return isSetPan();
666
    case REGISTRATION_DATE:
667
      return isSetRegistrationDate();
668
    case REGISTRATION_STATUS:
669
      return isSetRegistrationStatus();
670
    case VALIDATED_TILL:
671
      return isSetValidatedTill();
18634 manish.sha 672
    case CREATED:
673
      return isSetCreated();
18530 manish.sha 674
    }
675
    throw new IllegalStateException();
676
  }
677
 
678
  @Override
679
  public boolean equals(Object that) {
680
    if (that == null)
681
      return false;
682
    if (that instanceof CounterOnlineInfo)
683
      return this.equals((CounterOnlineInfo)that);
684
    return false;
685
  }
686
 
687
  public boolean equals(CounterOnlineInfo that) {
688
    if (that == null)
689
      return false;
690
 
691
    boolean this_present_counterId = true;
692
    boolean that_present_counterId = true;
693
    if (this_present_counterId || that_present_counterId) {
694
      if (!(this_present_counterId && that_present_counterId))
695
        return false;
696
      if (this.counterId != that.counterId)
697
        return false;
698
    }
699
 
700
    boolean this_present_tinNumber = true && this.isSetTinNumber();
701
    boolean that_present_tinNumber = true && that.isSetTinNumber();
702
    if (this_present_tinNumber || that_present_tinNumber) {
703
      if (!(this_present_tinNumber && that_present_tinNumber))
704
        return false;
705
      if (!this.tinNumber.equals(that.tinNumber))
706
        return false;
707
    }
708
 
709
    boolean this_present_cstNumber = true && this.isSetCstNumber();
710
    boolean that_present_cstNumber = true && that.isSetCstNumber();
711
    if (this_present_cstNumber || that_present_cstNumber) {
712
      if (!(this_present_cstNumber && that_present_cstNumber))
713
        return false;
714
      if (!this.cstNumber.equals(that.cstNumber))
715
        return false;
716
    }
717
 
718
    boolean this_present_dealerName = true && this.isSetDealerName();
719
    boolean that_present_dealerName = true && that.isSetDealerName();
720
    if (this_present_dealerName || that_present_dealerName) {
721
      if (!(this_present_dealerName && that_present_dealerName))
722
        return false;
723
      if (!this.dealerName.equals(that.dealerName))
724
        return false;
725
    }
726
 
727
    boolean this_present_dealerAddress = true && this.isSetDealerAddress();
728
    boolean that_present_dealerAddress = true && that.isSetDealerAddress();
729
    if (this_present_dealerAddress || that_present_dealerAddress) {
730
      if (!(this_present_dealerAddress && that_present_dealerAddress))
731
        return false;
732
      if (!this.dealerAddress.equals(that.dealerAddress))
733
        return false;
734
    }
735
 
736
    boolean this_present_state = true && this.isSetState();
737
    boolean that_present_state = true && that.isSetState();
738
    if (this_present_state || that_present_state) {
739
      if (!(this_present_state && that_present_state))
740
        return false;
741
      if (!this.state.equals(that.state))
742
        return false;
743
    }
744
 
745
    boolean this_present_pan = true && this.isSetPan();
746
    boolean that_present_pan = true && that.isSetPan();
747
    if (this_present_pan || that_present_pan) {
748
      if (!(this_present_pan && that_present_pan))
749
        return false;
750
      if (!this.pan.equals(that.pan))
751
        return false;
752
    }
753
 
754
    boolean this_present_registrationDate = true;
755
    boolean that_present_registrationDate = true;
756
    if (this_present_registrationDate || that_present_registrationDate) {
757
      if (!(this_present_registrationDate && that_present_registrationDate))
758
        return false;
759
      if (this.registrationDate != that.registrationDate)
760
        return false;
761
    }
762
 
763
    boolean this_present_registrationStatus = true;
764
    boolean that_present_registrationStatus = true;
765
    if (this_present_registrationStatus || that_present_registrationStatus) {
766
      if (!(this_present_registrationStatus && that_present_registrationStatus))
767
        return false;
768
      if (this.registrationStatus != that.registrationStatus)
769
        return false;
770
    }
771
 
772
    boolean this_present_validatedTill = true;
773
    boolean that_present_validatedTill = true;
774
    if (this_present_validatedTill || that_present_validatedTill) {
775
      if (!(this_present_validatedTill && that_present_validatedTill))
776
        return false;
777
      if (this.validatedTill != that.validatedTill)
778
        return false;
779
    }
780
 
18634 manish.sha 781
    boolean this_present_created = true;
782
    boolean that_present_created = true;
783
    if (this_present_created || that_present_created) {
784
      if (!(this_present_created && that_present_created))
785
        return false;
786
      if (this.created != that.created)
787
        return false;
788
    }
789
 
18530 manish.sha 790
    return true;
791
  }
792
 
793
  @Override
794
  public int hashCode() {
795
    return 0;
796
  }
797
 
798
  public int compareTo(CounterOnlineInfo other) {
799
    if (!getClass().equals(other.getClass())) {
800
      return getClass().getName().compareTo(other.getClass().getName());
801
    }
802
 
803
    int lastComparison = 0;
804
    CounterOnlineInfo typedOther = (CounterOnlineInfo)other;
805
 
806
    lastComparison = Boolean.valueOf(isSetCounterId()).compareTo(typedOther.isSetCounterId());
807
    if (lastComparison != 0) {
808
      return lastComparison;
809
    }
810
    if (isSetCounterId()) {
811
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counterId, typedOther.counterId);
812
      if (lastComparison != 0) {
813
        return lastComparison;
814
      }
815
    }
816
    lastComparison = Boolean.valueOf(isSetTinNumber()).compareTo(typedOther.isSetTinNumber());
817
    if (lastComparison != 0) {
818
      return lastComparison;
819
    }
820
    if (isSetTinNumber()) {
821
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
822
      if (lastComparison != 0) {
823
        return lastComparison;
824
      }
825
    }
826
    lastComparison = Boolean.valueOf(isSetCstNumber()).compareTo(typedOther.isSetCstNumber());
827
    if (lastComparison != 0) {
828
      return lastComparison;
829
    }
830
    if (isSetCstNumber()) {
831
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cstNumber, typedOther.cstNumber);
832
      if (lastComparison != 0) {
833
        return lastComparison;
834
      }
835
    }
836
    lastComparison = Boolean.valueOf(isSetDealerName()).compareTo(typedOther.isSetDealerName());
837
    if (lastComparison != 0) {
838
      return lastComparison;
839
    }
840
    if (isSetDealerName()) {
841
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerName, typedOther.dealerName);
842
      if (lastComparison != 0) {
843
        return lastComparison;
844
      }
845
    }
846
    lastComparison = Boolean.valueOf(isSetDealerAddress()).compareTo(typedOther.isSetDealerAddress());
847
    if (lastComparison != 0) {
848
      return lastComparison;
849
    }
850
    if (isSetDealerAddress()) {
851
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerAddress, typedOther.dealerAddress);
852
      if (lastComparison != 0) {
853
        return lastComparison;
854
      }
855
    }
856
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
857
    if (lastComparison != 0) {
858
      return lastComparison;
859
    }
860
    if (isSetState()) {
861
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
862
      if (lastComparison != 0) {
863
        return lastComparison;
864
      }
865
    }
866
    lastComparison = Boolean.valueOf(isSetPan()).compareTo(typedOther.isSetPan());
867
    if (lastComparison != 0) {
868
      return lastComparison;
869
    }
870
    if (isSetPan()) {
871
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pan, typedOther.pan);
872
      if (lastComparison != 0) {
873
        return lastComparison;
874
      }
875
    }
876
    lastComparison = Boolean.valueOf(isSetRegistrationDate()).compareTo(typedOther.isSetRegistrationDate());
877
    if (lastComparison != 0) {
878
      return lastComparison;
879
    }
880
    if (isSetRegistrationDate()) {
881
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registrationDate, typedOther.registrationDate);
882
      if (lastComparison != 0) {
883
        return lastComparison;
884
      }
885
    }
886
    lastComparison = Boolean.valueOf(isSetRegistrationStatus()).compareTo(typedOther.isSetRegistrationStatus());
887
    if (lastComparison != 0) {
888
      return lastComparison;
889
    }
890
    if (isSetRegistrationStatus()) {
891
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registrationStatus, typedOther.registrationStatus);
892
      if (lastComparison != 0) {
893
        return lastComparison;
894
      }
895
    }
896
    lastComparison = Boolean.valueOf(isSetValidatedTill()).compareTo(typedOther.isSetValidatedTill());
897
    if (lastComparison != 0) {
898
      return lastComparison;
899
    }
900
    if (isSetValidatedTill()) {
901
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validatedTill, typedOther.validatedTill);
902
      if (lastComparison != 0) {
903
        return lastComparison;
904
      }
905
    }
18634 manish.sha 906
    lastComparison = Boolean.valueOf(isSetCreated()).compareTo(typedOther.isSetCreated());
907
    if (lastComparison != 0) {
908
      return lastComparison;
909
    }
910
    if (isSetCreated()) {
911
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);
912
      if (lastComparison != 0) {
913
        return lastComparison;
914
      }
915
    }
18530 manish.sha 916
    return 0;
917
  }
918
 
919
  public _Fields fieldForId(int fieldId) {
920
    return _Fields.findByThriftId(fieldId);
921
  }
922
 
923
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
924
    org.apache.thrift.protocol.TField field;
925
    iprot.readStructBegin();
926
    while (true)
927
    {
928
      field = iprot.readFieldBegin();
929
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
930
        break;
931
      }
932
      switch (field.id) {
933
        case 1: // COUNTER_ID
934
          if (field.type == org.apache.thrift.protocol.TType.I64) {
935
            this.counterId = iprot.readI64();
936
            setCounterIdIsSet(true);
937
          } else { 
938
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
939
          }
940
          break;
941
        case 2: // TIN_NUMBER
942
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
943
            this.tinNumber = iprot.readString();
944
          } else { 
945
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
946
          }
947
          break;
948
        case 3: // CST_NUMBER
949
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
950
            this.cstNumber = iprot.readString();
951
          } else { 
952
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
953
          }
954
          break;
955
        case 4: // DEALER_NAME
956
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
957
            this.dealerName = iprot.readString();
958
          } else { 
959
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
960
          }
961
          break;
962
        case 5: // DEALER_ADDRESS
963
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
964
            this.dealerAddress = iprot.readString();
965
          } else { 
966
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
967
          }
968
          break;
969
        case 6: // STATE
970
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
971
            this.state = iprot.readString();
972
          } else { 
973
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
974
          }
975
          break;
976
        case 7: // PAN
977
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
978
            this.pan = iprot.readString();
979
          } else { 
980
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
981
          }
982
          break;
983
        case 8: // REGISTRATION_DATE
984
          if (field.type == org.apache.thrift.protocol.TType.I64) {
985
            this.registrationDate = iprot.readI64();
986
            setRegistrationDateIsSet(true);
987
          } else { 
988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
989
          }
990
          break;
991
        case 9: // REGISTRATION_STATUS
992
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
993
            this.registrationStatus = iprot.readBool();
994
            setRegistrationStatusIsSet(true);
995
          } else { 
996
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
997
          }
998
          break;
999
        case 10: // VALIDATED_TILL
1000
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1001
            this.validatedTill = iprot.readI64();
1002
            setValidatedTillIsSet(true);
1003
          } else { 
1004
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1005
          }
1006
          break;
18634 manish.sha 1007
        case 11: // CREATED
1008
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1009
            this.created = iprot.readI64();
1010
            setCreatedIsSet(true);
1011
          } else { 
1012
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1013
          }
1014
          break;
18530 manish.sha 1015
        default:
1016
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1017
      }
1018
      iprot.readFieldEnd();
1019
    }
1020
    iprot.readStructEnd();
1021
    validate();
1022
  }
1023
 
1024
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1025
    validate();
1026
 
1027
    oprot.writeStructBegin(STRUCT_DESC);
1028
    oprot.writeFieldBegin(COUNTER_ID_FIELD_DESC);
1029
    oprot.writeI64(this.counterId);
1030
    oprot.writeFieldEnd();
1031
    if (this.tinNumber != null) {
1032
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
1033
      oprot.writeString(this.tinNumber);
1034
      oprot.writeFieldEnd();
1035
    }
1036
    if (this.cstNumber != null) {
1037
      oprot.writeFieldBegin(CST_NUMBER_FIELD_DESC);
1038
      oprot.writeString(this.cstNumber);
1039
      oprot.writeFieldEnd();
1040
    }
1041
    if (this.dealerName != null) {
1042
      oprot.writeFieldBegin(DEALER_NAME_FIELD_DESC);
1043
      oprot.writeString(this.dealerName);
1044
      oprot.writeFieldEnd();
1045
    }
1046
    if (this.dealerAddress != null) {
1047
      oprot.writeFieldBegin(DEALER_ADDRESS_FIELD_DESC);
1048
      oprot.writeString(this.dealerAddress);
1049
      oprot.writeFieldEnd();
1050
    }
1051
    if (this.state != null) {
1052
      oprot.writeFieldBegin(STATE_FIELD_DESC);
1053
      oprot.writeString(this.state);
1054
      oprot.writeFieldEnd();
1055
    }
1056
    if (this.pan != null) {
1057
      oprot.writeFieldBegin(PAN_FIELD_DESC);
1058
      oprot.writeString(this.pan);
1059
      oprot.writeFieldEnd();
1060
    }
1061
    oprot.writeFieldBegin(REGISTRATION_DATE_FIELD_DESC);
1062
    oprot.writeI64(this.registrationDate);
1063
    oprot.writeFieldEnd();
1064
    oprot.writeFieldBegin(REGISTRATION_STATUS_FIELD_DESC);
1065
    oprot.writeBool(this.registrationStatus);
1066
    oprot.writeFieldEnd();
1067
    oprot.writeFieldBegin(VALIDATED_TILL_FIELD_DESC);
1068
    oprot.writeI64(this.validatedTill);
1069
    oprot.writeFieldEnd();
18634 manish.sha 1070
    oprot.writeFieldBegin(CREATED_FIELD_DESC);
1071
    oprot.writeI64(this.created);
1072
    oprot.writeFieldEnd();
18530 manish.sha 1073
    oprot.writeFieldStop();
1074
    oprot.writeStructEnd();
1075
  }
1076
 
1077
  @Override
1078
  public String toString() {
1079
    StringBuilder sb = new StringBuilder("CounterOnlineInfo(");
1080
    boolean first = true;
1081
 
1082
    sb.append("counterId:");
1083
    sb.append(this.counterId);
1084
    first = false;
1085
    if (!first) sb.append(", ");
1086
    sb.append("tinNumber:");
1087
    if (this.tinNumber == null) {
1088
      sb.append("null");
1089
    } else {
1090
      sb.append(this.tinNumber);
1091
    }
1092
    first = false;
1093
    if (!first) sb.append(", ");
1094
    sb.append("cstNumber:");
1095
    if (this.cstNumber == null) {
1096
      sb.append("null");
1097
    } else {
1098
      sb.append(this.cstNumber);
1099
    }
1100
    first = false;
1101
    if (!first) sb.append(", ");
1102
    sb.append("dealerName:");
1103
    if (this.dealerName == null) {
1104
      sb.append("null");
1105
    } else {
1106
      sb.append(this.dealerName);
1107
    }
1108
    first = false;
1109
    if (!first) sb.append(", ");
1110
    sb.append("dealerAddress:");
1111
    if (this.dealerAddress == null) {
1112
      sb.append("null");
1113
    } else {
1114
      sb.append(this.dealerAddress);
1115
    }
1116
    first = false;
1117
    if (!first) sb.append(", ");
1118
    sb.append("state:");
1119
    if (this.state == null) {
1120
      sb.append("null");
1121
    } else {
1122
      sb.append(this.state);
1123
    }
1124
    first = false;
1125
    if (!first) sb.append(", ");
1126
    sb.append("pan:");
1127
    if (this.pan == null) {
1128
      sb.append("null");
1129
    } else {
1130
      sb.append(this.pan);
1131
    }
1132
    first = false;
1133
    if (!first) sb.append(", ");
1134
    sb.append("registrationDate:");
1135
    sb.append(this.registrationDate);
1136
    first = false;
1137
    if (!first) sb.append(", ");
1138
    sb.append("registrationStatus:");
1139
    sb.append(this.registrationStatus);
1140
    first = false;
1141
    if (!first) sb.append(", ");
1142
    sb.append("validatedTill:");
1143
    sb.append(this.validatedTill);
1144
    first = false;
18634 manish.sha 1145
    if (!first) sb.append(", ");
1146
    sb.append("created:");
1147
    sb.append(this.created);
1148
    first = false;
18530 manish.sha 1149
    sb.append(")");
1150
    return sb.toString();
1151
  }
1152
 
1153
  public void validate() throws org.apache.thrift.TException {
1154
    // check for required fields
1155
  }
1156
 
1157
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1158
    try {
1159
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1160
    } catch (org.apache.thrift.TException te) {
1161
      throw new java.io.IOException(te);
1162
    }
1163
  }
1164
 
1165
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1166
    try {
1167
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1168
      __isset_bit_vector = new BitSet(1);
1169
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1170
    } catch (org.apache.thrift.TException te) {
1171
      throw new java.io.IOException(te);
1172
    }
1173
  }
1174
 
1175
}
1176