@@ -108,8 +108,8 @@ static UserUpdate buildFrom(User user) {
108108 }
109109
110110 @ JsonProperty ("type" )
111- @ JsonInclude (JsonInclude .Include .ALWAYS )
112- private final String type = "user" ;
111+ @ JsonInclude (JsonInclude .Include .NON_DEFAULT )
112+ private String type ;
113113
114114 @ JsonProperty ("id" )
115115 private String id ;
@@ -151,6 +151,7 @@ static UserUpdate buildFrom(User user) {
151151 * primitive would result in false not being sent
152152 */
153153 @ JsonProperty ("unsubscribed_from_emails" )
154+ @ JsonInclude (JsonInclude .Include .NON_DEFAULT )
154155 private Boolean unsubscribedFromEmails ;
155156
156157 /**
@@ -159,6 +160,7 @@ static UserUpdate buildFrom(User user) {
159160 * primitive would result in false not being sent
160161 */
161162 @ JsonProperty ("update_last_request_at" )
163+ @ JsonInclude (JsonInclude .Include .NON_DEFAULT )
162164 private Boolean updateLastRequestAt ;
163165
164166 /**
@@ -167,6 +169,7 @@ static UserUpdate buildFrom(User user) {
167169 * primitive would result in false not being sent
168170 */
169171 @ JsonProperty ("new_session" )
172+ @ JsonInclude (JsonInclude .Include .NON_DEFAULT )
170173 private Boolean newSession ;
171174
172175 public UserUpdate () {
@@ -224,10 +227,20 @@ public Boolean getUnsubscribedFromEmails() {
224227 return unsubscribedFromEmails ;
225228 }
226229
230+ public Boolean getUpdateLastRequestAt () {
231+ return updateLastRequestAt ;
232+ }
233+
234+ public Boolean getNewSession () {
235+ return newSession ;
236+ }
237+
238+ @ Deprecated
227239 public Boolean isUpdateLastRequestAt () {
228240 return updateLastRequestAt ;
229241 }
230242
243+ @ Deprecated
231244 public Boolean isNewSession () {
232245 return newSession ;
233246 }
@@ -262,7 +275,7 @@ public Boolean isNewSession() {
262275 private long remoteCreatedAt ;
263276
264277 @ JsonProperty ("unsubscribed_from_emails" )
265- private boolean unsubscribedFromEmails ;
278+ private Boolean unsubscribedFromEmails ;
266279
267280 @ JsonProperty ("session_count" )
268281 private int sessionCount ;
@@ -300,10 +313,10 @@ public Boolean isNewSession() {
300313 private TagCollection tagCollection = new TagCollection ();
301314
302315 @ JsonProperty ("update_last_request_at" )
303- private boolean updateLastRequestAt ;
316+ private Boolean updateLastRequestAt ;
304317
305318 @ JsonProperty ("new_session" )
306- private boolean newSession ;
319+ private Boolean newSession ;
307320
308321 private Boolean untag ;
309322
@@ -385,7 +398,7 @@ public User setRemoteCreatedAt(long remoteCreatedAt) {
385398 return this ;
386399 }
387400
388- public boolean getUnsubscribedFromEmails () {
401+ public Boolean getUnsubscribedFromEmails () {
389402 return unsubscribedFromEmails ;
390403 }
391404
@@ -480,7 +493,7 @@ public TagCollection getTagCollection() {
480493 return tagCollection ;
481494 }
482495
483- public boolean isUpdateLastRequestAt () {
496+ public Boolean isUpdateLastRequestAt () {
484497 return updateLastRequestAt ;
485498 }
486499
@@ -489,7 +502,7 @@ public User setUpdateLastRequestAt(boolean updateLastRequestAt) {
489502 return this ;
490503 }
491504
492- public boolean isNewSession () {
505+ public Boolean isNewSession () {
493506 return newSession ;
494507 }
495508
@@ -572,28 +585,30 @@ public int hashCode() {
572585 @ Override
573586 public String toString () {
574587 return "User{" +
575- "id='" + id + '\'' +
576- ", name='" + name + '\'' +
577- ", email='" + email + '\'' +
578- ", userId='" + userId + '\'' +
579- ", avatar=" + avatar +
580- ", createdAt=" + createdAt +
581- ", updatedAt=" + updatedAt +
582- ", remoteCreatedAt=" + remoteCreatedAt +
583- ", unsubscribedFromEmails=" + unsubscribedFromEmails +
584- ", sessionCount=" + sessionCount +
585- ", lastRequestAt=" + lastRequestAt +
586- ", signedUpAt=" + signedUpAt +
587- ", lastSeenIp='" + lastSeenIp + '\'' +
588- ", customAttributes=" + customAttributes +
589- ", userAgentData='" + userAgentData + '\'' +
590- ", locationData=" + locationData +
591- ", companyCollection=" + companyCollection +
592- ", socialProfileCollection=" + socialProfileCollection +
593- ", segmentCollection=" + segmentCollection +
594- ", tagCollection=" + tagCollection +
595- ", updateLastRequestAt=" + updateLastRequestAt +
596- ", newSession=" + newSession +
597- "} " + super .toString ();
588+ "type='" + type + '\'' +
589+ ", id='" + id + '\'' +
590+ ", name='" + name + '\'' +
591+ ", email='" + email + '\'' +
592+ ", userId='" + userId + '\'' +
593+ ", avatar=" + avatar +
594+ ", createdAt=" + createdAt +
595+ ", updatedAt=" + updatedAt +
596+ ", remoteCreatedAt=" + remoteCreatedAt +
597+ ", unsubscribedFromEmails=" + unsubscribedFromEmails +
598+ ", sessionCount=" + sessionCount +
599+ ", lastRequestAt=" + lastRequestAt +
600+ ", signedUpAt=" + signedUpAt +
601+ ", lastSeenIp='" + lastSeenIp + '\'' +
602+ ", customAttributes=" + customAttributes +
603+ ", userAgentData='" + userAgentData + '\'' +
604+ ", locationData=" + locationData +
605+ ", companyCollection=" + companyCollection +
606+ ", socialProfileCollection=" + socialProfileCollection +
607+ ", segmentCollection=" + segmentCollection +
608+ ", tagCollection=" + tagCollection +
609+ ", updateLastRequestAt=" + updateLastRequestAt +
610+ ", newSession=" + newSession +
611+ ", untag=" + untag +
612+ "} " + super .toString ();
598613 }
599614}
0 commit comments