org.keycloak.representations.idm.UserRepresentation Maven / Gradle / Ivy
package org.keycloak.representations.idm;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Bill Burke
* @version $Revision: 1 $
*/
public class UserRepresentation {
protected String self; // link
protected String id;
protected String username;
protected boolean enabled;
protected boolean totp;
protected boolean emailVerified;
protected String firstName;
protected String lastName;
protected String email;
protected Map attributes;
protected List credentials;
protected List requiredActions;
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isTotp() {
return totp;
}
public void setTotp(boolean totp) {
this.totp = totp;
}
public boolean isEmailVerified() {
return emailVerified;
}
public void setEmailVerified(boolean emailVerified) {
this.emailVerified = emailVerified;
}
public Map getAttributes() {
return attributes;
}
public void setAttributes(Map attributes) {
this.attributes = attributes;
}
public UserRepresentation attribute(String name, String value) {
if (this.attributes == null) attributes = new HashMap();
attributes.put(name, value);
return this;
}
public List getCredentials() {
return credentials;
}
public void setCredentials(List credentials) {
this.credentials = credentials;
}
public UserRepresentation credential(String type, String value) {
if (this.credentials == null) credentials = new ArrayList();
CredentialRepresentation cred = new CredentialRepresentation();
cred.setType(type);
cred.setValue(value);
credentials.add(cred);
return this;
}
public List getRequiredActions() {
return requiredActions;
}
public void setRequiredActions(List requiredActions) {
this.requiredActions = requiredActions;
}
}