Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
1396 varun.gupt 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
1396 varun.gupt 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.utils;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
1396 varun.gupt 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class UserEmail implements org.apache.thrift.TBase<UserEmail, UserEmail._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserEmail");
1396 varun.gupt 25
 
3430 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 EMAIL_TO_FIELD_DESC = new org.apache.thrift.protocol.TField("emailTo", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField EMAIL_FROM_FIELD_DESC = new org.apache.thrift.protocol.TField("emailFrom", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField SUBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("subject", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("body", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField EMAIL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("emailType", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.BOOL, (short)8);
34
  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)9);
1396 varun.gupt 35
 
3430 rajveer 36
  private long id; // required
37
  private String emailTo; // required
38
  private String emailFrom; // required
39
  private String subject; // required
40
  private String body; // required
41
  private String source; // required
42
  private String emailType; // required
43
  private boolean status; // required
44
  private long timestamp; // required
1396 varun.gupt 45
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1424 varun.gupt 48
    ID((short)1, "id"),
49
    EMAIL_TO((short)2, "emailTo"),
50
    EMAIL_FROM((short)3, "emailFrom"),
51
    SUBJECT((short)4, "subject"),
52
    BODY((short)5, "body"),
53
    SOURCE((short)6, "source"),
54
    EMAIL_TYPE((short)7, "emailType"),
55
    STATUS((short)8, "status"),
56
    TIMESTAMP((short)9, "timestamp");
1396 varun.gupt 57
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
60
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
        byName.put(field.getFieldName(), field);
63
      }
64
    }
65
 
66
    /**
67
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     */
69
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 70
      switch(fieldId) {
71
        case 1: // ID
72
          return ID;
73
        case 2: // EMAIL_TO
74
          return EMAIL_TO;
75
        case 3: // EMAIL_FROM
76
          return EMAIL_FROM;
77
        case 4: // SUBJECT
78
          return SUBJECT;
79
        case 5: // BODY
80
          return BODY;
81
        case 6: // SOURCE
82
          return SOURCE;
83
        case 7: // EMAIL_TYPE
84
          return EMAIL_TYPE;
85
        case 8: // STATUS
86
          return STATUS;
87
        case 9: // TIMESTAMP
88
          return TIMESTAMP;
89
        default:
90
          return null;
91
      }
1396 varun.gupt 92
    }
93
 
94
    /**
95
     * Find the _Fields constant that matches fieldId, throwing an exception
96
     * if it is not found.
97
     */
98
    public static _Fields findByThriftIdOrThrow(int fieldId) {
99
      _Fields fields = findByThriftId(fieldId);
100
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
101
      return fields;
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches name, or null if its not found.
106
     */
107
    public static _Fields findByName(String name) {
108
      return byName.get(name);
109
    }
110
 
111
    private final short _thriftId;
112
    private final String _fieldName;
113
 
114
    _Fields(short thriftId, String fieldName) {
115
      _thriftId = thriftId;
116
      _fieldName = fieldName;
117
    }
118
 
119
    public short getThriftFieldId() {
120
      return _thriftId;
121
    }
122
 
123
    public String getFieldName() {
124
      return _fieldName;
125
    }
126
  }
127
 
128
  // isset id assignments
1424 varun.gupt 129
  private static final int __ID_ISSET_ID = 0;
130
  private static final int __STATUS_ISSET_ID = 1;
131
  private static final int __TIMESTAMP_ISSET_ID = 2;
132
  private BitSet __isset_bit_vector = new BitSet(3);
1396 varun.gupt 133
 
