Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21090 kshitij.so 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 Pmsa implements org.apache.thrift.TBase<Pmsa, Pmsa._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Pmsa");
25
 
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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("emailId", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", 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 LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField L1_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("l1_email", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField L2_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("l2_email", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField ACTIVATED_FIELD_DESC = new org.apache.thrift.protocol.TField("activated", org.apache.thrift.protocol.TType.BOOL, (short)10);
36
  private static final org.apache.thrift.protocol.TField PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("pin", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.STRING, (short)12);
38
  private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)13);
39
 
40
  private long id; // required
41
  private String name; // required
42
  private String phone; // required
43
  private String emailId; // required
44
  private String address; // required
45
  private String state; // required
46
  private String level; // required
47
  private String l1_email; // required
48
  private String l2_email; // required
49
  private boolean activated; // required
50
  private String pin; // required
51
  private String code; // required
52
  private long createdAt; // required
53
 
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
56
    ID((short)1, "id"),
57
    NAME((short)2, "name"),
58
    PHONE((short)3, "phone"),
59
    EMAIL_ID((short)4, "emailId"),
60
    ADDRESS((short)5, "address"),
61
    STATE((short)6, "state"),
62
    LEVEL((short)7, "level"),
63
    L1_EMAIL((short)8, "l1_email"),
64
    L2_EMAIL((short)9, "l2_email"),
65
    ACTIVATED((short)10, "activated"),
66
    PIN((short)11, "pin"),
67
    CODE((short)12, "code"),
68
    CREATED_AT((short)13, "createdAt");
69
 
70
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
71
 
72
    static {
73
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
74
        byName.put(field.getFieldName(), field);
75
      }
76
    }
77
 
78
    /**
79
     * Find the _Fields constant that matches fieldId, or null if its not found.
80
     */
81
    public static _Fields findByThriftId(int fieldId) {
82
      switch(fieldId) {
83
        case 1: // ID
84
          return ID;
85
        case 2: // NAME
86
          return NAME;
87
        case 3: // PHONE
88
          return PHONE;
89
        case 4: // EMAIL_ID
90
          return EMAIL_ID;
91
        case 5: // ADDRESS
92
          return ADDRESS;
93
        case 6: // STATE
94
          return STATE;
95
        case 7: // LEVEL
96
          return LEVEL;
97
        case 8: // L1_EMAIL
98
          return L1_EMAIL;
99
        case 9: // L2_EMAIL
100
          return L2_EMAIL;
101
        case 10: // ACTIVATED
102
          return ACTIVATED;
103
        case 11: // PIN
104
          return PIN;
105
        case 12: // CODE
106
          return CODE;
107
        case 13: // CREATED_AT
108
          return CREATED_AT;
109
        default:
110
          return null;
111
      }
112
    }
113
 
114
    /**
115
     * Find the _Fields constant that matches fieldId, throwing an exception
116
     * if it is not found.
117
     */
118
    public static _Fields findByThriftIdOrThrow(int fieldId) {
119
      _Fields fields = findByThriftId(fieldId);
120
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
121
      return fields;
122
    }
123
 
124
    /**
125
     * Find the _Fields constant that matches name, or null if its not found.
126
     */
127
    public static _Fields findByName(String name) {
128
      return byName.get(name);
129
    }
130
 
131
    private final short _thriftId;
132
    private final String _fieldName;
133
 
134
    _Fields(short thriftId, String fieldName) {
135
      _thriftId = thriftId;
136
      _fieldName = fieldName;
137
    }
138
 
139
    public short getThriftFieldId() {
140
      return _thriftId;
141
    }
142
 
143
    public String getFieldName() {
144
      return _fieldName;
145
    }
146
  }
147
 
148
  // isset id assignments
149
  private static final int __ID_ISSET_ID = 0;
150
  private static final int __ACTIVATED_ISSET_ID = 1;
151
  private static final int __CREATEDAT_ISSET_ID = 2;
152
  private BitSet __isset_bit_vector = new BitSet(3);
153
 
