@Test public void TestUserSerdesTrip() throws Exception { String json = load("user.json"); final User user = mapper.readValue(json, User.class); final String json1 = mapper.writeValueAsString(user); final User user1 = mapper.readValue(json1, User.class); assertTrue(user.equals(user1)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (createdAt != user.createdAt) return false; if (lastRequestAt != user.lastRequestAt) return false; if (signedUpAt != user.signedUpAt) return false; if (newSession != user.newSession) return false; if (remoteCreatedAt != user.remoteCreatedAt) return false; if (sessionCount != user.sessionCount) return false; if (unsubscribedFromEmails != user.unsubscribedFromEmails) return false; if (updateLastRequestAt != user.updateLastRequestAt) return false; if (updatedAt != user.updatedAt) return false; if (avatar != null ? !avatar.equals(user.avatar) : user.avatar != null) return false; if (companyCollection != null ? !companyCollection.equals(user.companyCollection) : user.companyCollection != null) return false; if (customAttributes != null ? !customAttributes.equals(user.customAttributes) : user.customAttributes != null) return false; if (email != null ? !email.equals(user.email) : user.email != null) return false; if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false; if (id != null ? !id.equals(user.id) : user.id != null) return false; if (lastSeenIp != null ? !lastSeenIp.equals(user.lastSeenIp) : user.lastSeenIp != null) return false; if (locationData != null ? !locationData.equals(user.locationData) : user.locationData != null) return false; if (name != null ? !name.equals(user.name) : user.name != null) return false; if (segmentCollection != null ? !segmentCollection.equals(user.segmentCollection) : user.segmentCollection != null) return false; if (socialProfileCollection != null ? !socialProfileCollection.equals(user.socialProfileCollection) : user.socialProfileCollection != null) return false; if (tagCollection != null ? !tagCollection.equals(user.tagCollection) : user.tagCollection != null) return false; if (!type.equals(user.type)) return false; if (untag != null ? !untag.equals(user.untag) : user.untag != null) return false; if (userAgentData != null ? !userAgentData.equals(user.userAgentData) : user.userAgentData != null) return false; if (userId != null ? !userId.equals(user.userId) : user.userId != null) return false; return true; }
User extends TypedData implements Replier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (createdAt != user.createdAt) return false; if (lastRequestAt != user.lastRequestAt) return false; if (signedUpAt != user.signedUpAt) return false; if (newSession != user.newSession) return false; if (remoteCreatedAt != user.remoteCreatedAt) return false; if (sessionCount != user.sessionCount) return false; if (unsubscribedFromEmails != user.unsubscribedFromEmails) return false; if (updateLastRequestAt != user.updateLastRequestAt) return false; if (updatedAt != user.updatedAt) return false; if (avatar != null ? !avatar.equals(user.avatar) : user.avatar != null) return false; if (companyCollection != null ? !companyCollection.equals(user.companyCollection) : user.companyCollection != null) return false; if (customAttributes != null ? !customAttributes.equals(user.customAttributes) : user.customAttributes != null) return false; if (email != null ? !email.equals(user.email) : user.email != null) return false; if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false; if (id != null ? !id.equals(user.id) : user.id != null) return false; if (lastSeenIp != null ? !lastSeenIp.equals(user.lastSeenIp) : user.lastSeenIp != null) return false; if (locationData != null ? !locationData.equals(user.locationData) : user.locationData != null) return false; if (name != null ? !name.equals(user.name) : user.name != null) return false; if (segmentCollection != null ? !segmentCollection.equals(user.segmentCollection) : user.segmentCollection != null) return false; if (socialProfileCollection != null ? !socialProfileCollection.equals(user.socialProfileCollection) : user.socialProfileCollection != null) return false; if (tagCollection != null ? !tagCollection.equals(user.tagCollection) : user.tagCollection != null) return false; if (!type.equals(user.type)) return false; if (untag != null ? !untag.equals(user.untag) : user.untag != null) return false; if (userAgentData != null ? !userAgentData.equals(user.userAgentData) : user.userAgentData != null) return false; if (userId != null ? !userId.equals(user.userId) : user.userId != null) return false; return true; } }
User extends TypedData implements Replier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (createdAt != user.createdAt) return false; if (lastRequestAt != user.lastRequestAt) return false; if (signedUpAt != user.signedUpAt) return false; if (newSession != user.newSession) return false; if (remoteCreatedAt != user.remoteCreatedAt) return false; if (sessionCount != user.sessionCount) return false; if (unsubscribedFromEmails != user.unsubscribedFromEmails) return false; if (updateLastRequestAt != user.updateLastRequestAt) return false; if (updatedAt != user.updatedAt) return false; if (avatar != null ? !avatar.equals(user.avatar) : user.avatar != null) return false; if (companyCollection != null ? !companyCollection.equals(user.companyCollection) : user.companyCollection != null) return false; if (customAttributes != null ? !customAttributes.equals(user.customAttributes) : user.customAttributes != null) return false; if (email != null ? !email.equals(user.email) : user.email != null) return false; if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false; if (id != null ? !id.equals(user.id) : user.id != null) return false; if (lastSeenIp != null ? !lastSeenIp.equals(user.lastSeenIp) : user.lastSeenIp != null) return false; if (locationData != null ? !locationData.equals(user.locationData) : user.locationData != null) return false; if (name != null ? !name.equals(user.name) : user.name != null) return false; if (segmentCollection != null ? !segmentCollection.equals(user.segmentCollection) : user.segmentCollection != null) return false; if (socialProfileCollection != null ? !socialProfileCollection.equals(user.socialProfileCollection) : user.socialProfileCollection != null) return false; if (tagCollection != null ? !tagCollection.equals(user.tagCollection) : user.tagCollection != null) return false; if (!type.equals(user.type)) return false; if (untag != null ? !untag.equals(user.untag) : user.untag != null) return false; if (userAgentData != null ? !userAgentData.equals(user.userAgentData) : user.userAgentData != null) return false; if (userId != null ? !userId.equals(user.userId) : user.userId != null) return false; return true; } User(); }
User extends TypedData implements Replier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (createdAt != user.createdAt) return false; if (lastRequestAt != user.lastRequestAt) return false; if (signedUpAt != user.signedUpAt) return false; if (newSession != user.newSession) return false; if (remoteCreatedAt != user.remoteCreatedAt) return false; if (sessionCount != user.sessionCount) return false; if (unsubscribedFromEmails != user.unsubscribedFromEmails) return false; if (updateLastRequestAt != user.updateLastRequestAt) return false; if (updatedAt != user.updatedAt) return false; if (avatar != null ? !avatar.equals(user.avatar) : user.avatar != null) return false; if (companyCollection != null ? !companyCollection.equals(user.companyCollection) : user.companyCollection != null) return false; if (customAttributes != null ? !customAttributes.equals(user.customAttributes) : user.customAttributes != null) return false; if (email != null ? !email.equals(user.email) : user.email != null) return false; if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false; if (id != null ? !id.equals(user.id) : user.id != null) return false; if (lastSeenIp != null ? !lastSeenIp.equals(user.lastSeenIp) : user.lastSeenIp != null) return false; if (locationData != null ? !locationData.equals(user.locationData) : user.locationData != null) return false; if (name != null ? !name.equals(user.name) : user.name != null) return false; if (segmentCollection != null ? !segmentCollection.equals(user.segmentCollection) : user.segmentCollection != null) return false; if (socialProfileCollection != null ? !socialProfileCollection.equals(user.socialProfileCollection) : user.socialProfileCollection != null) return false; if (tagCollection != null ? !tagCollection.equals(user.tagCollection) : user.tagCollection != null) return false; if (!type.equals(user.type)) return false; if (untag != null ? !untag.equals(user.untag) : user.untag != null) return false; if (userAgentData != null ? !userAgentData.equals(user.userAgentData) : user.userAgentData != null) return false; if (userId != null ? !userId.equals(user.userId) : user.userId != null) return false; return true; } User(); static User find(String id); static User find(Map<String, String> params); static User create(User user); static User update(User user); static User delete(String id); static User archive(String id); static UserPermanentDeleteResponse permanentDelete(String id); @Deprecated static User delete(Map<String, String> params); static User archive(Map<String, String> params); static UserCollection list(Map<String, String> params); static UserCollection list(); static ScrollableUserCollection scroll(); static Job submit(final List<JobItem<User>> items); static Job submit(final List<JobItem<User>> items, Job job); static JobItemCollection<User> listJobErrorFeed(String jobID); User untag(); @JsonIgnore String getReplyType(); String getType(); String getId(); User setId(String id); String getName(); User setName(String name); String getEmail(); User setEmail(String email); String getPhone(); User setPhone(String phone); String getUserId(); User setUserId(String userId); String getPseudonym(); Avatar getAvatar(); User setAvatar(Avatar avatar); long getCreatedAt(); long getUpdatedAt(); long getRemoteCreatedAt(); User setRemoteCreatedAt(long remoteCreatedAt); Boolean getUnsubscribedFromEmails(); User setUnsubscribedFromEmails(boolean unsubscribedFromEmails); int getSessionCount(); long getLastRequestAt(); User setLastRequestAt(long lastRequestAt); long getSignedUpAt(); User setSignedUpAt(long signedUpAt); String getLastSeenIp(); User setLastSeenIp(String lastSeenIp); Map<String, CustomAttribute> getCustomAttributes(); User setCustomAttributes(Map<String, CustomAttribute> customAttributes); User addCustomAttribute(CustomAttribute customAttribute); String getUserAgentData(); User setUserAgentData(String userAgentData); LocationData getLocationData(); CompanyCollection getCompanyCollection(); User setCompanyCollection(CompanyCollection companyCollection); User addCompany(Company company); User removeCompany(Company company); SocialProfileCollection getSocialProfileCollection(); SegmentCollection getSegmentCollection(); TagCollection getTagCollection(); Boolean isUpdateLastRequestAt(); User setUpdateLastRequestAt(boolean updateLastRequestAt); Boolean isNewSession(); User setNewSession(boolean newSession); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
User extends TypedData implements Replier { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (createdAt != user.createdAt) return false; if (lastRequestAt != user.lastRequestAt) return false; if (signedUpAt != user.signedUpAt) return false; if (newSession != user.newSession) return false; if (remoteCreatedAt != user.remoteCreatedAt) return false; if (sessionCount != user.sessionCount) return false; if (unsubscribedFromEmails != user.unsubscribedFromEmails) return false; if (updateLastRequestAt != user.updateLastRequestAt) return false; if (updatedAt != user.updatedAt) return false; if (avatar != null ? !avatar.equals(user.avatar) : user.avatar != null) return false; if (companyCollection != null ? !companyCollection.equals(user.companyCollection) : user.companyCollection != null) return false; if (customAttributes != null ? !customAttributes.equals(user.customAttributes) : user.customAttributes != null) return false; if (email != null ? !email.equals(user.email) : user.email != null) return false; if (phone != null ? !phone.equals(user.phone) : user.phone != null) return false; if (id != null ? !id.equals(user.id) : user.id != null) return false; if (lastSeenIp != null ? !lastSeenIp.equals(user.lastSeenIp) : user.lastSeenIp != null) return false; if (locationData != null ? !locationData.equals(user.locationData) : user.locationData != null) return false; if (name != null ? !name.equals(user.name) : user.name != null) return false; if (segmentCollection != null ? !segmentCollection.equals(user.segmentCollection) : user.segmentCollection != null) return false; if (socialProfileCollection != null ? !socialProfileCollection.equals(user.socialProfileCollection) : user.socialProfileCollection != null) return false; if (tagCollection != null ? !tagCollection.equals(user.tagCollection) : user.tagCollection != null) return false; if (!type.equals(user.type)) return false; if (untag != null ? !untag.equals(user.untag) : user.untag != null) return false; if (userAgentData != null ? !userAgentData.equals(user.userAgentData) : user.userAgentData != null) return false; if (userId != null ? !userId.equals(user.userId) : user.userId != null) return false; return true; } User(); static User find(String id); static User find(Map<String, String> params); static User create(User user); static User update(User user); static User delete(String id); static User archive(String id); static UserPermanentDeleteResponse permanentDelete(String id); @Deprecated static User delete(Map<String, String> params); static User archive(Map<String, String> params); static UserCollection list(Map<String, String> params); static UserCollection list(); static ScrollableUserCollection scroll(); static Job submit(final List<JobItem<User>> items); static Job submit(final List<JobItem<User>> items, Job job); static JobItemCollection<User> listJobErrorFeed(String jobID); User untag(); @JsonIgnore String getReplyType(); String getType(); String getId(); User setId(String id); String getName(); User setName(String name); String getEmail(); User setEmail(String email); String getPhone(); User setPhone(String phone); String getUserId(); User setUserId(String userId); String getPseudonym(); Avatar getAvatar(); User setAvatar(Avatar avatar); long getCreatedAt(); long getUpdatedAt(); long getRemoteCreatedAt(); User setRemoteCreatedAt(long remoteCreatedAt); Boolean getUnsubscribedFromEmails(); User setUnsubscribedFromEmails(boolean unsubscribedFromEmails); int getSessionCount(); long getLastRequestAt(); User setLastRequestAt(long lastRequestAt); long getSignedUpAt(); User setSignedUpAt(long signedUpAt); String getLastSeenIp(); User setLastSeenIp(String lastSeenIp); Map<String, CustomAttribute> getCustomAttributes(); User setCustomAttributes(Map<String, CustomAttribute> customAttributes); User addCustomAttribute(CustomAttribute customAttribute); String getUserAgentData(); User setUserAgentData(String userAgentData); LocationData getLocationData(); CompanyCollection getCompanyCollection(); User setCompanyCollection(CompanyCollection companyCollection); User addCompany(Company company); User removeCompany(Company company); SocialProfileCollection getSocialProfileCollection(); SegmentCollection getSegmentCollection(); TagCollection getTagCollection(); Boolean isUpdateLastRequestAt(); User setUpdateLastRequestAt(boolean updateLastRequestAt); Boolean isNewSession(); User setNewSession(boolean newSession); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }