java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.User
- Enclosing class:
- TdApi
Represents a user.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
True, if the user added the current bot to attachment menu; only available to bots.static final int
Identifier uniquely determining type of the object.Emoji status to be shown instead of the default Telegram Premium badge; may be null.First name of the user.boolean
True, if the user has non-expired stories available to the current user.boolean
True, if the user has unread non-expired stories available to the current user.boolean
If false, the user is inaccessible, and the only information known about the user is inside this class.long
User identifier.boolean
The user is a close friend of the current user; implies that the user is a contact.boolean
The user is a contact of the current user.boolean
True, if many users reported this user as a fake account.boolean
The user is a contact of the current user and the current user is a contact of the user.boolean
True, if the user is a Telegram Premium user.boolean
True, if many users reported this user as a scam.boolean
True, if the user is Telegram support account.boolean
True, if the user is verified.IETF language tag of the user's language; only available to bots.Last name of the user.Phone number of the user.Profile photo of the user; may be null.If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.Current online status of the user.Type of the user.Usernames of the user; may be null. -
Constructor Summary
ConstructorDescriptionUser()
Represents a user.User
(long id, String firstName, String lastName, TdApi.Usernames usernames, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isCloseFriend, boolean isVerified, boolean isPremium, boolean isSupport, String restrictionReason, boolean isScam, boolean isFake, boolean hasActiveStories, boolean hasUnreadActiveStories, boolean haveAccess, TdApi.UserType type, String languageCode, boolean addedToAttachmentMenu) Represents a user.Represents a user. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Object
serialize, toString
-
Field Details
-
id
public long idUser identifier. -
firstName
First name of the user. -
lastName
Last name of the user. -
usernames
Usernames of the user; may be null. -
phoneNumber
Phone number of the user. -
status
Current online status of the user. -
profilePhoto
Profile photo of the user; may be null. -
emojiStatus
Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only. -
isContact
public boolean isContactThe user is a contact of the current user. -
isMutualContact
public boolean isMutualContactThe user is a contact of the current user and the current user is a contact of the user. -
isCloseFriend
public boolean isCloseFriendThe user is a close friend of the current user; implies that the user is a contact. -
isVerified
public boolean isVerifiedTrue, if the user is verified. -
isPremium
public boolean isPremiumTrue, if the user is a Telegram Premium user. -
isSupport
public boolean isSupportTrue, if the user is Telegram support account. -
restrictionReason
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted. -
isScam
public boolean isScamTrue, if many users reported this user as a scam. -
isFake
public boolean isFakeTrue, if many users reported this user as a fake account. -
hasActiveStories
public boolean hasActiveStoriesTrue, if the user has non-expired stories available to the current user. -
hasUnreadActiveStories
public boolean hasUnreadActiveStoriesTrue, if the user has unread non-expired stories available to the current user. -
haveAccess
public boolean haveAccessIf false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method. -
type
Type of the user. -
languageCode
IETF language tag of the user's language; only available to bots. -
addedToAttachmentMenu
public boolean addedToAttachmentMenuTrue, if the user added the current bot to attachment menu; only available to bots. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
User
public User()Represents a user. -
User
public User(long id, String firstName, String lastName, TdApi.Usernames usernames, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isCloseFriend, boolean isVerified, boolean isPremium, boolean isSupport, String restrictionReason, boolean isScam, boolean isFake, boolean hasActiveStories, boolean hasUnreadActiveStories, boolean haveAccess, TdApi.UserType type, String languageCode, boolean addedToAttachmentMenu) Represents a user.- Parameters:
id
- User identifier.firstName
- First name of the user.lastName
- Last name of the user.usernames
- Usernames of the user; may be null.phoneNumber
- Phone number of the user.status
- Current online status of the user.profilePhoto
- Profile photo of the user; may be null.emojiStatus
- Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only.isContact
- The user is a contact of the current user.isMutualContact
- The user is a contact of the current user and the current user is a contact of the user.isCloseFriend
- The user is a close friend of the current user; implies that the user is a contact.isVerified
- True, if the user is verified.isPremium
- True, if the user is a Telegram Premium user.isSupport
- True, if the user is Telegram support account.restrictionReason
- If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.isScam
- True, if many users reported this user as a scam.isFake
- True, if many users reported this user as a fake account.hasActiveStories
- True, if the user has non-expired stories available to the current user.hasUnreadActiveStories
- True, if the user has unread non-expired stories available to the current user.haveAccess
- If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method.type
- Type of the user.languageCode
- IETF language tag of the user's language; only available to bots.addedToAttachmentMenu
- True, if the user added the current bot to attachment menu; only available to bots.
-
User
Represents a user.- Parameters:
input
- Serialized input- Throws:
IOException
- the deserialization failed
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-