# TdApi.MessageSendOptions (TDLight API 4.0.458 API)
declaration: module: tdlight.api, package: it.tdlight.jni, class: TdApi, class: MessageSendOptions

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.MessageSendOptions

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.MessageSendOptions

Enclosing class:
  TdApi

public static final class TdApi.MessageSendOptions extends TdApi.Object
Options to be used when a message is sent.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`boolean`
`disableNotification`
Pass true to disable notification for the message.
`boolean`
`fromBackground`
Pass true if the message is sent from the background.
`boolean`
`protectContent`
Pass true if the content of the message must be protected from forwarding and saving; for bots only.
`TdApi.MessageSchedulingState`
`schedulingState`
Message scheduling state; pass null to send message immediately.
`int`
`sendingId`
Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.
`boolean`
`updateOrderOfInstalledStickerSets`
Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.

## Constructor Summary

Constructors
Constructor
Description
`MessageSendOptions()`
Options to be used when a message is sent.
`MessageSendOptions(boolean disableNotification, boolean fromBackground, boolean protectContent, boolean updateOrderOfInstalledStickerSets, TdApi.MessageSchedulingState schedulingState, int sendingId)`
Options to be used when a message is sent.
`MessageSendOptions(DataInput input)`
Options to be used when a message is sent.

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

`serialize, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### disableNotification

public boolean disableNotification
Pass true to disable notification for the message.

### fromBackground

public boolean fromBackground
Pass true if the message is sent from the background.

### protectContent

public boolean protectContent
Pass true if the content of the message must be protected from forwarding and saving; for bots only.

### updateOrderOfInstalledStickerSets

public boolean updateOrderOfInstalledStickerSets
Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.

### schedulingState

public TdApi.MessageSchedulingState schedulingState
Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled.

### sendingId

public int sendingId
Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.

### CONSTRUCTOR

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

See Also:
  - Constant Field Values

## Constructor Details

### MessageSendOptions

public MessageSendOptions()
Options to be used when a message is sent.

### MessageSendOptions

public MessageSendOptions(boolean disableNotification, boolean fromBackground, boolean protectContent, boolean updateOrderOfInstalledStickerSets, TdApi.MessageSchedulingState schedulingState, int sendingId)
Options to be used when a message is sent.

Parameters:
  `disableNotification` - Pass true to disable notification for the message.
  `fromBackground` - Pass true if the message is sent from the background.
  `protectContent` - Pass true if the content of the message must be protected from forwarding and saving; for bots only.
  `updateOrderOfInstalledStickerSets` - Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum.
  `schedulingState` - Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled.
  `sendingId` - Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates.

### MessageSendOptions

public MessageSendOptions(DataInput input) throws IOException
Options to be used when a message is sent.

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`