Package org.drinkless.tdlib

# Class TdApi.User

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.User

Enclosing class:
  `TdApi`

public static class TdApi.User extends TdApi.Object
Represents a user.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `accentColorId`
  Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
  `TdApi.ActiveStoryState`
  `activeStoryState`
  State of active stories of the user; may be null if the user has no active stories.
  `boolean`
  `addedToAttachmentMenu`
  True, if the user added the current bot to attachment menu; only available to bots.
  `long`
  `backgroundCustomEmojiId`
  Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.EmojiStatus`
  `emojiStatus`
  Emoji status to be shown instead of the default Telegram Premium badge; may be null.
  `String`
  `firstName`
  First name of the user.
  `boolean`
  `haveAccess`
  If false, the user is inaccessible, and the only information known about the user is inside this class.
  `long`
  `id`
  User identifier.
  `boolean`
  `isCloseFriend`
  The user is a close friend of the current user; implies that the user is a contact.
  `boolean`
  `isContact`
  The user is a contact of the current user.
  `boolean`
  `isMutualContact`
  The user is a contact of the current user and the current user is a contact of the user.
  `boolean`
  `isPremium`
  True, if the user is a Telegram Premium user.
  `boolean`
  `isSupport`
  True, if the user is Telegram support account.
  `String`
  `languageCode`
  IETF language tag of the user's language; only available to bots.
  `String`
  `lastName`
  Last name of the user.
  `long`
  `paidMessageStarCount`
  Number of Telegram Stars that must be paid by general user for each sent message to the user.
  `String`
  `phoneNumber`
  Phone number of the user.
  `int`
  `profileAccentColorId`
  Identifier of the accent color for the user's profile; -1 if none.
  `long`
  `profileBackgroundCustomEmojiId`
  Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
  `TdApi.ProfilePhoto`
  `profilePhoto`
  Profile photo of the user; may be null.
  `TdApi.RestrictionInfo`
  `restrictionInfo`
  Information about restrictions that must be applied to the corresponding private chat; may be null if none.
  `boolean`
  `restrictsNewChats`
  True, if the user may restrict new chats with non-contacts.
  `TdApi.UserStatus`
  `status`
  Current online status of the user.
  `TdApi.UserType`
  `type`
  Type of the user.
  `TdApi.UpgradedGiftColors`
  `upgradedGiftColors`
  Color scheme based on an upgraded gift to be used for the user instead of accentColorId and backgroundCustomEmojiId; may be null if none.
  `TdApi.Usernames`
  `usernames`
  Usernames of the user; may be null.
  `TdApi.VerificationStatus`
  `verificationStatus`
  Information about verification status of the user; may be null if none.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `User()`
  Represents a user.
  `User(long id, String firstName, String lastName, TdApi.Usernames usernames, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, int accentColorId, long backgroundCustomEmojiId, TdApi.UpgradedGiftColors upgradedGiftColors, int profileAccentColorId, long profileBackgroundCustomEmojiId, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isCloseFriend, TdApi.VerificationStatus verificationStatus, boolean isPremium, boolean isSupport, TdApi.RestrictionInfo restrictionInfo, TdApi.ActiveStoryState activeStoryState, boolean restrictsNewChats, long paidMessageStarCount, boolean haveAccess, TdApi.UserType type, String languageCode, boolean addedToAttachmentMenu)`
  Represents a user.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### id

    public long id
    User identifier.

  - ### firstName

    public String firstName
    First name of the user.

  - ### lastName

    public String lastName
    Last name of the user.

  - ### usernames

    @Nullable public TdApi.Usernames usernames
    Usernames of the user; may be null.

  - ### phoneNumber

    public String phoneNumber
    Phone number of the user.

  - ### status

    public TdApi.UserStatus status
    Current online status of the user.

  - ### profilePhoto

    @Nullable public TdApi.ProfilePhoto profilePhoto
    Profile photo of the user; may be null.

  - ### accentColorId

    public int accentColorId
    Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.

  - ### backgroundCustomEmojiId

    public long backgroundCustomEmojiId
    Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.

  - ### upgradedGiftColors

    @Nullable public TdApi.UpgradedGiftColors upgradedGiftColors
    Color scheme based on an upgraded gift to be used for the user instead of accentColorId and backgroundCustomEmojiId; may be null if none.

  - ### profileAccentColorId

    public int profileAccentColorId
    Identifier of the accent color for the user's profile; -1 if none.

  - ### profileBackgroundCustomEmojiId

    public long profileBackgroundCustomEmojiId
    Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.

  - ### emojiStatus

    @Nullable public TdApi.EmojiStatus emojiStatus
    Emoji status to be shown instead of the default Telegram Premium badge; may be null.

  - ### isContact

    public boolean isContact
    The user is a contact of the current user.

  - ### isMutualContact

    public boolean isMutualContact
    The user is a contact of the current user and the current user is a contact of the user.

  - ### isCloseFriend

    public boolean isCloseFriend
    The user is a close friend of the current user; implies that the user is a contact.

  - ### verificationStatus

    @Nullable public TdApi.VerificationStatus verificationStatus
    Information about verification status of the user; may be null if none.

  - ### isPremium

    public boolean isPremium
    True, if the user is a Telegram Premium user.

  - ### isSupport

    public boolean isSupport
    True, if the user is Telegram support account.

  - ### restrictionInfo

    @Nullable public TdApi.RestrictionInfo restrictionInfo
    Information about restrictions that must be applied to the corresponding private chat; may be null if none.

  - ### activeStoryState

    @Nullable public TdApi.ActiveStoryState activeStoryState
    State of active stories of the user; may be null if the user has no active stories.

  - ### restrictsNewChats

    public boolean restrictsNewChats
    True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.

  - ### paidMessageStarCount

    public long paidMessageStarCount
    Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.

  - ### haveAccess

    public boolean 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

    public TdApi.UserType type
    Type of the user.

  - ### languageCode

    public String languageCode
    IETF language tag of the user's language; only available to bots.

  - ### addedToAttachmentMenu

    public boolean addedToAttachmentMenu
    True, if the user added the current bot to attachment menu; only available to bots.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## 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, int accentColorId, long backgroundCustomEmojiId, TdApi.UpgradedGiftColors upgradedGiftColors, int profileAccentColorId, long profileBackgroundCustomEmojiId, TdApi.EmojiStatus emojiStatus, boolean isContact, boolean isMutualContact, boolean isCloseFriend, TdApi.VerificationStatus verificationStatus, boolean isPremium, boolean isSupport, TdApi.RestrictionInfo restrictionInfo, TdApi.ActiveStoryState activeStoryState, boolean restrictsNewChats, long paidMessageStarCount, 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.
      `accentColorId` - Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview.
      `backgroundCustomEmojiId` - Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none.
      `upgradedGiftColors` - Color scheme based on an upgraded gift to be used for the user instead of accentColorId and backgroundCustomEmojiId; may be null if none.
      `profileAccentColorId` - Identifier of the accent color for the user's profile; -1 if none.
      `profileBackgroundCustomEmojiId` - Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none.
      `emojiStatus` - Emoji status to be shown instead of the default Telegram Premium badge; may be null.
      `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.
      `verificationStatus` - Information about verification status of the user; may be null if none.
      `isPremium` - True, if the user is a Telegram Premium user.
      `isSupport` - True, if the user is Telegram support account.
      `restrictionInfo` - Information about restrictions that must be applied to the corresponding private chat; may be null if none.
      `activeStoryState` - State of active stories of the user; may be null if the user has no active stories.
      `restrictsNewChats` - True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them.
      `paidMessageStarCount` - Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay.
      `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.

- ## 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 class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR