diff --git a/wrapper/src/main/java/wekan/wrapper/entity/User.java b/wrapper/src/main/java/wekan/wrapper/entity/User.java new file mode 100644 index 0000000..2560edd --- /dev/null +++ b/wrapper/src/main/java/wekan/wrapper/entity/User.java @@ -0,0 +1,130 @@ +package wekan.wrapper.entity; + +import com.google.gson.annotations.SerializedName; + +import java.util.Date; +import java.util.List; + +public class User { + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public List getEmails() { + return emails; + } + + public void setEmails(List emails) { + this.emails = emails; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(Date modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public UserProfile getProfile() { + return profile; + } + + public void setProfile(UserProfile profile) { + this.profile = profile; + } + + public String getHeartbeat() { + return heartbeat; + } + + public void setHeartbeat(String heartbeat) { + this.heartbeat = heartbeat; + } + + public boolean isAdmin() { + return isAdmin; + } + + public void setAdmin(boolean admin) { + isAdmin = admin; + } + + public boolean isCreatedThroughApi() { + return createdThroughApi; + } + + public void setCreatedThroughApi(boolean createdThroughApi) { + this.createdThroughApi = createdThroughApi; + } + + public boolean isLoginDisabled() { + return loginDisabled; + } + + public void setLoginDisabled(boolean loginDisabled) { + this.loginDisabled = loginDisabled; + } + + public String getAuthenticationMethod() { + return authenticationMethod; + } + + public void setAuthenticationMethod(String authenticationMethod) { + this.authenticationMethod = authenticationMethod; + } + + @Override + public String toString() { + return "User{" + + "id='" + id + '\'' + + ", username='" + username + '\'' + + ", emails=" + emails + + ", createdAt=" + createdAt + + ", modifiedAt=" + modifiedAt + + ", profile=" + profile + + ", heartbeat='" + heartbeat + '\'' + + ", isAdmin=" + isAdmin + + ", createdThroughApi=" + createdThroughApi + + ", loginDisabled=" + loginDisabled + + ", authenticationMethod='" + authenticationMethod + '\'' + + '}'; + } + + @SerializedName("_id") + private String id; + private String username; + private List emails; + private Date createdAt; + private Date modifiedAt; + private UserProfile profile; + //Class Service doesn't implemented in API + //private Service service; + private String heartbeat; + private boolean isAdmin; + private boolean createdThroughApi; + private boolean loginDisabled; + private String authenticationMethod; + +}