3430 rajveer 134
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1396 varun.gupt 135
  static {
3430 rajveer 136
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
137
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
139
    tmpMap.put(_Fields.EMAIL_TO, new org.apache.thrift.meta_data.FieldMetaData("emailTo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
141
    tmpMap.put(_Fields.EMAIL_FROM, new org.apache.thrift.meta_data.FieldMetaData("emailFrom", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
143
    tmpMap.put(_Fields.SUBJECT, new org.apache.thrift.meta_data.FieldMetaData("subject", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
145
    tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
147
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
149
    tmpMap.put(_Fields.EMAIL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("emailType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
151
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
153
    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
    metaDataMap = Collections.unmodifiableMap(tmpMap);
156
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserEmail.class, metaDataMap);
1396 varun.gupt 157
  }
158
 
159
  public UserEmail() {
160
  }
161
 
162
  public UserEmail(
1424 varun.gupt 163
    long id,
1396 varun.gupt 164
    String emailTo,
165
    String emailFrom,
166
    String subject,
167
    String body,
168
    String source,
169
    String emailType,
170
    boolean status,
171
    long timestamp)
172
  {
173
    this();
1424 varun.gupt 174
    this.id = id;
175
    setIdIsSet(true);
1396 varun.gupt 176
    this.emailTo = emailTo;
177
    this.emailFrom = emailFrom;
178
    this.subject = subject;
179
    this.body = body;
180
    this.source = source;
181
    this.emailType = emailType;
182
    this.status = status;
183
    setStatusIsSet(true);
184
    this.timestamp = timestamp;
185
    setTimestampIsSet(true);
186
  }
187
 
188
  /**
189
   * Performs a deep copy on <i>other</i>.
190
   */
191
  public UserEmail(UserEmail other) {
192
    __isset_bit_vector.clear();
193
    __isset_bit_vector.or(other.__isset_bit_vector);
1424 varun.gupt 194
    this.id = other.id;
1396 varun.gupt 195
    if (other.isSetEmailTo()) {
196
      this.emailTo = other.emailTo;
197
    }
198
    if (other.isSetEmailFrom()) {
199
      this.emailFrom = other.emailFrom;
200
    }
201
    if (other.isSetSubject()) {
202
      this.subject = other.subject;
203
    }
204
    if (other.isSetBody()) {
205
      this.body = other.body;
206
    }
207
    if (other.isSetSource()) {
208
      this.source = other.source;
209
    }
210
    if (other.isSetEmailType()) {
211
      this.emailType = other.emailType;
212
    }
213
    this.status = other.status;
214
    this.timestamp = other.timestamp;
215
  }
216
 
217
  public UserEmail deepCopy() {
218
    return new UserEmail(this);
219
  }
220
 
3430 rajveer 221
  @Override
222
  public void clear() {
223
    setIdIsSet(false);
224
    this.id = 0;
225
    this.emailTo = null;
226
    this.emailFrom = null;
227
    this.subject = null;
228
    this.body = null;
229
    this.source = null;
230
    this.emailType = null;
231
    setStatusIsSet(false);
232
    this.status = false;
233
    setTimestampIsSet(false);
234
    this.timestamp = 0;
1396 varun.gupt 235
  }
236
 
1424 varun.gupt 237
  public long getId() {
238
    return this.id;
239
  }
240
 
3430 rajveer 241
  public void setId(long id) {
1424 varun.gupt 242
    this.id = id;
243
    setIdIsSet(true);
244
  }
245
 
246
  public void unsetId() {
247
    __isset_bit_vector.clear(__ID_ISSET_ID);
248
  }
249
 
3430 rajveer 250
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
1424 varun.gupt 251
  public boolean isSetId() {
252
    return __isset_bit_vector.get(__ID_ISSET_ID);
253
  }
254
 
255
  public void setIdIsSet(boolean value) {
256
    __isset_bit_vector.set(__ID_ISSET_ID, value);
257
  }
258
 
1396 varun.gupt 259
  public String getEmailTo() {
260
    return this.emailTo;
261
  }
262
 
3430 rajveer 263
  public void setEmailTo(String emailTo) {
1396 varun.gupt 264
    this.emailTo = emailTo;
265
  }
266
 
267
  public void unsetEmailTo() {
268
    this.emailTo = null;
269
  }
270
 
3430 rajveer 271
  /** Returns true if field emailTo is set (has been assigned a value) and false otherwise */
1396 varun.gupt 272
  public boolean isSetEmailTo() {
273
    return this.emailTo != null;
274
  }
275
 
276
  public void setEmailToIsSet(boolean value) {
277
    if (!value) {
278
      this.emailTo = null;
279
    }
280
  }
281
 
282
  public String getEmailFrom() {
283
    return this.emailFrom;
284
  }
285
 
3430 rajveer 286
  public void setEmailFrom(String emailFrom) {
1396 varun.gupt 287
    this.emailFrom = emailFrom;
288
  }
289
 
290
  public void unsetEmailFrom() {
291
    this.emailFrom = null;
292
  }
293
 
3430 rajveer 294
  /** Returns true if field emailFrom is set (has been assigned a value) and false otherwise */
1396 varun.gupt 295
  public boolean isSetEmailFrom() {
296
    return this.emailFrom != null;
297
  }
298
 
299
  public void setEmailFromIsSet(boolean value) {
300
    if (!value) {
301
      this.emailFrom = null;
302
    }
303
  }
304
 
305
  public String getSubject() {
306
    return this.subject;
307
  }
308
 
3430 rajveer 309
  public void setSubject(String subject) {
1396 varun.gupt 310
    this.subject = subject;
311
  }
312
 
313
  public void unsetSubject() {
314
    this.subject = null;
315
  }
316
 
3430 rajveer 317
  /** Returns true if field subject is set (has been assigned a value) and false otherwise */
1396 varun.gupt 318
  public boolean isSetSubject() {
319
    return this.subject != null;
320
  }
321
 
322
  public void setSubjectIsSet(boolean value) {
323
    if (!value) {
324
      this.subject = null;
325
    }
326
  }
327
 
328
  public String getBody() {
329
    return this.body;
330
  }
331
 
3430 rajveer 332
  public void setBody(String body) {
1396 varun.gupt 333
    this.body = body;
334
  }
335
 
336
  public void unsetBody() {
337
    this.body = null;
338
  }
339
 
3430 rajveer 340
  /** Returns true if field body is set (has been assigned a value) and false otherwise */
1396 varun.gupt 341
  public boolean isSetBody() {
342
    return this.body != null;
343
  }
344
 
345
  public void setBodyIsSet(boolean value) {
346
    if (!value) {
347
      this.body = null;
348
    }
349
  }
350
 
351
  public String getSource() {
352
    return this.source;
353
  }
354
 
3430 rajveer 355
  public void setSource(String source) {
1396 varun.gupt 356
    this.source = source;
357
  }
358
 
359
  public void unsetSource() {
360
    this.source = null;
361
  }
362
 
3430 rajveer 363
  /** Returns true if field source is set (has been assigned a value) and false otherwise */
1396 varun.gupt 364
  public boolean isSetSource() {
365
    return this.source != null;
366
  }
367
 
368
  public void setSourceIsSet(boolean value) {
369
    if (!value) {
370
      this.source = null;
371
    }
372
  }
373
 
374
  public String getEmailType() {
375
    return this.emailType;
376
  }
377
 
3430 rajveer 378
  public void setEmailType(String emailType) {
1396 varun.gupt 379
    this.emailType = emailType;
380
  }
381
 
382
  public void unsetEmailType() {
383
    this.emailType = null;
384
  }
385
 
3430 rajveer 386
  /** Returns true if field emailType is set (has been assigned a value) and false otherwise */
1396 varun.gupt 387
  public boolean isSetEmailType() {
388
    return this.emailType != null;
389
  }
390
 
391
  public void setEmailTypeIsSet(boolean value) {
392
    if (!value) {
393
      this.emailType = null;
394
    }
395
  }
396
 
397
  public boolean isStatus() {
398
    return this.status;
399
  }
400
 
3430 rajveer 401
  public void setStatus(boolean status) {
1396 varun.gupt 402
    this.status = status;
403
    setStatusIsSet(true);
404
  }
405
 
406
  public void unsetStatus() {
407
    __isset_bit_vector.clear(__STATUS_ISSET_ID);
408
  }
409
 
3430 rajveer 410
  /** Returns true if field status is set (has been assigned a value) and false otherwise */
1396 varun.gupt 411
  public boolean isSetStatus() {
412
    return __isset_bit_vector.get(__STATUS_ISSET_ID);
413
  }
414
 
415
  public void setStatusIsSet(boolean value) {
416
    __isset_bit_vector.set(__STATUS_ISSET_ID, value);
417
  }
418
 
419
  public long getTimestamp() {
420
    return this.timestamp;
421
  }
422
 
3430 rajveer 423
  public void setTimestamp(long timestamp) {
1396 varun.gupt 424
    this.timestamp = timestamp;
425
    setTimestampIsSet(true);
426
  }
427
 
428
  public void unsetTimestamp() {
429
    __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
430
  }
431
 
3430 rajveer 432
  /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
1396 varun.gupt 433
  public boolean isSetTimestamp() {
434
    return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
435
  }
436
 
437
  public void setTimestampIsSet(boolean value) {
438
    __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
439
  }
440
 
441
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
1424 varun.gupt 443
    case ID:
444
      if (value == null) {
445
        unsetId();
446
      } else {
447
        setId((Long)value);
448
      }
449
      break;
450
 
1396 varun.gupt 451
    case EMAIL_TO:
452
      if (value == null) {
453
        unsetEmailTo();
454
      } else {
455
        setEmailTo((String)value);
456
      }
457
      break;
458
 
459
    case EMAIL_FROM:
460
      if (value == null) {
461
        unsetEmailFrom();
462
      } else {
463
        setEmailFrom((String)value);
464
      }
465
      break;
466
 
467
    case SUBJECT:
468
      if (value == null) {
469
        unsetSubject();
470
      } else {
471
        setSubject((String)value);
472
      }
473
      break;
474
 
475
    case BODY:
476
      if (value == null) {
477
        unsetBody();
478
      } else {
479
        setBody((String)value);
480
      }
481
      break;
482
 
483
    case SOURCE:
484
      if (value == null) {
485
        unsetSource();
486
      } else {
487
        setSource((String)value);
488
      }
489
      break;
490
 
491
    case EMAIL_TYPE:
492
      if (value == null) {
493
        unsetEmailType();
494
      } else {
495
        setEmailType((String)value);
496
      }
497
      break;
498
 
499
    case STATUS:
500
      if (value == null) {
501
        unsetStatus();
502
      } else {
503
        setStatus((Boolean)value);
504
      }
505
      break;
506
 
507
    case TIMESTAMP:
508
      if (value == null) {
509
        unsetTimestamp();
510
      } else {
511
        setTimestamp((Long)value);
512
      }
513
      break;
514
 
515
    }
516
  }
517
 
518
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
1424 varun.gupt 520
    case ID:
3430 rajveer 521
      return Long.valueOf(getId());
1424 varun.gupt 522
 
1396 varun.gupt 523
    case EMAIL_TO:
524
      return getEmailTo();
525
 
526
    case EMAIL_FROM:
527
      return getEmailFrom();
528
 
529
    case SUBJECT:
530
      return getSubject();
531
 
532
    case BODY:
533
      return getBody();
534
 
535
    case SOURCE:
536
      return getSource();
537
 
538
    case EMAIL_TYPE:
539
      return getEmailType();
540
 
541
    case STATUS:
3430 rajveer 542
      return Boolean.valueOf(isStatus());
1396 varun.gupt 543
 
544
    case TIMESTAMP:
3430 rajveer 545
      return Long.valueOf(getTimestamp());
1396 varun.gupt 546
 
547
    }
548
    throw new IllegalStateException();
549
  }
550
 
3430 rajveer 551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
552
  public boolean isSet(_Fields field) {
553
    if (field == null) {
554
      throw new IllegalArgumentException();
555
    }
1396 varun.gupt 556
 
557
    switch (field) {
1424 varun.gupt 558
    case ID:
559
      return isSetId();
1396 varun.gupt 560
    case EMAIL_TO:
561
      return isSetEmailTo();
562
    case EMAIL_FROM:
563
      return isSetEmailFrom();
564
    case SUBJECT:
565
      return isSetSubject();
566
    case BODY:
567
      return isSetBody();
568
    case SOURCE:
569
      return isSetSource();
570
    case EMAIL_TYPE:
571
      return isSetEmailType();
572
    case STATUS:
573
      return isSetStatus();
574
    case TIMESTAMP:
575
      return isSetTimestamp();
576
    }
577
    throw new IllegalStateException();
578
  }
579
 
580
  @Override
581
  public boolean equals(Object that) {
582
    if (that == null)
583
      return false;
584
    if (that instanceof UserEmail)
585
      return this.equals((UserEmail)that);
586
    return false;
587
  }
588
 
589
  public boolean equals(UserEmail that) {
590
    if (that == null)
591
      return false;
592
 
1424 varun.gupt 593
    boolean this_present_id = true;
594
    boolean that_present_id = true;
595
    if (this_present_id || that_present_id) {
596
      if (!(this_present_id && that_present_id))
597
        return false;
598
      if (this.id != that.id)
599
        return false;
600
    }
601
 
1396 varun.gupt 602
    boolean this_present_emailTo = true && this.isSetEmailTo();
603
    boolean that_present_emailTo = true && that.isSetEmailTo();
604
    if (this_present_emailTo || that_present_emailTo) {
605
      if (!(this_present_emailTo && that_present_emailTo))
606
        return false;
607
      if (!this.emailTo.equals(that.emailTo))
608
        return false;
609
    }
610
 
611
    boolean this_present_emailFrom = true && this.isSetEmailFrom();
612
    boolean that_present_emailFrom = true && that.isSetEmailFrom();
613
    if (this_present_emailFrom || that_present_emailFrom) {
614
      if (!(this_present_emailFrom && that_present_emailFrom))
615
        return false;
616
      if (!this.emailFrom.equals(that.emailFrom))
617
        return false;
618
    }
619
 
620
    boolean this_present_subject = true && this.isSetSubject();
621
    boolean that_present_subject = true && that.isSetSubject();
622
    if (this_present_subject || that_present_subject) {
623
      if (!(this_present_subject && that_present_subject))
624
        return false;
625
      if (!this.subject.equals(that.subject))
626
        return false;
627
    }
628
 
629
    boolean this_present_body = true && this.isSetBody();
630
    boolean that_present_body = true && that.isSetBody();
631
    if (this_present_body || that_present_body) {
632
      if (!(this_present_body && that_present_body))
633
        return false;
634
      if (!this.body.equals(that.body))
635
        return false;
636
    }
637
 
638
    boolean this_present_source = true && this.isSetSource();
639
    boolean that_present_source = true && that.isSetSource();
640
    if (this_present_source || that_present_source) {
641
      if (!(this_present_source && that_present_source))
642
        return false;
643
      if (!this.source.equals(that.source))
644
        return false;
645
    }
646
 
647
    boolean this_present_emailType = true && this.isSetEmailType();
648
    boolean that_present_emailType = true && that.isSetEmailType();
649
    if (this_present_emailType || that_present_emailType) {
650
      if (!(this_present_emailType && that_present_emailType))
651
        return false;
652
      if (!this.emailType.equals(that.emailType))
653
        return false;
654
    }
655
 
656
    boolean this_present_status = true;
657
    boolean that_present_status = true;
658
    if (this_present_status || that_present_status) {
659
      if (!(this_present_status && that_present_status))
660
        return false;
661
      if (this.status != that.status)
662
        return false;
663
    }
664
 
665
    boolean this_present_timestamp = true;
666
    boolean that_present_timestamp = true;
667
    if (this_present_timestamp || that_present_timestamp) {
668
      if (!(this_present_timestamp && that_present_timestamp))
669
        return false;
670
      if (this.timestamp != that.timestamp)
671
        return false;
672
    }
673
 
674
    return true;
675
  }
676
 
677
  @Override
678
  public int hashCode() {
679
    return 0;
680
  }
681
 
682
  public int compareTo(UserEmail other) {
683
    if (!getClass().equals(other.getClass())) {
684
      return getClass().getName().compareTo(other.getClass().getName());
685
    }
686
 
687
    int lastComparison = 0;
688
    UserEmail typedOther = (UserEmail)other;
689
 
3430 rajveer 690
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
1424 varun.gupt 691
    if (lastComparison != 0) {
692
      return lastComparison;
693
    }
3430 rajveer 694
    if (isSetId()) {
695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
696
      if (lastComparison != 0) {
697
        return lastComparison;
698
      }
1424 varun.gupt 699
    }
3430 rajveer 700
    lastComparison = Boolean.valueOf(isSetEmailTo()).compareTo(typedOther.isSetEmailTo());
1396 varun.gupt 701
    if (lastComparison != 0) {
702
      return lastComparison;
703
    }
3430 rajveer 704
    if (isSetEmailTo()) {
705
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailTo, typedOther.emailTo);
706
      if (lastComparison != 0) {
707
        return lastComparison;
708
      }
1396 varun.gupt 709
    }
3430 rajveer 710
    lastComparison = Boolean.valueOf(isSetEmailFrom()).compareTo(typedOther.isSetEmailFrom());
1396 varun.gupt 711
    if (lastComparison != 0) {
712
      return lastComparison;
713
    }
3430 rajveer 714
    if (isSetEmailFrom()) {
715
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailFrom, typedOther.emailFrom);
716
      if (lastComparison != 0) {
717
        return lastComparison;
718
      }
1396 varun.gupt 719
    }
3430 rajveer 720
    lastComparison = Boolean.valueOf(isSetSubject()).compareTo(typedOther.isSetSubject());
1396 varun.gupt 721
    if (lastComparison != 0) {
722
      return lastComparison;
723
    }
3430 rajveer 724
    if (isSetSubject()) {
725
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subject, typedOther.subject);
726
      if (lastComparison != 0) {
727
        return lastComparison;
728
      }
1396 varun.gupt 729
    }
3430 rajveer 730
    lastComparison = Boolean.valueOf(isSetBody()).compareTo(typedOther.isSetBody());
1396 varun.gupt 731
    if (lastComparison != 0) {
732
      return lastComparison;
733
    }
3430 rajveer 734
    if (isSetBody()) {
735
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, typedOther.body);
736
      if (lastComparison != 0) {
737
        return lastComparison;
738
      }
1396 varun.gupt 739
    }
