teloxide_core/types/
external_reply_info.rs1use serde::{Deserialize, Serialize};
2
3use crate::types::{
4    Animation, Audio, Chat, Contact, Dice, Document, Game, Giveaway, GiveawayWinners, Invoice,
5    LinkPreviewOptions, Location, MessageId, MessageOrigin, PhotoSize, Poll, Sticker, Story, Venue,
6    Video, VideoNote, Voice,
7};
8
9#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct ExternalReplyInfo {
13    pub origin: MessageOrigin,
15    pub chat: Option<Chat>,
18    #[serde(with = "crate::types::option_msg_id_as_int")]
21    pub message_id: Option<MessageId>,
22    pub link_preview_options: Option<LinkPreviewOptions>,
25    #[serde(default)]
27    pub has_media_spoiler: bool,
28
29    #[serde(flatten)]
30    pub kind: ExternalReplyInfoKind,
31}
32
33#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
34#[serde(rename_all = "snake_case")]
35pub enum ExternalReplyInfoKind {
36    Animation(Animation),
45    Audio(Audio),
46    Contact(Contact),
47    Dice(Dice),
48    Document(Document),
49    Game(Game),
50    Venue(Venue),
51    Location(Location),
52    Photo(Vec<PhotoSize>),
53    Poll(Poll),
54    Sticker(Sticker),
55    Story(Story),
56    Giveaway(Giveaway),
57    GiveawayWinners(GiveawayWinners),
58    Video(Video),
59    VideoNote(VideoNote),
60    Voice(Voice),
61    Invoice(Invoice),
62}