ferrisgram/types/inline_query_result_document.rs
1// WARNING: THIS CODE IS AUTOGENERATED.
2// DO NOT EDIT!!!
3
4use crate::types::{InlineKeyboardMarkup, InputMessageContent, MessageEntity};
5use serde::{Deserialize, Serialize};
6
7/// Represents a link to a file. By default, this 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 file. Currently, only .PDF and .ZIP files can be sent using this method.
8/// <https://core.telegram.org/bots/api#inlinequeryresultdocument>
9#[derive(Serialize, Deserialize, Debug, Clone)]
10pub struct InlineQueryResultDocument {
11 /// Unique identifier for this result, 1-64 bytes
12 pub id: String,
13 /// Title for the result
14 pub title: String,
15 /// Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub caption: Option<String>,
18 /// Optional. Mode for parsing entities in the document caption. See formatting options for more details.
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub parse_mode: Option<String>,
21 /// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub caption_entities: Option<Vec<MessageEntity>>,
24 /// A valid URL for the file
25 pub document_url: String,
26 /// MIME type of the content of the file, either "application/pdf" or "application/zip"
27 pub mime_type: String,
28 /// Optional. Short description of the result
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub description: Option<String>,
31 /// Optional. Inline keyboard attached to the message
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub reply_markup: Option<InlineKeyboardMarkup>,
34 /// Optional. Content of the message to be sent instead of the file
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub input_message_content: Option<InputMessageContent>,
37 /// Optional. URL of the thumbnail (JPEG only) for the file
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub thumbnail_url: Option<String>,
40 /// Optional. Thumbnail width
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub thumbnail_width: Option<i64>,
43 /// Optional. Thumbnail height
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub thumbnail_height: Option<i64>,
46}