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

Package it.tdlight.jni

# Class TdApi.InputMessageVoiceNote

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

Enclosing class:
  TdApi

    public static class TdApi.InputMessageVoiceNote
    extends TdApi.InputMessageContent

A voice note message.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`TdApi.FormattedText` | `caption` | Voice note caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters.
`static int` | `CONSTRUCTOR` |
`int` | `duration` | Duration of the voice note, in seconds.
`TdApi.InputFile` | `voiceNote` | Voice note to be sent.
`byte[]` | `waveform` | Waveform representation of the voice note, in 5-bit format.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`InputMessageVoiceNote()` | A voice note message.
`InputMessageVoiceNote​(TdApi.InputFile voiceNote, int duration, byte[] waveform, TdApi.FormattedText caption)` | A voice note message.
`InputMessageVoiceNote​(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

### voiceNote

public TdApi.InputFile voiceNote
Voice note to be sent.

### duration

public int duration
Duration of the voice note, in seconds.

### waveform

public byte[] waveform
Waveform representation of the voice note, in 5-bit format.

### caption

public TdApi.FormattedText caption
Voice note caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### InputMessageVoiceNote

public InputMessageVoiceNote()
A voice note message.

### InputMessageVoiceNote

public InputMessageVoiceNote​(TdApi.InputFile voiceNote, int duration, byte[] waveform, TdApi.FormattedText caption)
A voice note message.

Parameters:
  `voiceNote` - InputFile Voice note to be sent.
  `duration` - int Duration of the voice note, in seconds.
  `waveform` - byte[] Waveform representation of the voice note, in 5-bit format.
  `caption` - FormattedText Voice note caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters.

### InputMessageVoiceNote

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