Package io.getstream.chat.android.models
Class User
-
- All Implemented Interfaces:
-
io.getstream.chat.android.models.CustomObject,io.getstream.chat.android.models.querysort.ComparableFieldProvider
@Immutable() 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 BooleanisBannedprivate final BooleanisInvisibleprivate final BooleanisTypingIndicatorsEnabledprivate final BooleanisReadReceiptsEnabledprivate final Stringidprivate final Stringroleprivate final Stringnameprivate final Stringimageprivate final Booleaninvisibleprivate final PrivacySettingsprivacySettingsprivate final Stringlanguageprivate final Booleanbannedprivate final List<Device>devicesprivate final Booleanonlineprivate final DatecreatedAtprivate final DateupdatedAtprivate final DatelastActiveprivate final IntegertotalUnreadCountprivate final IntegerunreadChannelsprivate final IntegerunreadThreadsprivate final List<Mute>mutesprivate final List<String>teamsprivate final Map<String, String>teamsRoleprivate final List<ChannelMute>channelMutesprivate final List<String>blockedUserIdsprivate final Map<String, Object>extraDataprivate final DatedeactivatedAt
-
Constructor Summary
Constructors Constructor Description User(String id, String role, String name, String image, Boolean invisible, PrivacySettings privacySettings, String language, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, Integer unreadThreads, List<Mute> mutes, List<String> teams, Map<String, String> teamsRole, List<ChannelMute> channelMutes, List<String> blockedUserIds, Map<String, Object> extraData, Date deactivatedAt)
-
Method Summary
Modifier and Type Method Description final BooleanisBanned()final BooleanisInvisible()final BooleanisTypingIndicatorsEnabled()final BooleanisReadReceiptsEnabled()final StringgetId()final StringgetRole()final StringgetName()final StringgetImage()final BooleangetInvisible()final PrivacySettingsgetPrivacySettings()final StringgetLanguage()final BooleangetBanned()final List<Device>getDevices()final BooleangetOnline()final DategetCreatedAt()final DategetUpdatedAt()final DategetLastActive()final IntegergetTotalUnreadCount()final IntegergetUnreadChannels()final IntegergetUnreadThreads()final List<Mute>getMutes()final List<String>getTeams()final Map<String, String>getTeamsRole()final List<ChannelMute>getChannelMutes()final List<String>getBlockedUserIds()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, PrivacySettings privacySettings, String language, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, Integer unreadThreads, List<Mute> mutes, List<String> teams, Map<String, String> teamsRole, List<ChannelMute> channelMutes, List<String> blockedUserIds, 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.privacySettings- The privacy settings for the user.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.unreadThreads- The total number of unread threads for the current user.mutes- A list of users muted by the current user.teams- List of teams user is a part of.teamsRole- The roles of the user in the teams they are part of.channelMutes- A list of channels muted by the current user.blockedUserIds- A list of user ids blocked by the current user.extraData- A map of custom fields for the user.deactivatedAt- Date/time of deactivation.
-
-
Method Detail
-
isInvisible
final Boolean isInvisible()
-
isTypingIndicatorsEnabled
final Boolean isTypingIndicatorsEnabled()
-
isReadReceiptsEnabled
final Boolean isReadReceiptsEnabled()
-
getInvisible
final Boolean getInvisible()
-
getPrivacySettings
final PrivacySettings getPrivacySettings()
-
getLanguage
final String getLanguage()
-
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()
-
getUnreadThreads
final Integer getUnreadThreads()
-
getTeamsRole
final Map<String, String> getTeamsRole()
-
getChannelMutes
final List<ChannelMute> getChannelMutes()
-
getBlockedUserIds
final List<String> getBlockedUserIds()
-
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()
-
-
-
-