conogram/entities/inline_query_result_cached_audio.rs
1use serde::Serialize;
2
3use crate::entities::{
4 inline_keyboard_markup::InlineKeyboardMarkup, input_message_content::InputMessageContent,
5 message_entity::MessageEntity,
6};
7
8/// Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the audio.
9///
10/// API Reference: [link](https://core.telegram.org/bots/api/#inlinequeryresultcachedaudio)
11#[derive(Debug, Clone, Default, PartialEq, Serialize)]
12pub struct InlineQueryResultCachedAudio {
13 /// Unique identifier for this result, 1-64 bytes
14 pub id: String,
15
16 /// A valid file identifier for the audio file
17 pub audio_file_id: String,
18
19 /// *Optional*. Caption, 0-1024 characters after entities parsing
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub caption: Option<String>,
22
23 /// *Optional*. Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub parse_mode: Option<String>,
26
27 /// *Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*
28 #[serde(skip_serializing_if = "Vec::is_empty")]
29 pub caption_entities: Vec<MessageEntity>,
30
31 /// *Optional*. [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub reply_markup: Option<InlineKeyboardMarkup>,
34
35 /// *Optional*. Content of the message to be sent instead of the audio
36 #[serde(skip_serializing_if = "Option::is_none")]
37 pub input_message_content: Option<InputMessageContent>,
38}
39
40// Divider: all content below this line will be preserved after code regen