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

Package it.tdlight.jni

# Class TdApi.AnswerInlineQuery

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

Enclosing class:
  TdApi

    public static class TdApi.AnswerInlineQuery
    extends TdApi.Function

Sets the result of an inline query; for bots only.

Returns `Ok`

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`int` | `cacheTime` | Allowed time to cache the results of the query, in seconds.
`static int` | `CONSTRUCTOR` |
`long` | `inlineQueryId` | Identifier of the inline query.
`boolean` | `isPersonal` | True, if the result of the query can be cached for the specified user.
`String` | `nextOffset` | Offset for the next inline query; pass an empty string if there are no more results.
`TdApi.InputInlineQueryResult[]` | `results` | The results of the query.
`String` | `switchPmParameter` | The parameter for the bot start message.
`String` | `switchPmText` | If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switchPmParameter.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`AnswerInlineQuery()` | Sets the result of an inline query; for bots only.
`AnswerInlineQuery​(long inlineQueryId, boolean isPersonal, TdApi.InputInlineQueryResult[] results, int cacheTime, String nextOffset, String switchPmText, String switchPmParameter)` | Sets the result of an inline query; for bots only.
`AnswerInlineQuery​(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

### inlineQueryId

public long inlineQueryId
Identifier of the inline query.

### isPersonal

public boolean isPersonal
True, if the result of the query can be cached for the specified user.

### results

public TdApi.InputInlineQueryResult[] results
The results of the query.

### cacheTime

public int cacheTime
Allowed time to cache the results of the query, in seconds.

### nextOffset

public String nextOffset
Offset for the next inline query; pass an empty string if there are no more results.

### switchPmText

public String switchPmText
If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switchPmParameter.

### switchPmParameter

public String switchPmParameter
The parameter for the bot start message.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### AnswerInlineQuery

public AnswerInlineQuery()
Sets the result of an inline query; for bots only.

Returns `Ok`

### AnswerInlineQuery

public AnswerInlineQuery​(long inlineQueryId, boolean isPersonal, TdApi.InputInlineQueryResult[] results, int cacheTime, String nextOffset, String switchPmText, String switchPmParameter)
Sets the result of an inline query; for bots only.

Returns `Ok`

Parameters:
  `inlineQueryId` - long Identifier of the inline query.
  `isPersonal` - boolean True, if the result of the query can be cached for the specified user.
  `results` - InputInlineQueryResult[] The results of the query.
  `cacheTime` - int Allowed time to cache the results of the query, in seconds.
  `nextOffset` - String Offset for the next inline query; pass an empty string if there are no more results.
  `switchPmText` - String If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switchPmParameter.
  `switchPmParameter` - String The parameter for the bot start message.

### AnswerInlineQuery

public AnswerInlineQuery​(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`