public class User
extends java.lang.Object
Constructor and Description |
---|
User() |
Modifier and Type | Method and Description |
---|---|
static User |
fromJson(javax.json.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 CloudLink 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 URL to the profile picture of this user.
|
void |
setKey(java.lang.String key)
Set the key that uniquely identifies this user.
|
void |
setName(java.lang.String name)
Set the name for this user.
|
void |
setNetworkId(java.lang.String networkId)
Set the unique id within a social network for this user.
|
void |
setNick(java.lang.String nick)
Set the nick name for this user.
|
void |
setPicture(java.lang.String picture)
Set the URL to the profile picture for this user.
|
javax.json.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 for this user.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name for this user.public java.lang.String getNick()
public void setNick(java.lang.String nick)
nick
- The nick name for the user.public java.lang.String getPicture()
public void setPicture(java.lang.String picture)
picture
- The URL to the profile picture for this user.public java.lang.String getNetworkId()
public void setNetworkId(java.lang.String networkId)
LoginMethod
that is linked with a social network.networkId
- The unique id of the social network that was used to authenticate this user.public static User fromJson(javax.json.JsonObject json)
json
- a JSON object that contains the user informationpublic javax.json.JsonObject toJson()