3430 rajveer 740
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
1396 varun.gupt 741
    if (lastComparison != 0) {
742
      return lastComparison;
743
    }
3430 rajveer 744
    if (isSetSource()) {
745
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
746
      if (lastComparison != 0) {
747
        return lastComparison;
748
      }
1396 varun.gupt 749
    }
3430 rajveer 750
    lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(typedOther.isSetEmailType());
1396 varun.gupt 751
    if (lastComparison != 0) {
752
      return lastComparison;
753
    }
3430 rajveer 754
    if (isSetEmailType()) {
755
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailType, typedOther.emailType);
756
      if (lastComparison != 0) {
757
        return lastComparison;
758
      }
1396 varun.gupt 759
    }
3430 rajveer 760
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
1396 varun.gupt 761
    if (lastComparison != 0) {
762
      return lastComparison;
763
    }
3430 rajveer 764
    if (isSetStatus()) {
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
766
      if (lastComparison != 0) {
767
        return lastComparison;
768
      }
1396 varun.gupt 769
    }
3430 rajveer 770
    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
1396 varun.gupt 771
    if (lastComparison != 0) {
772
      return lastComparison;
773
    }
3430 rajveer 774
    if (isSetTimestamp()) {
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
776
      if (lastComparison != 0) {
777
        return lastComparison;
778
      }
1396 varun.gupt 779
    }