154
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
155
  static {
156
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
157
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
159
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
161
    tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
163
    tmpMap.put(_Fields.EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("emailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
165
    tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
167
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
169
    tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
171
    tmpMap.put(_Fields.L1_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("l1_email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
173
    tmpMap.put(_Fields.L2_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("l2_email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.ACTIVATED, new org.apache.thrift.meta_data.FieldMetaData("activated", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
177
    tmpMap.put(_Fields.PIN, new org.apache.thrift.meta_data.FieldMetaData("pin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
179
    tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
181
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
183
    metaDataMap = Collections.unmodifiableMap(tmpMap);
184
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Pmsa.class, metaDataMap);
185
  }
186
 
187
  public Pmsa() {
188
  }
189
 
190
  public Pmsa(
191
    long id,
192
    String name,
193
    String phone,
194
    String emailId,
195
    String address,
196
    String state,
197
    String level,
198
    String l1_email,
199
    String l2_email,
200
    boolean activated,
201
    String pin,
202
    String code,
203
    long createdAt)
204
  {
205
    this();
206
    this.id = id;
207
    setIdIsSet(true);
208
    this.name = name;
209
    this.phone = phone;
210
    this.emailId = emailId;
211
    this.address = address;
212
    this.state = state;
213
    this.level = level;
214
    this.l1_email = l1_email;
215
    this.l2_email = l2_email;
216
    this.activated = activated;
217
    setActivatedIsSet(true);
218
    this.pin = pin;
219
    this.code = code;
220
    this.createdAt = createdAt;
221
    setCreatedAtIsSet(true);
222
  }
223
 
224
  /**
225
   * Performs a deep copy on <i>other</i>.
226
   */
227
  public Pmsa(Pmsa other) {
228
    __isset_bit_vector.clear();
229
    __isset_bit_vector.or(other.__isset_bit_vector);
230
    this.id = other.id;
231
    if (other.isSetName()) {
232
      this.name = other.name;
233
    }
234
    if (other.isSetPhone()) {
235
      this.phone = other.phone;
236
    }
237
    if (other.isSetEmailId()) {
238
      this.emailId = other.emailId;
239
    }
240
    if (other.isSetAddress()) {
241
      this.address = other.address;
242
    }
243
    if (other.isSetState()) {
244
      this.state = other.state;
245
    }
246
    if (other.isSetLevel()) {
247
      this.level = other.level;
248
    }
249
    if (other.isSetL1_email()) {
250
      this.l1_email = other.l1_email;
251
    }
252
    if (other.isSetL2_email()) {
253
      this.l2_email = other.l2_email;
254
    }
255
    this.activated = other.activated;
256
    if (other.isSetPin()) {
257
      this.pin = other.pin;
258
    }
259
    if (other.isSetCode()) {
260
      this.code = other.code;
261
    }
262
    this.createdAt = other.createdAt;
263
  }
264
 
265
  public Pmsa deepCopy() {
266
    return new Pmsa(this);
267
  }
268
 
269
  @Override
270
  public void clear() {
271
    setIdIsSet(false);
272
    this.id = 0;
273
    this.name = null;
274
    this.phone = null;
275
    this.emailId = null;
276
    this.address = null;
277
    this.state = null;
278
    this.level = null;
279
    this.l1_email = null;
280
    this.l2_email = null;
281
    setActivatedIsSet(false);
282
    this.activated = false;
283
    this.pin = null;
284
    this.code = null;
285
    setCreatedAtIsSet(false);
286
    this.createdAt = 0;
287
  }
288
 
289
  public long getId() {
290
    return this.id;
291
  }
292
 
293
  public void setId(long id) {
294
    this.id = id;
295
    setIdIsSet(true);
296
  }
297
 
298
  public void unsetId() {
299
    __isset_bit_vector.clear(__ID_ISSET_ID);
300
  }
301
 
302
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
303
  public boolean isSetId() {
304
    return __isset_bit_vector.get(__ID_ISSET_ID);
305
  }
306
 
307
  public void setIdIsSet(boolean value) {
308
    __isset_bit_vector.set(__ID_ISSET_ID, value);
309
  }
310
 
311
  public String getName() {
312
    return this.name;
313
  }
314
 
315
  public void setName(String name) {
316
    this.name = name;
317
  }
318
 
319
  public void unsetName() {
320
    this.name = null;
321
  }
322
 
323
  /** Returns true if field name is set (has been assigned a value) and false otherwise */
324
  public boolean isSetName() {
325
    return this.name != null;
326
  }
327
 
328
  public void setNameIsSet(boolean value) {
329
    if (!value) {
330
      this.name = null;
331
    }
332
  }
333
 
334
  public String getPhone() {
335
    return this.phone;
336
  }
337
 
338
  public void setPhone(String phone) {
339
    this.phone = phone;
340
  }
341
 
342
  public void unsetPhone() {
343
    this.phone = null;
344
  }
345
 
346
  /** Returns true if field phone is set (has been assigned a value) and false otherwise */
347
  public boolean isSetPhone() {
348
    return this.phone != null;
349
  }
350
 
351
  public void setPhoneIsSet(boolean value) {
352
    if (!value) {
353
      this.phone = null;
354
    }
355
  }
356
 
357
  public String getEmailId() {
358
    return this.emailId;
359
  }
360
 
361
  public void setEmailId(String emailId) {
362
    this.emailId = emailId;
363
  }
364
 
365
  public void unsetEmailId() {
366
    this.emailId = null;
367
  }
368
 
369
  /** Returns true if field emailId is set (has been assigned a value) and false otherwise */
370
  public boolean isSetEmailId() {
371
    return this.emailId != null;
372
  }
373
 
374
  public void setEmailIdIsSet(boolean value) {
375
    if (!value) {
376
      this.emailId = null;
377
    }
378
  }
379
 
380
  public String getAddress() {
381
    return this.address;
382
  }
383
 
384
  public void setAddress(String address) {
385
    this.address = address;
386
  }
387
 
388
  public void unsetAddress() {
389
    this.address = null;
390
  }
391
 
392
  /** Returns true if field address is set (has been assigned a value) and false otherwise */
393
  public boolean isSetAddress() {
394
    return this.address != null;
395
  }
396
 
397
  public void setAddressIsSet(boolean value) {
398
    if (!value) {
399
      this.address = null;
400
    }
401
  }
402
 
403
  public String getState() {
404
    return this.state;
405
  }
406
 
407
  public void setState(String state) {
408
    this.state = state;
409
  }
410
 
411
  public void unsetState() {
412
    this.state = null;
413
  }
414
 
415
  /** Returns true if field state is set (has been assigned a value) and false otherwise */
416
  public boolean isSetState() {
417
    return this.state != null;
418
  }
419
 
420
  public void setStateIsSet(boolean value) {
421
    if (!value) {
422
      this.state = null;
423
    }
424
  }
425
 
426
  public String getLevel() {
427
    return this.level;
428
  }
429
 
430
  public void setLevel(String level) {
431
    this.level = level;
432
  }
433
 
434
  public void unsetLevel() {
435
    this.level = null;
436
  }
437
 
438
  /** Returns true if field level is set (has been assigned a value) and false otherwise */
439
  public boolean isSetLevel() {
440
    return this.level != null;
441
  }
442
 
443
  public void setLevelIsSet(boolean value) {
444
    if (!value) {
445
      this.level = null;
446
    }
447
  }
448
 
449
  public String getL1_email() {
450
    return this.l1_email;
451
  }
452
 
453
  public void setL1_email(String l1_email) {
454
    this.l1_email = l1_email;
455
  }
456
 
457
  public void unsetL1_email() {
458
    this.l1_email = null;
459
  }
460
 
461
  /** Returns true if field l1_email is set (has been assigned a value) and false otherwise */
462
  public boolean isSetL1_email() {
463
    return this.l1_email != null;
464
  }
465
 
466
  public void setL1_emailIsSet(boolean value) {
467
    if (!value) {
468
      this.l1_email = null;
469
    }
470
  }
471
 
472
  public String getL2_email() {
473
    return this.l2_email;
474
  }
475
 
476
  public void setL2_email(String l2_email) {
477
    this.l2_email = l2_email;
478
  }
479
 
480
  public void unsetL2_email() {
481
    this.l2_email = null;
482
  }
483
 
484
  /** Returns true if field l2_email is set (has been assigned a value) and false otherwise */
485
  public boolean isSetL2_email() {
486
    return this.l2_email != null;
487
  }
488
 
489
  public void setL2_emailIsSet(boolean value) {
490
    if (!value) {
491
      this.l2_email = null;
492
    }
493
  }
494
 
495
  public boolean isActivated() {
496
    return this.activated;
497
  }
498
 
499
  public void setActivated(boolean activated) {
500
    this.activated = activated;
501
    setActivatedIsSet(true);
502
  }
503
 
504
  public void unsetActivated() {
505
    __isset_bit_vector.clear(__ACTIVATED_ISSET_ID);
506
  }
507
 
508
  /** Returns true if field activated is set (has been assigned a value) and false otherwise */
509
  public boolean isSetActivated() {
510
    return __isset_bit_vector.get(__ACTIVATED_ISSET_ID);
511
  }
512
 
513
  public void setActivatedIsSet(boolean value) {
514
    __isset_bit_vector.set(__ACTIVATED_ISSET_ID, value);
515
  }
516
 
517
  public String getPin() {
518
    return this.pin;
519
  }
520
 
521
  public void setPin(String pin) {
522
    this.pin = pin;
523
  }
524
 
525
  public void unsetPin() {
526
    this.pin = null;
527
  }
528
 
529
  /** Returns true if field pin is set (has been assigned a value) and false otherwise */
530
  public boolean isSetPin() {
531
    return this.pin != null;
532
  }
533
 
534
  public void setPinIsSet(boolean value) {
535
    if (!value) {
536
      this.pin = null;
537
    }
538
  }
539
 
540
  public String getCode() {
541
    return this.code;
542
  }
543
 
544
  public void setCode(String code) {
545
    this.code = code;
546
  }
547
 
548
  public void unsetCode() {
549
    this.code = null;
550
  }
551
 
552
  /** Returns true if field code is set (has been assigned a value) and false otherwise */
553
  public boolean isSetCode() {
554
    return this.code != null;
555
  }
556
 
557
  public void setCodeIsSet(boolean value) {
558
    if (!value) {
559
      this.code = null;
560
    }
561
  }
562
 
563
  public long getCreatedAt() {
564
    return this.createdAt;
565
  }
566
 
567
  public void setCreatedAt(long createdAt) {
568
    this.createdAt = createdAt;
569
    setCreatedAtIsSet(true);
570
  }
571
 
572
  public void unsetCreatedAt() {
573
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
574
  }
575
 
576
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
577
  public boolean isSetCreatedAt() {
578
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
579
  }
580
 
581
  public void setCreatedAtIsSet(boolean value) {
582
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
583
  }
584
 
585
  public void setFieldValue(_Fields field, Object value) {
586
    switch (field) {
587
    case ID:
588
      if (value == null) {
589
        unsetId();
590
      } else {
591
        setId((Long)value);
592
      }
593
      break;
594
 
595
    case NAME:
596
      if (value == null) {
597
        unsetName();
598
      } else {
599
        setName((String)value);
600
      }
601
      break;
602
 
603
    case PHONE:
604
      if (value == null) {
605
        unsetPhone();
606
      } else {
607
        setPhone((String)value);
608
      }
609
      break;
610
 
611
    case EMAIL_ID:
612
      if (value == null) {
613
        unsetEmailId();
614
      } else {
615
        setEmailId((String)value);
616
      }
617
      break;
618
 
619
    case ADDRESS:
620
      if (value == null) {
621
        unsetAddress();
622
      } else {
623
        setAddress((String)value);
624
      }
625
      break;
626
 
627
    case STATE:
628
      if (value == null) {
629
        unsetState();
630
      } else {
631
        setState((String)value);
632
      }
633
      break;
634
 
635
    case LEVEL:
636
      if (value == null) {
637
        unsetLevel();
638
      } else {
639
        setLevel((String)value);
640
      }
641
      break;
642
 
643
    case L1_EMAIL:
644
      if (value == null) {
645
        unsetL1_email();
646
      } else {
647
        setL1_email((String)value);
648
      }
649
      break;
650
 
651
    case L2_EMAIL:
652
      if (value == null) {
653
        unsetL2_email();
654
      } else {
655
        setL2_email((String)value);
656
      }
657
      break;
658
 
659
    case ACTIVATED:
660
      if (value == null) {
661
        unsetActivated();
662
      } else {
663
        setActivated((Boolean)value);
664
      }
665
      break;
666
 
667
    case PIN:
668
      if (value == null) {
669
        unsetPin();
670
      } else {
671
        setPin((String)value);
672
      }
673
      break;
674
 
675
    case CODE:
676
      if (value == null) {
677
        unsetCode();
678
      } else {
679
        setCode((String)value);
680
      }
681
      break;
682
 
683
    case CREATED_AT:
684
      if (value == null) {
685
        unsetCreatedAt();
686
      } else {
687
        setCreatedAt((Long)value);
688
      }
689
      break;
690
 
691
    }
692
  }
693
 
694
  public Object getFieldValue(_Fields field) {
695
    switch (field) {
696
    case ID:
697
      return Long.valueOf(getId());
698
 
699
    case NAME:
700
      return getName();
701
 
702
    case PHONE:
703
      return getPhone();
704
 
705
    case EMAIL_ID:
706
      return getEmailId();
707
 
708
    case ADDRESS:
709
      return getAddress();
710
 
711
    case STATE:
712
      return getState();
713
 
714
    case LEVEL:
715
      return getLevel();
716
 
717
    case L1_EMAIL:
718
      return getL1_email();
719
 
720
    case L2_EMAIL:
721
      return getL2_email();
722
 
723
    case ACTIVATED:
724
      return Boolean.valueOf(isActivated());
725
 
726
    case PIN:
727
      return getPin();
728
 
729
    case CODE:
730
      return getCode();
731
 
732
    case CREATED_AT:
733
      return Long.valueOf(getCreatedAt());
734
 
735
    }
736
    throw new IllegalStateException();
737
  }
738
 
739
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
740
  public boolean isSet(_Fields field) {
741
    if (field == null) {
742
      throw new IllegalArgumentException();
743
    }
744
 
745
    switch (field) {
746
    case ID:
747
      return isSetId();
748
    case NAME:
749
      return isSetName();
750
    case PHONE:
751
      return isSetPhone();
752
    case EMAIL_ID:
753
      return isSetEmailId();
754
    case ADDRESS:
755
      return isSetAddress();
756
    case STATE:
757
      return isSetState();
758
    case LEVEL:
759
      return isSetLevel();
760
    case L1_EMAIL:
761
      return isSetL1_email();
762
    case L2_EMAIL:
763
      return isSetL2_email();
764
    case ACTIVATED:
765
      return isSetActivated();
766
    case PIN:
767
      return isSetPin();
768
    case CODE:
769
      return isSetCode();
770
    case CREATED_AT:
771
      return isSetCreatedAt();
772
    }
773
    throw new IllegalStateException();
774
  }
775
 
776
  @Override
777
  public boolean equals(Object that) {
778
    if (that == null)
779
      return false;
780
    if (that instanceof Pmsa)
781
      return this.equals((Pmsa)that);
782
    return false;
783
  }
784
 
785
  public boolean equals(Pmsa that) {
786
    if (that == null)
787
      return false;
788
 
789
    boolean this_present_id = true;
790
    boolean that_present_id = true;
791
    if (this_present_id || that_present_id) {
792
      if (!(this_present_id && that_present_id))
793
        return false;
794
      if (this.id != that.id)
795
        return false;
796
    }
797
 
798
    boolean this_present_name = true && this.isSetName();
799
    boolean that_present_name = true && that.isSetName();
800
    if (this_present_name || that_present_name) {
801
      if (!(this_present_name && that_present_name))
802
        return false;
803
      if (!this.name.equals(that.name))
804
        return false;
805
    }
806
 
807
    boolean this_present_phone = true && this.isSetPhone();
808
    boolean that_present_phone = true && that.isSetPhone();
809
    if (this_present_phone || that_present_phone) {
810
      if (!(this_present_phone && that_present_phone))
811
        return false;
812
      if (!this.phone.equals(that.phone))
813
        return false;
814
    }
815
 
816
    boolean this_present_emailId = true && this.isSetEmailId();
817
    boolean that_present_emailId = true && that.isSetEmailId();
818
    if (this_present_emailId || that_present_emailId) {
819
      if (!(this_present_emailId && that_present_emailId))
820
        return false;
821
      if (!this.emailId.equals(that.emailId))
822
        return false;
823
    }
824
 
825
    boolean this_present_address = true && this.isSetAddress();
826
    boolean that_present_address = true && that.isSetAddress();
827
    if (this_present_address || that_present_address) {
828
      if (!(this_present_address && that_present_address))
829
        return false;
830
      if (!this.address.equals(that.address))
831
        return false;
832
    }
833
 
834
    boolean this_present_state = true && this.isSetState();
835
    boolean that_present_state = true && that.isSetState();
836
    if (this_present_state || that_present_state) {
837
      if (!(this_present_state && that_present_state))
838
        return false;
839
      if (!this.state.equals(that.state))
840
        return false;
841
    }
842
 
843
    boolean this_present_level = true && this.isSetLevel();
844
    boolean that_present_level = true && that.isSetLevel();
845
    if (this_present_level || that_present_level) {
846
      if (!(this_present_level && that_present_level))
847
        return false;
848
      if (!this.level.equals(that.level))
849
        return false;
850
    }
851
 
852
    boolean this_present_l1_email = true && this.isSetL1_email();
853
    boolean that_present_l1_email = true && that.isSetL1_email();
854
    if (this_present_l1_email || that_present_l1_email) {
855
      if (!(this_present_l1_email && that_present_l1_email))
856
        return false;
857
      if (!this.l1_email.equals(that.l1_email))
858
        return false;
859
    }
860
 
861
    boolean this_present_l2_email = true && this.isSetL2_email();
862
    boolean that_present_l2_email = true && that.isSetL2_email();
863
    if (this_present_l2_email || that_present_l2_email) {
864
      if (!(this_present_l2_email && that_present_l2_email))
865
        return false;
866
      if (!this.l2_email.equals(that.l2_email))
867
        return false;
868
    }
869
 
870
    boolean this_present_activated = true;
871
    boolean that_present_activated = true;
872
    if (this_present_activated || that_present_activated) {
873
      if (!(this_present_activated && that_present_activated))
874
        return false;
875
      if (this.activated != that.activated)
876
        return false;
877
    }
878
 
879
    boolean this_present_pin = true && this.isSetPin();
880
    boolean that_present_pin = true && that.isSetPin();
881
    if (this_present_pin || that_present_pin) {
882
      if (!(this_present_pin && that_present_pin))
883
        return false;
884
      if (!this.pin.equals(that.pin))
885
        return false;
886
    }
887
 
888
    boolean this_present_code = true && this.isSetCode();
889
    boolean that_present_code = true && that.isSetCode();
890
    if (this_present_code || that_present_code) {
891
      if (!(this_present_code && that_present_code))
892
        return false;
893
      if (!this.code.equals(that.code))
894
        return false;
895
    }
896
 
897
    boolean this_present_createdAt = true;
898
    boolean that_present_createdAt = true;
899
    if (this_present_createdAt || that_present_createdAt) {
900
      if (!(this_present_createdAt && that_present_createdAt))
901
        return false;
902
      if (this.createdAt != that.createdAt)
903
        return false;
904
    }
905
 
906
    return true;
907
  }
908
 
909
  @Override
910
  public int hashCode() {
911
    return 0;
912
  }
913
 
914
  public int compareTo(Pmsa other) {
915
    if (!getClass().equals(other.getClass())) {
916
      return getClass().getName().compareTo(other.getClass().getName());
917
    }
918
 
919
    int lastComparison = 0;
920
    Pmsa typedOther = (Pmsa)other;
921
 
922
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
923
    if (lastComparison != 0) {
924
      return lastComparison;
925
    }
926
    if (isSetId()) {
927
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
928
      if (lastComparison != 0) {
929
        return lastComparison;
930
      }
931
    }
932
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
933
    if (lastComparison != 0) {
934
      return lastComparison;
935
    }
936
    if (isSetName()) {
937
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
938
      if (lastComparison != 0) {
939
        return lastComparison;
940
      }
941
    }
942
    lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
943
    if (lastComparison != 0) {
944
      return lastComparison;
945
    }
946
    if (isSetPhone()) {
947
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
948
      if (lastComparison != 0) {
949
        return lastComparison;
950
      }
951
    }
952
    lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(typedOther.isSetEmailId());
953
    if (lastComparison != 0) {
954
      return lastComparison;
955
    }
956
    if (isSetEmailId()) {
957
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailId, typedOther.emailId);
958
      if (lastComparison != 0) {
959
        return lastComparison;
960
      }
961
    }
962
    lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress());
963
    if (lastComparison != 0) {
964
      return lastComparison;
965
    }
966
    if (isSetAddress()) {
967
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address);
968
      if (lastComparison != 0) {
969
        return lastComparison;
970
      }
971
    }
972
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
973
    if (lastComparison != 0) {
974
      return lastComparison;
975
    }
976
    if (isSetState()) {
977
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
978
      if (lastComparison != 0) {
979
        return lastComparison;
980
      }
981
    }
982
    lastComparison = Boolean.valueOf(isSetLevel()).compareTo(typedOther.isSetLevel());
983
    if (lastComparison != 0) {
984
      return lastComparison;
985
    }
986
    if (isSetLevel()) {
987
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, typedOther.level);
988
      if (lastComparison != 0) {
989
        return lastComparison;
990
      }
991
    }
992
    lastComparison = Boolean.valueOf(isSetL1_email()).compareTo(typedOther.isSetL1_email());
993
    if (lastComparison != 0) {
994
      return lastComparison;
995
    }
996
    if (isSetL1_email()) {
997
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l1_email, typedOther.l1_email);
998
      if (lastComparison != 0) {
999
        return lastComparison;
1000
      }
1001
    }
1002
    lastComparison = Boolean.valueOf(isSetL2_email()).compareTo(typedOther.isSetL2_email());
1003
    if (lastComparison != 0) {
1004
      return lastComparison;
1005
    }
1006
    if (isSetL2_email()) {
1007
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.l2_email, typedOther.l2_email);
1008
      if (lastComparison != 0) {
1009
        return lastComparison;
1010
      }
1011
    }
1012
    lastComparison = Boolean.valueOf(isSetActivated()).compareTo(typedOther.isSetActivated());
1013
    if (lastComparison != 0) {
1014
      return lastComparison;
1015
    }
1016
    if (isSetActivated()) {
1017
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activated, typedOther.activated);
1018
      if (lastComparison != 0) {
1019
        return lastComparison;
1020
      }
1021
    }
1022
    lastComparison = Boolean.valueOf(isSetPin()).compareTo(typedOther.isSetPin());
1023
    if (lastComparison != 0) {
1024
      return lastComparison;
1025
    }
1026
    if (isSetPin()) {
1027
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pin, typedOther.pin);
1028
      if (lastComparison != 0) {
1029
        return lastComparison;
1030
      }
1031
    }
