Rev 3430 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.utils;import java.util.List;import java.util.ArrayList;import java.util.Map;import java.util.HashMap;import java.util.EnumMap;import java.util.Set;import java.util.HashSet;import java.util.EnumSet;import java.util.Collections;import java.util.BitSet;import java.nio.ByteBuffer;import java.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;public class UserEmail implements org.apache.thrift.TBase<UserEmail, UserEmail._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserEmail");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);private static final org.apache.thrift.protocol.TField EMAIL_TO_FIELD_DESC = new org.apache.thrift.protocol.TField("emailTo", org.apache.thrift.protocol.TType.LIST, (short)2);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);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);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);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);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);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);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);private static final org.apache.thrift.protocol.TField CC_FIELD_DESC = new org.apache.thrift.protocol.TField("cc", org.apache.thrift.protocol.TType.LIST, (short)10);private static final org.apache.thrift.protocol.TField BCC_FIELD_DESC = new org.apache.thrift.protocol.TField("bcc", org.apache.thrift.protocol.TType.LIST, (short)11);private long id; // requiredprivate List<String> emailTo; // requiredprivate String emailFrom; // requiredprivate String subject; // requiredprivate String body; // requiredprivate String source; // requiredprivate String emailType; // requiredprivate boolean status; // requiredprivate long timestamp; // requiredprivate List<String> cc; // requiredprivate List<String> bcc; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ID((short)1, "id"),EMAIL_TO((short)2, "emailTo"),EMAIL_FROM((short)3, "emailFrom"),SUBJECT((short)4, "subject"),BODY((short)5, "body"),SOURCE((short)6, "source"),EMAIL_TYPE((short)7, "emailType"),STATUS((short)8, "status"),TIMESTAMP((short)9, "timestamp"),CC((short)10, "cc"),BCC((short)11, "bcc");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // IDreturn ID;case 2: // EMAIL_TOreturn EMAIL_TO;case 3: // EMAIL_FROMreturn EMAIL_FROM;case 4: // SUBJECTreturn SUBJECT;case 5: // BODYreturn BODY;case 6: // SOURCEreturn SOURCE;case 7: // EMAIL_TYPEreturn EMAIL_TYPE;case 8: // STATUSreturn STATUS;case 9: // TIMESTAMPreturn TIMESTAMP;case 10: // CCreturn CC;case 11: // BCCreturn BCC;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __ID_ISSET_ID = 0;private static final int __STATUS_ISSET_ID = 1;private static final int __TIMESTAMP_ISSET_ID = 2;private BitSet __isset_bit_vector = new BitSet(3);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.EMAIL_TO, new org.apache.thrift.meta_data.FieldMetaData("emailTo", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));tmpMap.put(_Fields.EMAIL_FROM, new org.apache.thrift.meta_data.FieldMetaData("emailFrom", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SUBJECT, new org.apache.thrift.meta_data.FieldMetaData("subject", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.BODY, new org.apache.thrift.meta_data.FieldMetaData("body", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.EMAIL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("emailType", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.CC, new org.apache.thrift.meta_data.FieldMetaData("cc", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));tmpMap.put(_Fields.BCC, new org.apache.thrift.meta_data.FieldMetaData("bcc", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserEmail.class, metaDataMap);}public UserEmail() {}public UserEmail(long id,List<String> emailTo,String emailFrom,String subject,String body,String source,String emailType,boolean status,long timestamp,List<String> cc,List<String> bcc){this();this.id = id;setIdIsSet(true);this.emailTo = emailTo;this.emailFrom = emailFrom;this.subject = subject;this.body = body;this.source = source;this.emailType = emailType;this.status = status;setStatusIsSet(true);this.timestamp = timestamp;setTimestampIsSet(true);this.cc = cc;this.bcc = bcc;}/*** Performs a deep copy on <i>other</i>.*/public UserEmail(UserEmail other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetEmailTo()) {List<String> __this__emailTo = new ArrayList<String>();for (String other_element : other.emailTo) {__this__emailTo.add(other_element);}this.emailTo = __this__emailTo;}if (other.isSetEmailFrom()) {this.emailFrom = other.emailFrom;}if (other.isSetSubject()) {this.subject = other.subject;}if (other.isSetBody()) {this.body = other.body;}if (other.isSetSource()) {this.source = other.source;}if (other.isSetEmailType()) {this.emailType = other.emailType;}this.status = other.status;this.timestamp = other.timestamp;if (other.isSetCc()) {List<String> __this__cc = new ArrayList<String>();for (String other_element : other.cc) {__this__cc.add(other_element);}this.cc = __this__cc;}if (other.isSetBcc()) {List<String> __this__bcc = new ArrayList<String>();for (String other_element : other.bcc) {__this__bcc.add(other_element);}this.bcc = __this__bcc;}}public UserEmail deepCopy() {return new UserEmail(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;this.emailTo = null;this.emailFrom = null;this.subject = null;this.body = null;this.source = null;this.emailType = null;setStatusIsSet(false);this.status = false;setTimestampIsSet(false);this.timestamp = 0;this.cc = null;this.bcc = null;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public int getEmailToSize() {return (this.emailTo == null) ? 0 : this.emailTo.size();}public java.util.Iterator<String> getEmailToIterator() {return (this.emailTo == null) ? null : this.emailTo.iterator();}public void addToEmailTo(String elem) {if (this.emailTo == null) {this.emailTo = new ArrayList<String>();}this.emailTo.add(elem);}public List<String> getEmailTo() {return this.emailTo;}public void setEmailTo(List<String> emailTo) {this.emailTo = emailTo;}public void unsetEmailTo() {this.emailTo = null;}/** Returns true if field emailTo is set (has been assigned a value) and false otherwise */public boolean isSetEmailTo() {return this.emailTo != null;}public void setEmailToIsSet(boolean value) {if (!value) {this.emailTo = null;}}public String getEmailFrom() {return this.emailFrom;}public void setEmailFrom(String emailFrom) {this.emailFrom = emailFrom;}public void unsetEmailFrom() {this.emailFrom = null;}/** Returns true if field emailFrom is set (has been assigned a value) and false otherwise */public boolean isSetEmailFrom() {return this.emailFrom != null;}public void setEmailFromIsSet(boolean value) {if (!value) {this.emailFrom = null;}}public String getSubject() {return this.subject;}public void setSubject(String subject) {this.subject = subject;}public void unsetSubject() {this.subject = null;}/** Returns true if field subject is set (has been assigned a value) and false otherwise */public boolean isSetSubject() {return this.subject != null;}public void setSubjectIsSet(boolean value) {if (!value) {this.subject = null;}}public String getBody() {return this.body;}public void setBody(String body) {this.body = body;}public void unsetBody() {this.body = null;}/** Returns true if field body is set (has been assigned a value) and false otherwise */public boolean isSetBody() {return this.body != null;}public void setBodyIsSet(boolean value) {if (!value) {this.body = null;}}public String getSource() {return this.source;}public void setSource(String source) {this.source = source;}public void unsetSource() {this.source = null;}/** Returns true if field source is set (has been assigned a value) and false otherwise */public boolean isSetSource() {return this.source != null;}public void setSourceIsSet(boolean value) {if (!value) {this.source = null;}}public String getEmailType() {return this.emailType;}public void setEmailType(String emailType) {this.emailType = emailType;}public void unsetEmailType() {this.emailType = null;}/** Returns true if field emailType is set (has been assigned a value) and false otherwise */public boolean isSetEmailType() {return this.emailType != null;}public void setEmailTypeIsSet(boolean value) {if (!value) {this.emailType = null;}}public boolean isStatus() {return this.status;}public void setStatus(boolean status) {this.status = status;setStatusIsSet(true);}public void unsetStatus() {__isset_bit_vector.clear(__STATUS_ISSET_ID);}/** Returns true if field status is set (has been assigned a value) and false otherwise */public boolean isSetStatus() {return __isset_bit_vector.get(__STATUS_ISSET_ID);}public void setStatusIsSet(boolean value) {__isset_bit_vector.set(__STATUS_ISSET_ID, value);}public long getTimestamp() {return this.timestamp;}public void setTimestamp(long timestamp) {this.timestamp = timestamp;setTimestampIsSet(true);}public void unsetTimestamp() {__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);}/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */public boolean isSetTimestamp() {return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);}public void setTimestampIsSet(boolean value) {__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);}public int getCcSize() {return (this.cc == null) ? 0 : this.cc.size();}public java.util.Iterator<String> getCcIterator() {return (this.cc == null) ? null : this.cc.iterator();}public void addToCc(String elem) {if (this.cc == null) {this.cc = new ArrayList<String>();}this.cc.add(elem);}public List<String> getCc() {return this.cc;}public void setCc(List<String> cc) {this.cc = cc;}public void unsetCc() {this.cc = null;}/** Returns true if field cc is set (has been assigned a value) and false otherwise */public boolean isSetCc() {return this.cc != null;}public void setCcIsSet(boolean value) {if (!value) {this.cc = null;}}public int getBccSize() {return (this.bcc == null) ? 0 : this.bcc.size();}public java.util.Iterator<String> getBccIterator() {return (this.bcc == null) ? null : this.bcc.iterator();}public void addToBcc(String elem) {if (this.bcc == null) {this.bcc = new ArrayList<String>();}this.bcc.add(elem);}public List<String> getBcc() {return this.bcc;}public void setBcc(List<String> bcc) {this.bcc = bcc;}public void unsetBcc() {this.bcc = null;}/** Returns true if field bcc is set (has been assigned a value) and false otherwise */public boolean isSetBcc() {return this.bcc != null;}public void setBccIsSet(boolean value) {if (!value) {this.bcc = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case EMAIL_TO:if (value == null) {unsetEmailTo();} else {setEmailTo((List<String>)value);}break;case EMAIL_FROM:if (value == null) {unsetEmailFrom();} else {setEmailFrom((String)value);}break;case SUBJECT:if (value == null) {unsetSubject();} else {setSubject((String)value);}break;case BODY:if (value == null) {unsetBody();} else {setBody((String)value);}break;case SOURCE:if (value == null) {unsetSource();} else {setSource((String)value);}break;case EMAIL_TYPE:if (value == null) {unsetEmailType();} else {setEmailType((String)value);}break;case STATUS:if (value == null) {unsetStatus();} else {setStatus((Boolean)value);}break;case TIMESTAMP:if (value == null) {unsetTimestamp();} else {setTimestamp((Long)value);}break;case CC:if (value == null) {unsetCc();} else {setCc((List<String>)value);}break;case BCC:if (value == null) {unsetBcc();} else {setBcc((List<String>)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());case EMAIL_TO:return getEmailTo();case EMAIL_FROM:return getEmailFrom();case SUBJECT:return getSubject();case BODY:return getBody();case SOURCE:return getSource();case EMAIL_TYPE:return getEmailType();case STATUS:return Boolean.valueOf(isStatus());case TIMESTAMP:return Long.valueOf(getTimestamp());case CC:return getCc();case BCC:return getBcc();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ID:return isSetId();case EMAIL_TO:return isSetEmailTo();case EMAIL_FROM:return isSetEmailFrom();case SUBJECT:return isSetSubject();case BODY:return isSetBody();case SOURCE:return isSetSource();case EMAIL_TYPE:return isSetEmailType();case STATUS:return isSetStatus();case TIMESTAMP:return isSetTimestamp();case CC:return isSetCc();case BCC:return isSetBcc();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof UserEmail)return this.equals((UserEmail)that);return false;}public boolean equals(UserEmail that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}boolean this_present_emailTo = true && this.isSetEmailTo();boolean that_present_emailTo = true && that.isSetEmailTo();if (this_present_emailTo || that_present_emailTo) {if (!(this_present_emailTo && that_present_emailTo))return false;if (!this.emailTo.equals(that.emailTo))return false;}boolean this_present_emailFrom = true && this.isSetEmailFrom();boolean that_present_emailFrom = true && that.isSetEmailFrom();if (this_present_emailFrom || that_present_emailFrom) {if (!(this_present_emailFrom && that_present_emailFrom))return false;if (!this.emailFrom.equals(that.emailFrom))return false;}boolean this_present_subject = true && this.isSetSubject();boolean that_present_subject = true && that.isSetSubject();if (this_present_subject || that_present_subject) {if (!(this_present_subject && that_present_subject))return false;if (!this.subject.equals(that.subject))return false;}boolean this_present_body = true && this.isSetBody();boolean that_present_body = true && that.isSetBody();if (this_present_body || that_present_body) {if (!(this_present_body && that_present_body))return false;if (!this.body.equals(that.body))return false;}boolean this_present_source = true && this.isSetSource();boolean that_present_source = true && that.isSetSource();if (this_present_source || that_present_source) {if (!(this_present_source && that_present_source))return false;if (!this.source.equals(that.source))return false;}boolean this_present_emailType = true && this.isSetEmailType();boolean that_present_emailType = true && that.isSetEmailType();if (this_present_emailType || that_present_emailType) {if (!(this_present_emailType && that_present_emailType))return false;if (!this.emailType.equals(that.emailType))return false;}boolean this_present_status = true;boolean that_present_status = true;if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (this.status != that.status)return false;}boolean this_present_timestamp = true;boolean that_present_timestamp = true;if (this_present_timestamp || that_present_timestamp) {if (!(this_present_timestamp && that_present_timestamp))return false;if (this.timestamp != that.timestamp)return false;}boolean this_present_cc = true && this.isSetCc();boolean that_present_cc = true && that.isSetCc();if (this_present_cc || that_present_cc) {if (!(this_present_cc && that_present_cc))return false;if (!this.cc.equals(that.cc))return false;}boolean this_present_bcc = true && this.isSetBcc();boolean that_present_bcc = true && that.isSetBcc();if (this_present_bcc || that_present_bcc) {if (!(this_present_bcc && that_present_bcc))return false;if (!this.bcc.equals(that.bcc))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(UserEmail other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;UserEmail typedOther = (UserEmail)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEmailTo()).compareTo(typedOther.isSetEmailTo());if (lastComparison != 0) {return lastComparison;}if (isSetEmailTo()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailTo, typedOther.emailTo);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEmailFrom()).compareTo(typedOther.isSetEmailFrom());if (lastComparison != 0) {return lastComparison;}if (isSetEmailFrom()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailFrom, typedOther.emailFrom);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSubject()).compareTo(typedOther.isSetSubject());if (lastComparison != 0) {return lastComparison;}if (isSetSubject()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subject, typedOther.subject);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetBody()).compareTo(typedOther.isSetBody());if (lastComparison != 0) {return lastComparison;}if (isSetBody()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.body, typedOther.body);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());if (lastComparison != 0) {return lastComparison;}if (isSetSource()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetEmailType()).compareTo(typedOther.isSetEmailType());if (lastComparison != 0) {return lastComparison;}if (isSetEmailType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailType, typedOther.emailType);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());if (lastComparison != 0) {return lastComparison;}if (isSetStatus()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());if (lastComparison != 0) {return lastComparison;}if (isSetTimestamp()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCc()).compareTo(typedOther.isSetCc());if (lastComparison != 0) {return lastComparison;}if (isSetCc()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cc, typedOther.cc);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetBcc()).compareTo(typedOther.isSetBcc());if (lastComparison != 0) {return lastComparison;}if (isSetBcc()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bcc, typedOther.bcc);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // EMAIL_TOif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();this.emailTo = new ArrayList<String>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){String _elem10; // required_elem10 = iprot.readString();this.emailTo.add(_elem10);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // EMAIL_FROMif (field.type == org.apache.thrift.protocol.TType.STRING) {this.emailFrom = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // SUBJECTif (field.type == org.apache.thrift.protocol.TType.STRING) {this.subject = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // BODYif (field.type == org.apache.thrift.protocol.TType.STRING) {this.body = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // SOURCEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.source = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // EMAIL_TYPEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.emailType = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // STATUSif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.status = iprot.readBool();setStatusIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // TIMESTAMPif (field.type == org.apache.thrift.protocol.TType.I64) {this.timestamp = iprot.readI64();setTimestampIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // CCif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();this.cc = new ArrayList<String>(_list11.size);for (int _i12 = 0; _i12 < _list11.size; ++_i12){String _elem13; // required_elem13 = iprot.readString();this.cc.add(_elem13);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 11: // BCCif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list14 = iprot.readListBegin();this.bcc = new ArrayList<String>(_list14.size);for (int _i15 = 0; _i15 < _list14.size; ++_i15){String _elem16; // required_elem16 = iprot.readString();this.bcc.add(_elem16);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();if (this.emailTo != null) {oprot.writeFieldBegin(EMAIL_TO_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.emailTo.size()));for (String _iter17 : this.emailTo){oprot.writeString(_iter17);}oprot.writeListEnd();}oprot.writeFieldEnd();}if (this.emailFrom != null) {oprot.writeFieldBegin(EMAIL_FROM_FIELD_DESC);oprot.writeString(this.emailFrom);oprot.writeFieldEnd();}if (this.subject != null) {oprot.writeFieldBegin(SUBJECT_FIELD_DESC);oprot.writeString(this.subject);oprot.writeFieldEnd();}if (this.body != null) {oprot.writeFieldBegin(BODY_FIELD_DESC);oprot.writeString(this.body);oprot.writeFieldEnd();}if (this.source != null) {oprot.writeFieldBegin(SOURCE_FIELD_DESC);oprot.writeString(this.source);oprot.writeFieldEnd();}if (this.emailType != null) {oprot.writeFieldBegin(EMAIL_TYPE_FIELD_DESC);oprot.writeString(this.emailType);oprot.writeFieldEnd();}oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeBool(this.status);oprot.writeFieldEnd();oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);oprot.writeI64(this.timestamp);oprot.writeFieldEnd();if (this.cc != null) {oprot.writeFieldBegin(CC_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.cc.size()));for (String _iter18 : this.cc){oprot.writeString(_iter18);}oprot.writeListEnd();}oprot.writeFieldEnd();}if (this.bcc != null) {oprot.writeFieldBegin(BCC_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.bcc.size()));for (String _iter19 : this.bcc){oprot.writeString(_iter19);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("UserEmail(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("emailTo:");if (this.emailTo == null) {sb.append("null");} else {sb.append(this.emailTo);}first = false;if (!first) sb.append(", ");sb.append("emailFrom:");if (this.emailFrom == null) {sb.append("null");} else {sb.append(this.emailFrom);}first = false;if (!first) sb.append(", ");sb.append("subject:");if (this.subject == null) {sb.append("null");} else {sb.append(this.subject);}first = false;if (!first) sb.append(", ");sb.append("body:");if (this.body == null) {sb.append("null");} else {sb.append(this.body);}first = false;if (!first) sb.append(", ");sb.append("source:");if (this.source == null) {sb.append("null");} else {sb.append(this.source);}first = false;if (!first) sb.append(", ");sb.append("emailType:");if (this.emailType == null) {sb.append("null");} else {sb.append(this.emailType);}first = false;if (!first) sb.append(", ");sb.append("status:");sb.append(this.status);first = false;if (!first) sb.append(", ");sb.append("timestamp:");sb.append(this.timestamp);first = false;if (!first) sb.append(", ");sb.append("cc:");if (this.cc == null) {sb.append("null");} else {sb.append(this.cc);}first = false;if (!first) sb.append(", ");sb.append("bcc:");if (this.bcc == null) {sb.append("null");} else {sb.append(this.bcc);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.__isset_bit_vector = new BitSet(1);read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}