# TdApi.SetChatMessageAutoDeleteTime (tdlight API 4.0.311 API)
declaration: module: tdlight.api, package: it.tdlight.jni, class: TdApi, class: SetChatMessageAutoDeleteTime

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.SetChatMessageAutoDeleteTime

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Ok>
it.tdlight.jni.TdApi.SetChatMessageAutoDeleteTime

Enclosing class:
  TdApi

public static final class TdApi.SetChatMessageAutoDeleteTime extends TdApi.Function<TdApi.Ok>
Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires changeInfo administrator right in basic groups, supergroups and channels Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). Returns `Ok`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Chat identifier.
`static final int`
`CONSTRUCTOR`
`int`
`messageAutoDeleteTime`
New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400.

## Constructor Summary

Constructors
Constructor
Description
`SetChatMessageAutoDeleteTime()`
Changes the message auto-delete or self-destruct (for secret chats) time in a chat.
`SetChatMessageAutoDeleteTime(long chatId, int messageAutoDeleteTime)`
Changes the message auto-delete or self-destruct (for secret chats) time in a chat.
`SetChatMessageAutoDeleteTime(DataInput input)`
Changes the message auto-delete or self-destruct (for secret chats) time in a chat.

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

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

## Field Details

### chatId

public long chatId
Chat identifier.

### messageAutoDeleteTime

public int messageAutoDeleteTime
New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### SetChatMessageAutoDeleteTime

public SetChatMessageAutoDeleteTime()
Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires changeInfo administrator right in basic groups, supergroups and channels Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). Returns `Ok`

### SetChatMessageAutoDeleteTime

public SetChatMessageAutoDeleteTime(long chatId, int messageAutoDeleteTime)
Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires changeInfo administrator right in basic groups, supergroups and channels Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). Returns `Ok`

Parameters:
  `chatId` - long Chat identifier.
  `messageAutoDeleteTime` - int New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically.

### SetChatMessageAutoDeleteTime

public SetChatMessageAutoDeleteTime(DataInput input) throws IOException
Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires changeInfo administrator right in basic groups, supergroups and channels Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). Returns `Ok`

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`