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

Package it.tdlight.jni

# Class TdApi.InputMessageText

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.InputMessageContent
it.tdlight.jni.TdApi.InputMessageText

Enclosing class:
  TdApi

    public static class TdApi.InputMessageText
    extends TdApi.InputMessageContent

A text message.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`boolean` | `clearDraft` | True, if a chat message draft must be deleted.
`static int` | `CONSTRUCTOR` |
`boolean` | `disableWebPagePreview` | True, if rich web page previews for URLs in the message text must be disabled.
`TdApi.FormattedText` | `text` | Formatted text to be sent; 1-GetOption("message_text_length_max") characters.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`InputMessageText()` | A text message.
`InputMessageText​(TdApi.FormattedText text, boolean disableWebPagePreview, boolean clearDraft)` | A text message.
`InputMessageText​(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.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### text

public TdApi.FormattedText text
Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually.

### disableWebPagePreview

public boolean disableWebPagePreview
True, if rich web page previews for URLs in the message text must be disabled.

### clearDraft

public boolean clearDraft
True, if a chat message draft must be deleted.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### InputMessageText

public InputMessageText()
A text message.

### InputMessageText

public InputMessageText​(TdApi.FormattedText text, boolean disableWebPagePreview, boolean clearDraft)
A text message.

Parameters:
  `text` - FormattedText Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually.
  `disableWebPagePreview` - boolean True, if rich web page previews for URLs in the message text must be disabled.
  `clearDraft` - boolean True, if a chat message draft must be deleted.

### InputMessageText

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