780
    return 0;
781
  }
782
 
3430 rajveer 783
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
785
  }
786
 
787
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
788
    org.apache.thrift.protocol.TField field;
1396 varun.gupt 789
    iprot.readStructBegin();
790
    while (true)
791
    {
792
      field = iprot.readFieldBegin();
3430 rajveer 793
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1396 varun.gupt 794
        break;
795
      }
3430 rajveer 796
      switch (field.id) {
797
        case 1: // ID
798
          if (field.type == org.apache.thrift.protocol.TType.I64) {
799
            this.id = iprot.readI64();
800
            setIdIsSet(true);
801
          } else { 
802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
803
          }
804
          break;
805
        case 2: // EMAIL_TO
806
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
807
            this.emailTo = iprot.readString();
808
          } else { 
809
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
810
          }
811
          break;
812
        case 3: // EMAIL_FROM
813
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
814
            this.emailFrom = iprot.readString();
815
          } else { 
816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
817
          }
818
          break;
819
        case 4: // SUBJECT
820
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
821
            this.subject = iprot.readString();
822
          } else { 
823
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
824
          }
825
          break;
826
        case 5: // BODY
827
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
828
            this.body = iprot.readString();
829
          } else { 
830
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
831
          }
832
          break;
833
        case 6: // SOURCE
