Package it.ernytech.tdlib

## Class TdApi.Chat

- java.lang.Object
- - it.ernytech.tdlib.TdApi.Object
  - - it.ernytech.tdlib.TdApi.Chat

Enclosing class:
  TdApi

    public static class TdApi.Chat
    extends TdApi.Object

A chat. (Can be a private chat, basic group, supergroup, or secret chat.)

### Field Summary

Fields
`boolean` `canBeReported` True, if the chat can be reported to Telegram moderators through reportChat.
`java.lang.String` `clientData` Contains client-specific data associated with the chat.
`static int` `CONSTRUCTOR` Identifier uniquely determining type of the object.
`TdApi.DraftMessage` `draftMessage` A draft of a message in the chat; may be null.
`long` `id` Chat unique identifier.
`boolean` `isPinned` True, if the chat is pinned.
`TdApi.Message` `lastMessage` Last message in the chat; may be null.
`long` `lastReadInboxMessageId` Identifier of the last read incoming message.
`long` `lastReadOutboxMessageId` Identifier of the last read outgoing message.
`TdApi.NotificationSettings` `notificationSettings` Notification settings for this chat.
`long` `order` Descending parameter by which chats are sorted in the main chat list.
`TdApi.ChatPhoto` `photo` Chat photo; may be null.
`long` `replyMarkupMessageId` Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
`java.lang.String` `title` Chat title.
`TdApi.ChatType` `type` Type of the chat.
`int` `unreadCount` Number of unread messages in the chat.
`int` `unreadMentionCount` Number of unread messages with a mention/reply in the chat.

### Constructor Summary

Constructors
`Chat()` Default constructor.

`Chat​(long id, TdApi.ChatType type, java.lang.String title, TdApi.ChatPhoto photo, TdApi.Message lastMessage, long order, boolean isPinned, boolean canBeReported, int unreadCount, long lastReadInboxMessageId, long lastReadOutboxMessageId, int unreadMentionCount, TdApi.NotificationSettings notificationSettings, long replyMarkupMessageId, TdApi.DraftMessage draftMessage, java.lang.String clientData)`

Constructor for initialization of all fields.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getConstructor()`

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

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

### Methods inherited from class it.ernytech.tdlib.TdApi.Object

`toString`

### Field Detail

#### id

    public long id

Chat unique identifier.

#### type

    public TdApi.ChatType type

Type of the chat.

#### title

    public java.lang.String title

Chat title.

#### photo

    public TdApi.ChatPhoto photo

Chat photo; may be null.

#### lastMessage

    public TdApi.Message lastMessage

Last message in the chat; may be null.

#### order

    public long order

Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined.

#### isPinned

    public boolean isPinned

True, if the chat is pinned.

#### canBeReported

    public boolean canBeReported

True, if the chat can be reported to Telegram moderators through reportChat.

#### unreadCount

    public int unreadCount

Number of unread messages in the chat.

#### lastReadInboxMessageId

    public long lastReadInboxMessageId

Identifier of the last read incoming message.

#### lastReadOutboxMessageId

    public long lastReadOutboxMessageId

Identifier of the last read outgoing message.

#### unreadMentionCount

    public int unreadMentionCount

Number of unread messages with a mention/reply in the chat.

#### notificationSettings

    public TdApi.NotificationSettings notificationSettings

Notification settings for this chat.

#### replyMarkupMessageId

    public long replyMarkupMessageId

Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.

#### draftMessage

    public TdApi.DraftMessage draftMessage

A draft of a message in the chat; may be null.

#### clientData

    public java.lang.String clientData

Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used.

#### CONSTRUCTOR

    public static final int CONSTRUCTOR

Identifier uniquely determining type of the object.

See Also:
  Constant Field Values

### Constructor Detail

#### Chat

    public Chat()

Default constructor.

#### Chat

    public Chat​(long id,
                TdApi.ChatType type,
                java.lang.String title,
                TdApi.ChatPhoto photo,
                TdApi.Message lastMessage,
                long order,
                boolean isPinned,
                boolean canBeReported,
                int unreadCount,
                long lastReadInboxMessageId,
                long lastReadOutboxMessageId,
                int unreadMentionCount,
                TdApi.NotificationSettings notificationSettings,
                long replyMarkupMessageId,
                TdApi.DraftMessage draftMessage,
                java.lang.String clientData)

Constructor for initialization of all fields.

Parameters:
  `id` - Chat unique identifier.
  `type` - Type of the chat.
  `title` - Chat title.
  `photo` - Chat photo; may be null.
  `lastMessage` - Last message in the chat; may be null.
  `order` - Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined.
  `isPinned` - True, if the chat is pinned.
  `canBeReported` - True, if the chat can be reported to Telegram moderators through reportChat.
  `unreadCount` - Number of unread messages in the chat.
  `lastReadInboxMessageId` - Identifier of the last read incoming message.
  `lastReadOutboxMessageId` - Identifier of the last read outgoing message.
  `unreadMentionCount` - Number of unread messages with a mention/reply in the chat.
  `notificationSettings` - Notification settings for this chat.
  `replyMarkupMessageId` - Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat.
  `draftMessage` - A draft of a message in the chat; may be null.
  `clientData` - Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used.

### Method Detail

#### getConstructor

    public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`
Returns:
  this.CONSTRUCTOR