Module tdlight.api
Package it.tdlight.jni

# Class TdApi.User

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.User

Enclosing class:
  TdApi

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

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`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`
`isContact`
The user is a contact of the current user.
`boolean`
`isFake`
True, if many users reported this user as a fake account.
`boolean`
`isMutualContact`
The user is a contact of the current user and the current user is a contact of the user.
`boolean`
`isScam`
True, if many users reported this user as a scam.
`boolean`
`isSupport`
True, if the user is Telegram support account.
`boolean`
`isVerified`
True, if the user is verified.
`String`
`languageCode`
IETF language tag of the user's language; only available to bots.
`String`
`lastName`
Last name of the user.
`String`
`phoneNumber`
Phone number of the user.
`TdApi.ProfilePhoto`
`profilePhoto`
Profile photo of the user; may be null.
`String`
`restrictionReason`
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
`TdApi.UserStatus`
`status`
Current online status of the user.
`TdApi.UserType`
`type`
Type of the user.
`String`
`username`
Username of the user.

## Constructor Summary

Constructors
Constructor
Description
`User()`
Represents a user.
`User(long id, String firstName, String lastName, String username, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, boolean isContact, boolean isMutualContact, boolean isVerified, boolean isSupport, String restrictionReason, boolean isScam, boolean isFake, boolean haveAccess, TdApi.UserType type, String languageCode)`
Represents a user.
`User(DataInput input)`
Represents a user.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

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

`clone, finalize, getClass, 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.

### username

public String username
Username of the user.

### phoneNumber

public String phoneNumber
Phone number of the user.

### status

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

### profilePhoto

public TdApi.ProfilePhoto profilePhoto
Profile photo of the user; 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.

### isVerified

public boolean isVerified
True, if the user is verified.

### isSupport

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

### restrictionReason

public String restrictionReason
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.

### isScam

public boolean isScam
True, if many users reported this user as a scam.

### isFake

public boolean isFake
True, if many users reported this user as a fake account.

### haveAccess

public boolean haveAccess
If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser.

### 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.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### User

public User()
Represents a user.

### User

public User(long id, String firstName, String lastName, String username, String phoneNumber, TdApi.UserStatus status, TdApi.ProfilePhoto profilePhoto, boolean isContact, boolean isMutualContact, boolean isVerified, boolean isSupport, String restrictionReason, boolean isScam, boolean isFake, boolean haveAccess, TdApi.UserType type, String languageCode)
Represents a user.

Parameters:
  `id` - long User identifier.
  `firstName` - String First name of the user.
  `lastName` - String Last name of the user.
  `username` - String Username of the user.
  `phoneNumber` - String Phone number of the user.
  `status` - UserStatus Current online status of the user.
  `profilePhoto` - ProfilePhoto Profile photo of the user; may be null.
  `isContact` - boolean The user is a contact of the current user.
  `isMutualContact` - boolean The user is a contact of the current user and the current user is a contact of the user.
  `isVerified` - boolean True, if the user is verified.
  `isSupport` - boolean True, if the user is Telegram support account.
  `restrictionReason` - String If non-empty, it contains a human-readable description of the reason why access to this user must be restricted.
  `isScam` - boolean True, if many users reported this user as a scam.
  `isFake` - boolean True, if many users reported this user as a fake account.
  `haveAccess` - boolean If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser.
  `type` - UserType Type of the user.
  `languageCode` - String IETF language tag of the user's language; only available to bots.

### User

public User(DataInput input) throws IOException
Represents a user.

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`