Blame | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.model.v1.user;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.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.apache.thrift.*;import org.apache.thrift.meta_data.*;import org.apache.thrift.protocol.*;/*** dynamic user state* **/public class UserState implements TBase<UserState._Fields>, java.io.Serializable, Cloneable, Comparable<UserState> {private static final TStruct STRUCT_DESC = new TStruct("UserState");private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);private static final TField IS_EMAIL_VERIFIED_FIELD_DESC = new TField("isEmailVerified", TType.BOOL, (short)2);private static final TField LAST_LOGIN_FIELD_DESC = new TField("lastLogin", TType.I64, (short)3);private static final TField LAST_LOGOUT_FIELD_DESC = new TField("lastLogout", TType.I64, (short)4);private static final TField EMAIL_VERIFICATION_SENT_ON_FIELD_DESC = new TField("emailVerificationSentOn", TType.I64, (short)5);private static final TField SMS_VERIFICATION_SENT_ON_FIELD_DESC = new TField("smsVerificationSentOn", TType.I64, (short)6);private static final TField IS_SMSVERIFIED_FIELD_DESC = new TField("isSMSVerified", TType.BOOL, (short)7);private static final TField ACTIVE_SINCE_FIELD_DESC = new TField("activeSince", TType.I64, (short)8);private static final TField IS_LOGGED_IN_FIELD_DESC = new TField("isLoggedIn", TType.BOOL, (short)9);private static final TField IPS_FIELD_DESC = new TField("ips", TType.LIST, (short)10);private static final TField SHOPPING_CART_HANDLE_FIELD_DESC = new TField("shoppingCartHandle", TType.I64, (short)11);private long userId;private boolean isEmailVerified;private long lastLogin;private long lastLogout;private long emailVerificationSentOn;private long smsVerificationSentOn;private boolean isSMSVerified;private long activeSince;private boolean isLoggedIn;private List<IPMap> ips;private long shoppingCartHandle;/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements TFieldIdEnum {USER_ID((short)1, "userId"),IS_EMAIL_VERIFIED((short)2, "isEmailVerified"),LAST_LOGIN((short)3, "lastLogin"),LAST_LOGOUT((short)4, "lastLogout"),EMAIL_VERIFICATION_SENT_ON((short)5, "emailVerificationSentOn"),SMS_VERIFICATION_SENT_ON((short)6, "smsVerificationSentOn"),IS_SMSVERIFIED((short)7, "isSMSVerified"),ACTIVE_SINCE((short)8, "activeSince"),IS_LOGGED_IN((short)9, "isLoggedIn"),IPS((short)10, "ips"),SHOPPING_CART_HANDLE((short)11, "shoppingCartHandle");private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byId.put((int)field._thriftId, field);byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {return byId.get(fieldId);}/*** 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 __USERID_ISSET_ID = 0;private static final int __ISEMAILVERIFIED_ISSET_ID = 1;private static final int __LASTLOGIN_ISSET_ID = 2;private static final int __LASTLOGOUT_ISSET_ID = 3;private static final int __EMAILVERIFICATIONSENTON_ISSET_ID = 4;private static final int __SMSVERIFICATIONSENTON_ISSET_ID = 5;private static final int __ISSMSVERIFIED_ISSET_ID = 6;private static final int __ACTIVESINCE_ISSET_ID = 7;private static final int __ISLOGGEDIN_ISSET_ID = 8;private static final int __SHOPPINGCARTHANDLE_ISSET_ID = 9;private BitSet __isset_bit_vector = new BitSet(10);public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.IS_EMAIL_VERIFIED, new FieldMetaData("isEmailVerified", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.BOOL)));put(_Fields.LAST_LOGIN, new FieldMetaData("lastLogin", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.LAST_LOGOUT, new FieldMetaData("lastLogout", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.EMAIL_VERIFICATION_SENT_ON, new FieldMetaData("emailVerificationSentOn", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.SMS_VERIFICATION_SENT_ON, new FieldMetaData("smsVerificationSentOn", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.IS_SMSVERIFIED, new FieldMetaData("isSMSVerified", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.BOOL)));put(_Fields.ACTIVE_SINCE, new FieldMetaData("activeSince", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));put(_Fields.IS_LOGGED_IN, new FieldMetaData("isLoggedIn", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.BOOL)));put(_Fields.IPS, new FieldMetaData("ips", TFieldRequirementType.DEFAULT,new ListMetaData(TType.LIST,new StructMetaData(TType.STRUCT, IPMap.class))));put(_Fields.SHOPPING_CART_HANDLE, new FieldMetaData("shoppingCartHandle", TFieldRequirementType.DEFAULT,new FieldValueMetaData(TType.I64)));}});static {FieldMetaData.addStructMetaDataMap(UserState.class, metaDataMap);}public UserState() {}public UserState(long userId,boolean isEmailVerified,long lastLogin,long lastLogout,long emailVerificationSentOn,long smsVerificationSentOn,boolean isSMSVerified,long activeSince,boolean isLoggedIn,List<IPMap> ips,long shoppingCartHandle){this();this.userId = userId;setUserIdIsSet(true);this.isEmailVerified = isEmailVerified;setIsEmailVerifiedIsSet(true);this.lastLogin = lastLogin;setLastLoginIsSet(true);this.lastLogout = lastLogout;setLastLogoutIsSet(true);this.emailVerificationSentOn = emailVerificationSentOn;setEmailVerificationSentOnIsSet(true);this.smsVerificationSentOn = smsVerificationSentOn;setSmsVerificationSentOnIsSet(true);this.isSMSVerified = isSMSVerified;setIsSMSVerifiedIsSet(true);this.activeSince = activeSince;setActiveSinceIsSet(true);this.isLoggedIn = isLoggedIn;setIsLoggedInIsSet(true);this.ips = ips;this.shoppingCartHandle = shoppingCartHandle;setShoppingCartHandleIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public UserState(UserState other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.userId = other.userId;this.isEmailVerified = other.isEmailVerified;this.lastLogin = other.lastLogin;this.lastLogout = other.lastLogout;this.emailVerificationSentOn = other.emailVerificationSentOn;this.smsVerificationSentOn = other.smsVerificationSentOn;this.isSMSVerified = other.isSMSVerified;this.activeSince = other.activeSince;this.isLoggedIn = other.isLoggedIn;if (other.isSetIps()) {List<IPMap> __this__ips = new ArrayList<IPMap>();for (IPMap other_element : other.ips) {__this__ips.add(new IPMap(other_element));}this.ips = __this__ips;}this.shoppingCartHandle = other.shoppingCartHandle;}public UserState deepCopy() {return new UserState(this);}@Deprecatedpublic UserState clone() {return new UserState(this);}public long getUserId() {return this.userId;}public UserState setUserId(long userId) {this.userId = userId;setUserIdIsSet(true);return this;}public void unsetUserId() {__isset_bit_vector.clear(__USERID_ISSET_ID);}/** Returns true if field userId is set (has been asigned a value) and false otherwise */public boolean isSetUserId() {return __isset_bit_vector.get(__USERID_ISSET_ID);}public void setUserIdIsSet(boolean value) {__isset_bit_vector.set(__USERID_ISSET_ID, value);}public boolean isIsEmailVerified() {return this.isEmailVerified;}public UserState setIsEmailVerified(boolean isEmailVerified) {this.isEmailVerified = isEmailVerified;setIsEmailVerifiedIsSet(true);return this;}public void unsetIsEmailVerified() {__isset_bit_vector.clear(__ISEMAILVERIFIED_ISSET_ID);}/** Returns true if field isEmailVerified is set (has been asigned a value) and false otherwise */public boolean isSetIsEmailVerified() {return __isset_bit_vector.get(__ISEMAILVERIFIED_ISSET_ID);}public void setIsEmailVerifiedIsSet(boolean value) {__isset_bit_vector.set(__ISEMAILVERIFIED_ISSET_ID, value);}public long getLastLogin() {return this.lastLogin;}public UserState setLastLogin(long lastLogin) {this.lastLogin = lastLogin;setLastLoginIsSet(true);return this;}public void unsetLastLogin() {__isset_bit_vector.clear(__LASTLOGIN_ISSET_ID);}/** Returns true if field lastLogin is set (has been asigned a value) and false otherwise */public boolean isSetLastLogin() {return __isset_bit_vector.get(__LASTLOGIN_ISSET_ID);}public void setLastLoginIsSet(boolean value) {__isset_bit_vector.set(__LASTLOGIN_ISSET_ID, value);}public long getLastLogout() {return this.lastLogout;}public UserState setLastLogout(long lastLogout) {this.lastLogout = lastLogout;setLastLogoutIsSet(true);return this;}public void unsetLastLogout() {__isset_bit_vector.clear(__LASTLOGOUT_ISSET_ID);}/** Returns true if field lastLogout is set (has been asigned a value) and false otherwise */public boolean isSetLastLogout() {return __isset_bit_vector.get(__LASTLOGOUT_ISSET_ID);}public void setLastLogoutIsSet(boolean value) {__isset_bit_vector.set(__LASTLOGOUT_ISSET_ID, value);}public long getEmailVerificationSentOn() {return this.emailVerificationSentOn;}public UserState setEmailVerificationSentOn(long emailVerificationSentOn) {this.emailVerificationSentOn = emailVerificationSentOn;setEmailVerificationSentOnIsSet(true);return this;}public void unsetEmailVerificationSentOn() {__isset_bit_vector.clear(__EMAILVERIFICATIONSENTON_ISSET_ID);}/** Returns true if field emailVerificationSentOn is set (has been asigned a value) and false otherwise */public boolean isSetEmailVerificationSentOn() {return __isset_bit_vector.get(__EMAILVERIFICATIONSENTON_ISSET_ID);}public void setEmailVerificationSentOnIsSet(boolean value) {__isset_bit_vector.set(__EMAILVERIFICATIONSENTON_ISSET_ID, value);}public long getSmsVerificationSentOn() {return this.smsVerificationSentOn;}public UserState setSmsVerificationSentOn(long smsVerificationSentOn) {this.smsVerificationSentOn = smsVerificationSentOn;setSmsVerificationSentOnIsSet(true);return this;}public void unsetSmsVerificationSentOn() {__isset_bit_vector.clear(__SMSVERIFICATIONSENTON_ISSET_ID);}/** Returns true if field smsVerificationSentOn is set (has been asigned a value) and false otherwise */public boolean isSetSmsVerificationSentOn() {return __isset_bit_vector.get(__SMSVERIFICATIONSENTON_ISSET_ID);}public void setSmsVerificationSentOnIsSet(boolean value) {__isset_bit_vector.set(__SMSVERIFICATIONSENTON_ISSET_ID, value);}public boolean isIsSMSVerified() {return this.isSMSVerified;}public UserState setIsSMSVerified(boolean isSMSVerified) {this.isSMSVerified = isSMSVerified;setIsSMSVerifiedIsSet(true);return this;}public void unsetIsSMSVerified() {__isset_bit_vector.clear(__ISSMSVERIFIED_ISSET_ID);}/** Returns true if field isSMSVerified is set (has been asigned a value) and false otherwise */public boolean isSetIsSMSVerified() {return __isset_bit_vector.get(__ISSMSVERIFIED_ISSET_ID);}public void setIsSMSVerifiedIsSet(boolean value) {__isset_bit_vector.set(__ISSMSVERIFIED_ISSET_ID, value);}public long getActiveSince() {return this.activeSince;}public UserState setActiveSince(long activeSince) {this.activeSince = activeSince;setActiveSinceIsSet(true);return this;}public void unsetActiveSince() {__isset_bit_vector.clear(__ACTIVESINCE_ISSET_ID);}/** Returns true if field activeSince is set (has been asigned a value) and false otherwise */public boolean isSetActiveSince() {return __isset_bit_vector.get(__ACTIVESINCE_ISSET_ID);}public void setActiveSinceIsSet(boolean value) {__isset_bit_vector.set(__ACTIVESINCE_ISSET_ID, value);}public boolean isIsLoggedIn() {return this.isLoggedIn;}public UserState setIsLoggedIn(boolean isLoggedIn) {this.isLoggedIn = isLoggedIn;setIsLoggedInIsSet(true);return this;}public void unsetIsLoggedIn() {__isset_bit_vector.clear(__ISLOGGEDIN_ISSET_ID);}/** Returns true if field isLoggedIn is set (has been asigned a value) and false otherwise */public boolean isSetIsLoggedIn() {return __isset_bit_vector.get(__ISLOGGEDIN_ISSET_ID);}public void setIsLoggedInIsSet(boolean value) {__isset_bit_vector.set(__ISLOGGEDIN_ISSET_ID, value);}public int getIpsSize() {return (this.ips == null) ? 0 : this.ips.size();}public java.util.Iterator<IPMap> getIpsIterator() {return (this.ips == null) ? null : this.ips.iterator();}public void addToIps(IPMap elem) {if (this.ips == null) {this.ips = new ArrayList<IPMap>();}this.ips.add(elem);}public List<IPMap> getIps() {return this.ips;}public UserState setIps(List<IPMap> ips) {this.ips = ips;return this;}public void unsetIps() {this.ips = null;}/** Returns true if field ips is set (has been asigned a value) and false otherwise */public boolean isSetIps() {return this.ips != null;}public void setIpsIsSet(boolean value) {if (!value) {this.ips = null;}}public long getShoppingCartHandle() {return this.shoppingCartHandle;}public UserState setShoppingCartHandle(long shoppingCartHandle) {this.shoppingCartHandle = shoppingCartHandle;setShoppingCartHandleIsSet(true);return this;}public void unsetShoppingCartHandle() {__isset_bit_vector.clear(__SHOPPINGCARTHANDLE_ISSET_ID);}/** Returns true if field shoppingCartHandle is set (has been asigned a value) and false otherwise */public boolean isSetShoppingCartHandle() {return __isset_bit_vector.get(__SHOPPINGCARTHANDLE_ISSET_ID);}public void setShoppingCartHandleIsSet(boolean value) {__isset_bit_vector.set(__SHOPPINGCARTHANDLE_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case USER_ID:if (value == null) {unsetUserId();} else {setUserId((Long)value);}break;case IS_EMAIL_VERIFIED:if (value == null) {unsetIsEmailVerified();} else {setIsEmailVerified((Boolean)value);}break;case LAST_LOGIN:if (value == null) {unsetLastLogin();} else {setLastLogin((Long)value);}break;case LAST_LOGOUT:if (value == null) {unsetLastLogout();} else {setLastLogout((Long)value);}break;case EMAIL_VERIFICATION_SENT_ON:if (value == null) {unsetEmailVerificationSentOn();} else {setEmailVerificationSentOn((Long)value);}break;case SMS_VERIFICATION_SENT_ON:if (value == null) {unsetSmsVerificationSentOn();} else {setSmsVerificationSentOn((Long)value);}break;case IS_SMSVERIFIED:if (value == null) {unsetIsSMSVerified();} else {setIsSMSVerified((Boolean)value);}break;case ACTIVE_SINCE:if (value == null) {unsetActiveSince();} else {setActiveSince((Long)value);}break;case IS_LOGGED_IN:if (value == null) {unsetIsLoggedIn();} else {setIsLoggedIn((Boolean)value);}break;case IPS:if (value == null) {unsetIps();} else {setIps((List<IPMap>)value);}break;case SHOPPING_CART_HANDLE:if (value == null) {unsetShoppingCartHandle();} else {setShoppingCartHandle((Long)value);}break;}}public void setFieldValue(int fieldID, Object value) {setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);}public Object getFieldValue(_Fields field) {switch (field) {case USER_ID:return new Long(getUserId());case IS_EMAIL_VERIFIED:return new Boolean(isIsEmailVerified());case LAST_LOGIN:return new Long(getLastLogin());case LAST_LOGOUT:return new Long(getLastLogout());case EMAIL_VERIFICATION_SENT_ON:return new Long(getEmailVerificationSentOn());case SMS_VERIFICATION_SENT_ON:return new Long(getSmsVerificationSentOn());case IS_SMSVERIFIED:return new Boolean(isIsSMSVerified());case ACTIVE_SINCE:return new Long(getActiveSince());case IS_LOGGED_IN:return new Boolean(isIsLoggedIn());case IPS:return getIps();case SHOPPING_CART_HANDLE:return new Long(getShoppingCartHandle());}throw new IllegalStateException();}public Object getFieldValue(int fieldId) {return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));}/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */public boolean isSet(_Fields field) {switch (field) {case USER_ID:return isSetUserId();case IS_EMAIL_VERIFIED:return isSetIsEmailVerified();case LAST_LOGIN:return isSetLastLogin();case LAST_LOGOUT:return isSetLastLogout();case EMAIL_VERIFICATION_SENT_ON:return isSetEmailVerificationSentOn();case SMS_VERIFICATION_SENT_ON:return isSetSmsVerificationSentOn();case IS_SMSVERIFIED:return isSetIsSMSVerified();case ACTIVE_SINCE:return isSetActiveSince();case IS_LOGGED_IN:return isSetIsLoggedIn();case IPS:return isSetIps();case SHOPPING_CART_HANDLE:return isSetShoppingCartHandle();}throw new IllegalStateException();}public boolean isSet(int fieldID) {return isSet(_Fields.findByThriftIdOrThrow(fieldID));}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof UserState)return this.equals((UserState)that);return false;}public boolean equals(UserState that) {if (that == null)return false;boolean this_present_userId = true;boolean that_present_userId = true;if (this_present_userId || that_present_userId) {if (!(this_present_userId && that_present_userId))return false;if (this.userId != that.userId)return false;}boolean this_present_isEmailVerified = true;boolean that_present_isEmailVerified = true;if (this_present_isEmailVerified || that_present_isEmailVerified) {if (!(this_present_isEmailVerified && that_present_isEmailVerified))return false;if (this.isEmailVerified != that.isEmailVerified)return false;}boolean this_present_lastLogin = true;boolean that_present_lastLogin = true;if (this_present_lastLogin || that_present_lastLogin) {if (!(this_present_lastLogin && that_present_lastLogin))return false;if (this.lastLogin != that.lastLogin)return false;}boolean this_present_lastLogout = true;boolean that_present_lastLogout = true;if (this_present_lastLogout || that_present_lastLogout) {if (!(this_present_lastLogout && that_present_lastLogout))return false;if (this.lastLogout != that.lastLogout)return false;}boolean this_present_emailVerificationSentOn = true;boolean that_present_emailVerificationSentOn = true;if (this_present_emailVerificationSentOn || that_present_emailVerificationSentOn) {if (!(this_present_emailVerificationSentOn && that_present_emailVerificationSentOn))return false;if (this.emailVerificationSentOn != that.emailVerificationSentOn)return false;}boolean this_present_smsVerificationSentOn = true;boolean that_present_smsVerificationSentOn = true;if (this_present_smsVerificationSentOn || that_present_smsVerificationSentOn) {if (!(this_present_smsVerificationSentOn && that_present_smsVerificationSentOn))return false;if (this.smsVerificationSentOn != that.smsVerificationSentOn)return false;}boolean this_present_isSMSVerified = true;boolean that_present_isSMSVerified = true;if (this_present_isSMSVerified || that_present_isSMSVerified) {if (!(this_present_isSMSVerified && that_present_isSMSVerified))return false;if (this.isSMSVerified != that.isSMSVerified)return false;}boolean this_present_activeSince = true;boolean that_present_activeSince = true;if (this_present_activeSince || that_present_activeSince) {if (!(this_present_activeSince && that_present_activeSince))return false;if (this.activeSince != that.activeSince)return false;}boolean this_present_isLoggedIn = true;boolean that_present_isLoggedIn = true;if (this_present_isLoggedIn || that_present_isLoggedIn) {if (!(this_present_isLoggedIn && that_present_isLoggedIn))return false;if (this.isLoggedIn != that.isLoggedIn)return false;}boolean this_present_ips = true && this.isSetIps();boolean that_present_ips = true && that.isSetIps();if (this_present_ips || that_present_ips) {if (!(this_present_ips && that_present_ips))return false;if (!this.ips.equals(that.ips))return false;}boolean this_present_shoppingCartHandle = true;boolean that_present_shoppingCartHandle = true;if (this_present_shoppingCartHandle || that_present_shoppingCartHandle) {if (!(this_present_shoppingCartHandle && that_present_shoppingCartHandle))return false;if (this.shoppingCartHandle != that.shoppingCartHandle)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(UserState other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;UserState typedOther = (UserState)other;lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetIsEmailVerified()).compareTo(isSetIsEmailVerified());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(isEmailVerified, typedOther.isEmailVerified);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetLastLogin()).compareTo(isSetLastLogin());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(lastLogin, typedOther.lastLogin);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetLastLogout()).compareTo(isSetLastLogout());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(lastLogout, typedOther.lastLogout);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetEmailVerificationSentOn()).compareTo(isSetEmailVerificationSentOn());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(emailVerificationSentOn, typedOther.emailVerificationSentOn);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetSmsVerificationSentOn()).compareTo(isSetSmsVerificationSentOn());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(smsVerificationSentOn, typedOther.smsVerificationSentOn);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetIsSMSVerified()).compareTo(isSetIsSMSVerified());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(isSMSVerified, typedOther.isSMSVerified);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetActiveSince()).compareTo(isSetActiveSince());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(activeSince, typedOther.activeSince);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetIsLoggedIn()).compareTo(isSetIsLoggedIn());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(isLoggedIn, typedOther.isLoggedIn);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetIps()).compareTo(isSetIps());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(ips, typedOther.ips);if (lastComparison != 0) {return lastComparison;}lastComparison = Boolean.valueOf(isSetShoppingCartHandle()).compareTo(isSetShoppingCartHandle());if (lastComparison != 0) {return lastComparison;}lastComparison = TBaseHelper.compareTo(shoppingCartHandle, typedOther.shoppingCartHandle);if (lastComparison != 0) {return lastComparison;}return 0;}public void read(TProtocol iprot) throws TException {TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == TType.STOP) {break;}_Fields fieldId = _Fields.findByThriftId(field.id);if (fieldId == null) {TProtocolUtil.skip(iprot, field.type);} else {switch (fieldId) {case USER_ID:if (field.type == TType.I64) {this.userId = iprot.readI64();setUserIdIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case IS_EMAIL_VERIFIED:if (field.type == TType.BOOL) {this.isEmailVerified = iprot.readBool();setIsEmailVerifiedIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case LAST_LOGIN:if (field.type == TType.I64) {this.lastLogin = iprot.readI64();setLastLoginIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case LAST_LOGOUT:if (field.type == TType.I64) {this.lastLogout = iprot.readI64();setLastLogoutIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case EMAIL_VERIFICATION_SENT_ON:if (field.type == TType.I64) {this.emailVerificationSentOn = iprot.readI64();setEmailVerificationSentOnIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case SMS_VERIFICATION_SENT_ON:if (field.type == TType.I64) {this.smsVerificationSentOn = iprot.readI64();setSmsVerificationSentOnIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case IS_SMSVERIFIED:if (field.type == TType.BOOL) {this.isSMSVerified = iprot.readBool();setIsSMSVerifiedIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case ACTIVE_SINCE:if (field.type == TType.I64) {this.activeSince = iprot.readI64();setActiveSinceIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case IS_LOGGED_IN:if (field.type == TType.BOOL) {this.isLoggedIn = iprot.readBool();setIsLoggedInIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;case IPS:if (field.type == TType.LIST) {{TList _list4 = iprot.readListBegin();this.ips = new ArrayList<IPMap>(_list4.size);for (int _i5 = 0; _i5 < _list4.size; ++_i5){IPMap _elem6;_elem6 = new IPMap();_elem6.read(iprot);this.ips.add(_elem6);}iprot.readListEnd();}} else {TProtocolUtil.skip(iprot, field.type);}break;case SHOPPING_CART_HANDLE:if (field.type == TType.I64) {this.shoppingCartHandle = iprot.readI64();setShoppingCartHandleIsSet(true);} else {TProtocolUtil.skip(iprot, field.type);}break;}iprot.readFieldEnd();}}iprot.readStructEnd();validate();}public void write(TProtocol oprot) throws TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(USER_ID_FIELD_DESC);oprot.writeI64(this.userId);oprot.writeFieldEnd();oprot.writeFieldBegin(IS_EMAIL_VERIFIED_FIELD_DESC);oprot.writeBool(this.isEmailVerified);oprot.writeFieldEnd();oprot.writeFieldBegin(LAST_LOGIN_FIELD_DESC);oprot.writeI64(this.lastLogin);oprot.writeFieldEnd();oprot.writeFieldBegin(LAST_LOGOUT_FIELD_DESC);oprot.writeI64(this.lastLogout);oprot.writeFieldEnd();oprot.writeFieldBegin(EMAIL_VERIFICATION_SENT_ON_FIELD_DESC);oprot.writeI64(this.emailVerificationSentOn);oprot.writeFieldEnd();oprot.writeFieldBegin(SMS_VERIFICATION_SENT_ON_FIELD_DESC);oprot.writeI64(this.smsVerificationSentOn);oprot.writeFieldEnd();oprot.writeFieldBegin(IS_SMSVERIFIED_FIELD_DESC);oprot.writeBool(this.isSMSVerified);oprot.writeFieldEnd();oprot.writeFieldBegin(ACTIVE_SINCE_FIELD_DESC);oprot.writeI64(this.activeSince);oprot.writeFieldEnd();oprot.writeFieldBegin(IS_LOGGED_IN_FIELD_DESC);oprot.writeBool(this.isLoggedIn);oprot.writeFieldEnd();if (this.ips != null) {oprot.writeFieldBegin(IPS_FIELD_DESC);{oprot.writeListBegin(new TList(TType.STRUCT, this.ips.size()));for (IPMap _iter7 : this.ips){_iter7.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldBegin(SHOPPING_CART_HANDLE_FIELD_DESC);oprot.writeI64(this.shoppingCartHandle);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("UserState(");boolean first = true;sb.append("userId:");sb.append(this.userId);first = false;if (!first) sb.append(", ");sb.append("isEmailVerified:");sb.append(this.isEmailVerified);first = false;if (!first) sb.append(", ");sb.append("lastLogin:");sb.append(this.lastLogin);first = false;if (!first) sb.append(", ");sb.append("lastLogout:");sb.append(this.lastLogout);first = false;if (!first) sb.append(", ");sb.append("emailVerificationSentOn:");sb.append(this.emailVerificationSentOn);first = false;if (!first) sb.append(", ");sb.append("smsVerificationSentOn:");sb.append(this.smsVerificationSentOn);first = false;if (!first) sb.append(", ");sb.append("isSMSVerified:");sb.append(this.isSMSVerified);first = false;if (!first) sb.append(", ");sb.append("activeSince:");sb.append(this.activeSince);first = false;if (!first) sb.append(", ");sb.append("isLoggedIn:");sb.append(this.isLoggedIn);first = false;if (!first) sb.append(", ");sb.append("ips:");if (this.ips == null) {sb.append("null");} else {sb.append(this.ips);}first = false;if (!first) sb.append(", ");sb.append("shoppingCartHandle:");sb.append(this.shoppingCartHandle);first = false;sb.append(")");return sb.toString();}public void validate() throws TException {// check for required fields}}