Module tdlight.api
Package it.tdlight.jni

# Class TdApi.SearchSavedMessages

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.FoundChatMessages>
it.tdlight.jni.TdApi.SearchSavedMessages

Enclosing class:
  TdApi

public static final class TdApi.SearchSavedMessages extends TdApi.Function<TdApi.FoundChatMessages>
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

Returns `FoundChatMessages`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`long`
`fromMessageId`
Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
`int`
`limit`
The maximum number of messages to be returned; must be positive and can't be greater than 100.
`int`
`offset`
Specify 0 to get results from exactly the message fromMessageId or a negative offset to get the specified message and some newer messages.
`String`
`query`
Query to search for.
`long`
`savedMessagesTopicId`
If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
`TdApi.ReactionType`
`tag`
Tag to search for; pass null to return all suitable messages.

## Constructor Summary

Constructors
Constructor
Description
`SearchSavedMessages()`
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.
`SearchSavedMessages(long savedMessagesTopicId, TdApi.ReactionType tag, String query, long fromMessageId, int offset, int limit)`
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.
`SearchSavedMessages(DataInput input)`
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

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

### savedMessagesTopicId

public long savedMessagesTopicId
If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.

### tag

public TdApi.ReactionType tag
Tag to search for; pass null to return all suitable messages.

### query

public String query
Query to search for.

### fromMessageId

public long fromMessageId
Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.

### offset

public int offset
Specify 0 to get results from exactly the message fromMessageId or a negative offset to get the specified message and some newer messages.

### limit

public int limit
The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### SearchSavedMessages

public SearchSavedMessages()
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

Returns `FoundChatMessages`

### SearchSavedMessages

public SearchSavedMessages(long savedMessagesTopicId, TdApi.ReactionType tag, String query, long fromMessageId, int offset, int limit)
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

Returns `FoundChatMessages`

Parameters:
  `savedMessagesTopicId` - If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
  `tag` - Tag to search for; pass null to return all suitable messages.
  `query` - Query to search for.
  `fromMessageId` - Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  `offset` - Specify 0 to get results from exactly the message fromMessageId or a negative offset to get the specified message and some newer messages.
  `limit` - The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

  Returns `FoundChatMessages`

### SearchSavedMessages

public SearchSavedMessages(DataInput input) throws IOException
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

Returns `FoundChatMessages`

Parameters:
  `input` - Serialized input
Throws:
  `IOException` - the deserialization failed

## Method Details

### getConstructor

public int getConstructor()
Description copied from class: `TdApi.Object`
Returns an identifier uniquely determining type of the object.

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

### serialize

public void serialize(DataOutput output) throws IOException
Serialize the TDLib class

Specified by:
  `serialize` in class `TdApi.Object`
Parameters:
  `output` - output data stream
Throws:
  `IOException` - the serialization failed

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`