1032
    lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
1033
    if (lastComparison != 0) {
1034
      return lastComparison;
1035
    }
1036
    if (isSetCode()) {
1037
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
1038
      if (lastComparison != 0) {
1039
        return lastComparison;
1040
      }
1041
    }
1042
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
1043
    if (lastComparison != 0) {
1044
      return lastComparison;
1045
    }
1046
    if (isSetCreatedAt()) {
1047
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
1048
      if (lastComparison != 0) {
1049
        return lastComparison;
1050
      }
1051
    }
1052
    return 0;
1053
  }
1054
 
1055
  public _Fields fieldForId(int fieldId) {
1056
    return _Fields.findByThriftId(fieldId);
1057
  }
1058
 
1059
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1060
    org.apache.thrift.protocol.TField field;
1061
    iprot.readStructBegin();
1062
    while (true)
1063
    {
1064
      field = iprot.readFieldBegin();
1065
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1066
        break;
1067
      }
1068
      switch (field.id) {
1069
        case 1: // ID
1070
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1071
            this.id = iprot.readI64();
1072
            setIdIsSet(true);
1073
          } else { 
1074
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1075
          }
1076
          break;
1077
        case 2: // NAME
1078
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1079
            this.name = iprot.readString();
1080
          } else { 
1081
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1082
          }
