conogram/entities/gift.rs
1use serde::{Deserialize, Serialize};
2
3use crate::entities::sticker::Sticker;
4
5/// This object represents a gift that can be sent by the bot.
6///
7/// API Reference: [link](https://core.telegram.org/bots/api/#gift)
8#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9pub struct Gift {
10 /// Unique identifier of the gift
11 pub id: String,
12
13 /// The sticker that represents the gift
14 pub sticker: Sticker,
15
16 /// The number of Telegram Stars that must be paid to send the sticker
17 pub star_count: i64,
18
19 /// *Optional*. The total number of the gifts of this type that can be sent; for limited gifts only
20 #[serde(default, skip_serializing_if = "Option::is_none")]
21 pub total_count: Option<i64>,
22
23 /// *Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only
24 #[serde(default, skip_serializing_if = "Option::is_none")]
25 pub remaining_count: Option<i64>,
26}
27
28// Divider: all content below this line will be preserved after code regen