conogram/entities/
inline_query_result_cached_mpeg4_gif.rs

1use serde::Serialize;
2
3use crate::{
4    entities::{
5        inline_keyboard_markup::InlineKeyboardMarkup, input_message_content::InputMessageContent,
6        message_entity::MessageEntity,
7    },
8    utils::deserialize_utils::is_false,
9};
10
11/// Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the animation.
12///
13/// API Reference: [link](https://core.telegram.org/bots/api/#inlinequeryresultcachedmpeg4gif)
14#[derive(Debug, Clone, Default, PartialEq, Serialize)]
15pub struct InlineQueryResultCachedMpeg4Gif {
16    /// Unique identifier for this result, 1-64 bytes
17    pub id: String,
18
19    /// A valid file identifier for the MPEG4 file
20    pub mpeg4_file_id: String,
21
22    /// *Optional*. Title for the result
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub title: Option<String>,
25
26    /// *Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub caption: Option<String>,
29
30    /// *Optional*. Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api/#formatting-options) for more details.
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub parse_mode: Option<String>,
33
34    /// *Optional*. List of special entities that appear in the caption, which can be specified instead of *parse\_mode*
35    #[serde(skip_serializing_if = "Vec::is_empty")]
36    pub caption_entities: Vec<MessageEntity>,
37
38    /// *Optional*. Pass *True*, if the caption must be shown above the message media
39    #[serde(skip_serializing_if = "is_false")]
40    pub show_caption_above_media: bool,
41
42    /// *Optional*. [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message
43    #[serde(skip_serializing_if = "Option::is_none")]
44    pub reply_markup: Option<InlineKeyboardMarkup>,
45
46    /// *Optional*. Content of the message to be sent instead of the video animation
47    #[serde(skip_serializing_if = "Option::is_none")]
48    pub input_message_content: Option<InputMessageContent>,
49}
50
51// Divider: all content below this line will be preserved after code regen