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

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.GetMessages

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Messages>
it.tdlight.jni.TdApi.GetMessages

Enclosing class:
  TdApi

public static final class TdApi.GetMessages extends TdApi.Function<TdApi.Messages>
Returns information about messages. If a message is not found, returns null on the corresponding position of the result. Returns `Messages`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Identifier of the chat the messages belong to.
`static final int`
`CONSTRUCTOR`
`long[]`
`messageIds`
Identifiers of the messages to get.

## Constructor Summary

Constructors
Constructor
Description
`GetMessages()`
Returns information about messages.
`GetMessages(long chatId, long[] messageIds)`
Returns information about messages.
`GetMessages(DataInput input)`
Returns information about 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
Identifier of the chat the messages belong to.

### messageIds

public long[] messageIds
Identifiers of the messages to get.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### GetMessages

public GetMessages()
Returns information about messages. If a message is not found, returns null on the corresponding position of the result. Returns `Messages`

### GetMessages

public GetMessages(long chatId, long[] messageIds)
Returns information about messages. If a message is not found, returns null on the corresponding position of the result. Returns `Messages`

Parameters:
  `chatId` - long Identifier of the chat the messages belong to.
  `messageIds` - long[] Identifiers of the messages to get.

### GetMessages

public GetMessages(DataInput input) throws IOException
Returns information about messages. If a message is not found, returns null on the corresponding position of the result. Returns `Messages`

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`