1083
          break;
1084
        case 3: // PHONE
1085
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1086
            this.phone = iprot.readString();
1087
          } else { 
1088
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1089
          }
1090
          break;
1091
        case 4: // EMAIL_ID
1092
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1093
            this.emailId = iprot.readString();
1094
          } else { 
1095
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1096
          }
1097
          break;
1098
        case 5: // ADDRESS
1099
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1100
            this.address = iprot.readString();
1101
          } else { 
1102
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1103
          }
1104
          break;
1105
        case 6: // STATE
1106
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1107
            this.state = iprot.readString();
1108
          } else { 
1109
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1110
          }
1111
          break;
1112
        case 7: // LEVEL
1113
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1114
            this.level = iprot.readString();
1115
          } else { 
1116
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1117
          }
1118
          break;
1119
        case 8: // L1_EMAIL
1120
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1121
            this.l1_email = iprot.readString();
1122
          } else { 
1123
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1124
          }
1125
          break;
1126
        case 9: // L2_EMAIL
1127
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1128
            this.l2_email = iprot.readString();
1129
          } else { 
1130
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1131
          }
1132
          break;
1133
        case 10: // ACTIVATED
1134
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1135
            this.activated = iprot.readBool();
1136
            setActivatedIsSet(true);
1137
          } else { 
1138
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1139
          }
