conogram/entities/inline_query_result_contact.rs
1use serde::Serialize;
2
3use crate::entities::{
4 inline_keyboard_markup::InlineKeyboardMarkup, input_message_content::InputMessageContent,
5};
6
7/// Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input\_message\_content* to send a message with the specified content instead of the contact.
8///
9/// API Reference: [link](https://core.telegram.org/bots/api/#inlinequeryresultcontact)
10#[derive(Debug, Clone, Default, PartialEq, Serialize)]
11pub struct InlineQueryResultContact {
12 /// Unique identifier for this result, 1-64 Bytes
13 pub id: String,
14
15 /// Contact's phone number
16 pub phone_number: String,
17
18 /// Contact's first name
19 pub first_name: String,
20
21 /// *Optional*. Contact's last name
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub last_name: Option<String>,
24
25 /// *Optional*. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub vcard: Option<String>,
28
29 /// *Optional*. [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub reply_markup: Option<InlineKeyboardMarkup>,
32
33 /// *Optional*. Content of the message to be sent instead of the contact
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub input_message_content: Option<InputMessageContent>,
36
37 /// *Optional*. Url of the thumbnail for the result
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub thumbnail_url: Option<String>,
40
41 /// *Optional*. Thumbnail width
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub thumbnail_width: Option<i64>,
44
45 /// *Optional*. Thumbnail height
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub thumbnail_height: Option<i64>,
48}
49
50// Divider: all content below this line will be preserved after code regen