-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.models.CustomObject
public final class User implements CustomObject
Represents a person who uses a chat and can perform chat operations like viewing channels or sending messages.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringidprivate Stringroleprivate Stringnameprivate Stringimageprivate Booleaninvisibleprivate Booleanbannedprivate List<Device>devicesprivate Booleanonlineprivate DatecreatedAtprivate DateupdatedAtprivate DatelastActiveprivate IntegertotalUnreadCountprivate IntegerunreadChannelsprivate List<Mute>mutesprivate final List<String>teamsprivate final List<ChannelMute>channelMutesprivate Map<String, Object>extraData
-
Constructor Summary
Constructors Constructor Description User(String id, String role, String name, String image, Boolean invisible, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, List<Mute> mutes, List<String> teams, List<ChannelMute> channelMutes, Map<String, Object> extraData)
-
Method Summary
-
-
Constructor Detail
-
User
User(String id, String role, String name, String image, Boolean invisible, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, List<Mute> mutes, List<String> teams, List<ChannelMute> channelMutes, Map<String, Object> extraData)
- Parameters:
id- The unique id of the user.role- Determines the set of user permissions.name- User's name.image- User's image.invisible- Determines if the user should share its online status.banned- Whether a user is banned or not.devices- The list of devices for the current user.online- Whether a is user online or not.createdAt- Date/time of creation.updatedAt- Date/time of the last update.lastActive- Date of last activity.totalUnreadCount- The total unread messages count for the current user.unreadChannels- The total unread channels count for the current user.mutes- A list of users muted by the current user.teams- List of teams user is a part of.channelMutes- A list of channels muted by the current user.extraData- A map of custom fields for the user.
-
-
Method Detail
-
getInvisible
final Boolean getInvisible()
-
setInvisible
final Unit setInvisible(Boolean invisible)
- Parameters:
invisible- Determines if the user should share its online status.
-
setBanned
final Unit setBanned(Boolean banned)
- Parameters:
banned- Whether a user is banned or not.
-
getDevices
final List<Device> getDevices()
-
setDevices
final Unit setDevices(List<Device> devices)
- Parameters:
devices- The list of devices for the current user.
-
setOnline
final Unit setOnline(Boolean online)
- Parameters:
online- Whether a is user online or not.
-
getCreatedAt
final Date getCreatedAt()
-
setCreatedAt
final Unit setCreatedAt(Date createdAt)
- Parameters:
createdAt- Date/time of creation.
-
getUpdatedAt
final Date getUpdatedAt()
-
setUpdatedAt
final Unit setUpdatedAt(Date updatedAt)
- Parameters:
updatedAt- Date/time of the last update.
-
getLastActive
final Date getLastActive()
-
setLastActive
final Unit setLastActive(Date lastActive)
- Parameters:
lastActive- Date of last activity.
-
getTotalUnreadCount
final Integer getTotalUnreadCount()
-
setTotalUnreadCount
final Unit setTotalUnreadCount(Integer totalUnreadCount)
- Parameters:
totalUnreadCount- The total unread messages count for the current user.
-
getUnreadChannels
final Integer getUnreadChannels()
-
setUnreadChannels
final Unit setUnreadChannels(Integer unreadChannels)
- Parameters:
unreadChannels- The total unread channels count for the current user.
-
setMutes
final Unit setMutes(List<Mute> mutes)
- Parameters:
mutes- A list of users muted by the current user.
-
getChannelMutes
final List<ChannelMute> getChannelMutes()
-
getExtraData
Map<String, Object> getExtraData()
-
setExtraData
Unit setExtraData(Map<String, Object> extraData)
- Parameters:
extraData- A map of custom fields for the user.
-
-
-
-