# TdApi.SetChatMessageTtlSetting (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: SetChatMessageTtlSetting

Package it.tdlight.jni

# Class TdApi.SetChatMessageTtlSetting

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function
it.tdlight.jni.TdApi.SetChatMessageTtlSetting

Enclosing class:
  TdApi

    public static class TdApi.SetChatMessageTtlSetting
    extends TdApi.Function

Changes the message TTL setting (sets a new self-destruct timer) in a chat. Requires canDeleteMessages administrator right in basic groups, supergroups and channels Message TTL setting of a chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be changed.

Returns `Ok`

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`long` | `chatId` | Chat identifier.
`static int` | `CONSTRUCTOR` |
`int` | `ttl` | New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`SetChatMessageTtlSetting()` | Changes the message TTL setting (sets a new self-destruct timer) in a chat.
`SetChatMessageTtlSetting​(long chatId, int ttl)` | Changes the message TTL setting (sets a new self-destruct timer) in a chat.
`SetChatMessageTtlSetting​(DataInput input)` |

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

`toString`

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

`serialize`

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

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### chatId

public long chatId
Chat identifier.

### ttl

public int ttl
New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### SetChatMessageTtlSetting

public SetChatMessageTtlSetting()
Changes the message TTL setting (sets a new self-destruct timer) in a chat. Requires canDeleteMessages administrator right in basic groups, supergroups and channels Message TTL setting of a chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be changed.

Returns `Ok`

### SetChatMessageTtlSetting

public SetChatMessageTtlSetting​(long chatId, int ttl)
Changes the message TTL setting (sets a new self-destruct timer) in a chat. Requires canDeleteMessages administrator right in basic groups, supergroups and channels Message TTL setting of a chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be changed.

Returns `Ok`

Parameters:
  `chatId` - long Chat identifier.
  `ttl` - int New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret.

### SetChatMessageTtlSetting

public SetChatMessageTtlSetting​(DataInput input) throws IOException

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`