834
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
835
            this.source = iprot.readString();
836
          } else { 
837
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
838
          }
839
          break;
840
        case 7: // EMAIL_TYPE
841
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
842
            this.emailType = iprot.readString();
843
          } else { 
844
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
845
          }
846
          break;
847
        case 8: // STATUS
848
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
849
            this.status = iprot.readBool();
850
            setStatusIsSet(true);
851
          } else { 
852
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
853
          }
854
          break;
855
        case 9: // TIMESTAMP
856
          if (field.type == org.apache.thrift.protocol.TType.I64) {
857
            this.timestamp = iprot.readI64();
858
            setTimestampIsSet(true);
859
          } else { 
860
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
861
          }
862
          break;
863
        default:
864
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1396 varun.gupt 865
      }
3430 rajveer 866
      iprot.readFieldEnd();
1396 varun.gupt 867
    }
868
    iprot.readStructEnd();
869
    validate();
870
  }
871
 
3430 rajveer 872
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1396 varun.gupt 873
    validate();
874
 
875
    oprot.writeStructBegin(STRUCT_DESC);
1424 varun.gupt 876
    oprot.writeFieldBegin(ID_FIELD_DESC);
877
    oprot.writeI64(this.id);
878
    oprot.writeFieldEnd();
1396 varun.gupt 879
    if (this.emailTo != null) {
880
      oprot.writeFieldBegin(EMAIL_TO_FIELD_DESC);
881
      oprot.writeString(this.emailTo);
882
      oprot.writeFieldEnd();
883
    }
