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