1140
          break;
1141
        case 11: // PIN
1142
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1143
            this.pin = iprot.readString();
1144
          } else { 
1145
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1146
          }
1147
          break;
1148
        case 12: // CODE
1149
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1150
            this.code = iprot.readString();
1151
          } else { 
1152
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1153
          }
1154
          break;
1155
        case 13: // CREATED_AT
1156
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1157
            this.createdAt = iprot.readI64();
1158
            setCreatedAtIsSet(true);
1159
          } else { 
1160
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1161
          }
1162
          break;
1163
        default:
1164
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1165
      }
1166
      iprot.readFieldEnd();
1167
    }
1168
    iprot.readStructEnd();
1169
    validate();
1170
  }
1171
 
1172
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1173
    validate();
1174
 
1175
    oprot.writeStructBegin(STRUCT_DESC);
1176
    oprot.writeFieldBegin(ID_FIELD_DESC);
1177
    oprot.writeI64(this.id);
1178
    oprot.writeFieldEnd();
1179
    if (this.name != null) {
1180
      oprot.writeFieldBegin(NAME_FIELD_DESC);
1181
      oprot.writeString(this.name);
1182
      oprot.writeFieldEnd();
1183
    }
1184
    if (this.phone != null) {
1185
      oprot.writeFieldBegin(PHONE_FIELD_DESC);
1186
      oprot.writeString(this.phone);
1187
      oprot.writeFieldEnd();
1188
    }