884
    if (this.emailFrom != null) {
885
      oprot.writeFieldBegin(EMAIL_FROM_FIELD_DESC);
886
      oprot.writeString(this.emailFrom);
887
      oprot.writeFieldEnd();
888
    }
889
    if (this.subject != null) {
890
      oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
891
      oprot.writeString(this.subject);
892
      oprot.writeFieldEnd();
893
    }
894
    if (this.body != null) {
895
      oprot.writeFieldBegin(BODY_FIELD_DESC);
896
      oprot.writeString(this.body);
897
      oprot.writeFieldEnd();
898
    }
899
    if (this.source != null) {
900
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
901
      oprot.writeString(this.source);
902
      oprot.writeFieldEnd();
903
    }
904
    if (this.emailType != null) {
905
      oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);
906
      oprot.writeString(this.emailType);
907
      oprot.writeFieldEnd();
908
    }
909
    oprot.writeFieldBegin(STATUS_FIELD_DESC);
910
    oprot.writeBool(this.status);
911
    oprot.writeFieldEnd();
912
    oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
913
    oprot.writeI64(this.timestamp);
914
    oprot.writeFieldEnd();
915
    oprot.writeFieldStop();
916
    oprot.writeStructEnd();
917
  }
918
 
919
  @Override
920
  public String toString() {
921
    StringBuilder sb = new StringBuilder("UserEmail(");
922
    boolean first = true;
923
 
1424 varun.gupt 924
    sb.append("id:");
925
    sb.append(this.id);
926
    first = false;
927
    if (!first) sb.append(", ");
1396 varun.gupt 928
    sb.append("emailTo:");
929
    if (this.emailTo == null) {
930
      sb.append("null");
931
    } else {
932
      sb.append(this.emailTo);
933
    }
934
    first = false;
935
    if (!first) sb.append(", ");
936
    sb.append("emailFrom:");
937
    if (this.emailFrom == null) {
938
      sb.append("null");
939
    } else {
940
      sb.append(this.emailFrom);
941
    }
942
    first = false;
943
    if (!first) sb.append(", ");
944
    sb.append("subject:");
945
    if (this.subject == null) {
946
      sb.append("null");
947
    } else {
948
      sb.append(this.subject);
949
    }
950
    first = false;
951
    if (!first) sb.append(", ");
952
    sb.append("body:");
953
    if (this.body == null) {
954
      sb.append("null");
955
    } else {
956
      sb.append(this.body);
957
    }
958
    first = false;
959
    if (!first) sb.append(", ");
960
    sb.append("source:");
961
    if (this.source == null) {
962
      sb.append("null");
963
    } else {
964
      sb.append(this.source);
965
    }
966
    first = false;
967
    if (!first) sb.append(", ");
968
    sb.append("emailType:");
969
    if (this.emailType == null) {
970
      sb.append("null");
971
    } else {
972
      sb.append(this.emailType);
973
    }
974
    first = false;
975
    if (!first) sb.append(", ");
976
    sb.append("status:");
977
    sb.append(this.status);
978
    first = false;
979
    if (!first) sb.append(", ");
980
    sb.append("timestamp:");
981
    sb.append(this.timestamp);
982
    first = false;
983
    sb.append(")");
984
    return sb.toString();
985
  }
986
 
3430 rajveer 987
  public void validate() throws org.apache.thrift.TException {
1396 varun.gupt 988
    // check for required fields
989
  }
990
 
3430 rajveer 991
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
992
    try {
993
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
994
    } catch (org.apache.thrift.TException te) {
995
      throw new java.io.IOException(te);
996
    }
997
  }
998
 
999
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1000
    try {
1001
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1002
      __isset_bit_vector = new BitSet(1);
1003
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1004
    } catch (org.apache.thrift.TException te) {
1005
      throw new java.io.IOException(te);
1006
    }
1007
  }
1008
 
1396 varun.gupt 1009
}
1010