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

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.DeleteMessages

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

Enclosing class:
  TdApi

public static final class TdApi.DeleteMessages extends TdApi.Function<TdApi.Ok>
Deletes messages. Returns `Ok`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Chat identifier.
`static final int`
`CONSTRUCTOR`
`long[]`
`messageIds`
Identifiers of the messages to be deleted.
`boolean`
`revoke`
Pass true to delete messages for all chat members.

## Constructor Summary

Constructors
Constructor
Description
`DeleteMessages()`
Deletes messages.
`DeleteMessages(long chatId, long[] messageIds, boolean revoke)`
Deletes messages.
`DeleteMessages(DataInput input)`
Deletes messages.

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

### messageIds

public long[] messageIds
Identifiers of the messages to be deleted.

### revoke

public boolean revoke
Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### DeleteMessages

public DeleteMessages()
Deletes messages. Returns `Ok`

### DeleteMessages

public DeleteMessages(long chatId, long[] messageIds, boolean revoke)
Deletes messages. Returns `Ok`

Parameters:
  `chatId` - long Chat identifier.
  `messageIds` - long[] Identifiers of the messages to be deleted.
  `revoke` - boolean Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats.

### DeleteMessages

public DeleteMessages(DataInput input) throws IOException
Deletes messages. 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`