1189
    if (this.emailId != null) {
1190
      oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);
1191
      oprot.writeString(this.emailId);
1192
      oprot.writeFieldEnd();
1193
    }
1194
    if (this.address != null) {
1195
      oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
1196
      oprot.writeString(this.address);
1197
      oprot.writeFieldEnd();
1198
    }
1199
    if (this.state != null) {
1200
      oprot.writeFieldBegin(STATE_FIELD_DESC);
1201
      oprot.writeString(this.state);
1202
      oprot.writeFieldEnd();
1203
    }
1204
    if (this.level != null) {
1205
      oprot.writeFieldBegin(LEVEL_FIELD_DESC);
1206
      oprot.writeString(this.level);
1207
      oprot.writeFieldEnd();
1208
    }
1209
    if (this.l1_email != null) {
1210
      oprot.writeFieldBegin(L1_EMAIL_FIELD_DESC);
1211
      oprot.writeString(this.l1_email);
1212
      oprot.writeFieldEnd();
1213
    }
1214
    if (this.l2_email != null) {
1215
      oprot.writeFieldBegin(L2_EMAIL_FIELD_DESC);
1216
      oprot.writeString(this.l2_email);
1217
      oprot.writeFieldEnd();
1218
    }
1219
    oprot.writeFieldBegin(ACTIVATED_FIELD_DESC);
