Package io.getstream.chat.android.models
Class User
-
- All Implemented Interfaces:
-
io.getstream.chat.android.models.CustomObject,io.getstream.chat.android.models.querysort.ComparableFieldProvider
public final class User implements CustomObject, ComparableFieldProvider
Represents a person who uses a chat and can perform chat operations like viewing channels or sending messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUser.Builder
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final Stringroleprivate final Stringnameprivate final Stringimageprivate final Booleaninvisibleprivate final Booleanbannedprivate final List<Device>devicesprivate final Booleanonlineprivate final DatecreatedAtprivate final DateupdatedAtprivate final DatelastActiveprivate final IntegertotalUnreadCountprivate final IntegerunreadChannelsprivate final List<Mute>mutesprivate final List<String>teamsprivate final List<ChannelMute>channelMutesprivate final Map<String, Object>extraDataprivate final DatedeactivatedAt
-
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, Date deactivatedAt)
-
Method Summary
Modifier and Type Method Description final StringgetId()final StringgetRole()final StringgetName()final StringgetImage()final BooleangetInvisible()final BooleangetBanned()final List<Device>getDevices()final BooleangetOnline()final DategetCreatedAt()final DategetUpdatedAt()final DategetLastActive()final IntegergetTotalUnreadCount()final IntegergetUnreadChannels()final List<Mute>getMutes()final List<String>getTeams()final List<ChannelMute>getChannelMutes()Map<String, Object>getExtraData()final DategetDeactivatedAt()Comparable<?>getComparableField(String fieldName)Gets a comparable fields from a name. final User.BuildernewBuilder()-
-
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, Date deactivatedAt)
- 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.deactivatedAt- Date/time of deactivation.
-
-
Method Detail
-
getInvisible
final Boolean getInvisible()
-
getDevices
final List<Device> getDevices()
-
getCreatedAt
final Date getCreatedAt()
-
getUpdatedAt
final Date getUpdatedAt()
-
getLastActive
final Date getLastActive()
-
getTotalUnreadCount
final Integer getTotalUnreadCount()
-
getUnreadChannels
final Integer getUnreadChannels()
-
getChannelMutes
final List<ChannelMute> getChannelMutes()
-
getExtraData
Map<String, Object> getExtraData()
-
getDeactivatedAt
final Date getDeactivatedAt()
-
getComparableField
Comparable<?> getComparableField(String fieldName)
Gets a comparable fields from a name.
- Parameters:
fieldName- The name of the field.
-
newBuilder
@SinceKotlin(version = "99999.9") final User.Builder newBuilder()
-
-
-
-