public class User
extends java.lang.Object
Constructor and Description |
---|
User() |
Modifier and Type | Method and Description |
---|---|
static User |
fromJson(JsonObject json)
Generate a new User instance by loading the fields from the provided JSON
object.
|
java.lang.String |
getKey()
Get the key that uniquely identifies this user within a Gluon Cloud
application.
|
java.lang.String |
getName()
Get the name of this user.
|
java.lang.String |
getNetworkId()
Get the unique id within a social network for this user.
|
java.lang.String |
getNick()
Get the nick name of this user.
|
java.lang.String |
getPicture()
Get the profile picture of this user.
|
boolean |
isActive() |
void |
setActive(boolean active) |
void |
setKey(java.lang.String key)
Set the key for this user.
|
void |
setName(java.lang.String name) |
void |
setNetworkId(java.lang.String networkId) |
void |
setNick(java.lang.String nick) |
void |
setPicture(java.lang.String picture) |
JsonObject |
toJson()
Converts this User instance to an immutable JSON object.
|
public java.lang.String getKey()
public void setKey(java.lang.String key)
key
- the key that uniquely identifies this user.public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getNick()
public void setNick(java.lang.String nick)
public java.lang.String getPicture()
public void setPicture(java.lang.String picture)
public java.lang.String getNetworkId()
public void setNetworkId(java.lang.String networkId)
public boolean isActive()
public void setActive(boolean active)
active
- the active to setpublic static User fromJson(JsonObject json)
json
- a JSON object that contains the user informationpublic JsonObject toJson()