1220
    oprot.writeBool(this.activated);
1221
    oprot.writeFieldEnd();
1222
    if (this.pin != null) {
1223
      oprot.writeFieldBegin(PIN_FIELD_DESC);
1224
      oprot.writeString(this.pin);
1225
      oprot.writeFieldEnd();
1226
    }
1227
    if (this.code != null) {
1228
      oprot.writeFieldBegin(CODE_FIELD_DESC);
1229
      oprot.writeString(this.code);
1230
      oprot.writeFieldEnd();
1231
    }
1232
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
1233
    oprot.writeI64(this.createdAt);
1234
    oprot.writeFieldEnd();
1235
    oprot.writeFieldStop();
1236
    oprot.writeStructEnd();
1237
  }
1238
 
1239
  @Override
1240
  public String toString() {
1241
    StringBuilder sb = new StringBuilder("Pmsa(");
1242
    boolean first = true;
1243
 
1244
    sb.append("id:");
1245
    sb.append(this.id);
1246
    first = false;
1247
    if (!first) sb.append(", ");
1248
    sb.append("name:");
1249
    if (this.name == null) {
1250
      sb.append("null");
1251
    } else {
1252
      sb.append(this.name);
1253
    }
1254
    first = false;
1255
    if (!first) sb.append(", ");
1256
    sb.append("phone:");
1257
    if (this.phone == null) {
1258
      sb.append("null");
1259
    } else {
1260
      sb.append(this.phone);
1261
    }
1262
    first = false;
1263
    if (!first) sb.append(", ");
1264
    sb.append("emailId:");
1265
    if (this.emailId == null) {
1266
      sb.append("null");
1267
    } else {
1268
      sb.append(this.emailId);
1269
    }
1270
    first = false;
1271
    if (!first) sb.append(", ");
1272
    sb.append("address:");
1273
    if (this.address == null) {
1274
      sb.append("null");
1275
    } else {
1276
      sb.append(this.address);
1277
    }
1278
    first = false;
1279
    if (!first) sb.append(", ");
1280
    sb.append("state:");
1281
    if (this.state == null) {
1282
      sb.append("null");
1283
    } else {
1284
      sb.append(this.state);
1285
    }
1286
    first = false;
1287
    if (!first) sb.append(", ");
1288
    sb.append("level:");
1289
    if (this.level == null) {
1290
      sb.append("null");
1291
    } else {
1292
      sb.append(this.level);
1293
    }
1294
    first = false;
1295
    if (!first) sb.append(", ");
1296
    sb.append("l1_email:");
1297
    if (this.l1_email == null) {
1298
      sb.append("null");
1299
    } else {
1300
      sb.append(this.l1_email);
1301
    }
1302
    first = false;
1303
    if (!first) sb.append(", ");
1304
    sb.append("l2_email:");
1305
    if (this.l2_email == null) {
1306
      sb.append("null");
1307
    } else {
1308
      sb.append(this.l2_email);
1309
    }
1310
    first = false;
1311
    if (!first) sb.append(", ");
1312
    sb.append("activated:");
1313
    sb.append(this.activated);
1314
    first = false;
1315
    if (!first) sb.append(", ");
1316
    sb.append("pin:");
1317
    if (this.pin == null) {
1318
      sb.append("null");
1319
    } else {
1320
      sb.append(this.pin);
1321
    }
1322
    first = false;
1323
    if (!first) sb.append(", ");
1324
    sb.append("code:");
1325
    if (this.code == null) {
1326
      sb.append("null");
1327
    } else {
1328
      sb.append(this.code);
1329
    }
1330
    first = false;
1331
    if (!first) sb.append(", ");
1332
    sb.append("createdAt:");
1333
    sb.append(this.createdAt);
1334
    first = false;
1335
    sb.append(")");
1336
    return sb.toString();
1337
  }
1338
 
1339
  public void validate() throws org.apache.thrift.TException {
1340
    // check for required fields
1341
  }
1342
 
1343
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1344
    try {
1345
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1346
    } catch (org.apache.thrift.TException te) {
1347
      throw new java.io.IOException(te);
1348
    }
1349
  }
1350
 
1351
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1352
    try {
1353
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1354
      __isset_bit_vector = new BitSet(1);
1355
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1356
    } catch (org.apache.thrift.TException te) {
1357
      throw new java.io.IOException(te);
1358
    }
1359
  }
1360
 
1361
}
1362