diff --git a/src/types/inline_query_result_cached_video.rs b/src/types/inline_query_result_cached_video.rs index 3c3d9762..645892b0 100644 --- a/src/types/inline_query_result_cached_video.rs +++ b/src/types/inline_query_result_cached_video.rs @@ -44,3 +44,78 @@ pub struct InlineQueryResultCachedVideo { /// Content of the message to be sent instead of the video. pub input_message_content: Option, } + +impl InlineQueryResultCachedVideo { + pub fn new(id: S1, video_file_id: S2, title: S3) -> Self + where + S1: Into, + S2: Into, + S3: Into, + { + Self { + id: id.into(), + video_file_id: video_file_id.into(), + title: title.into(), + description: None, + caption: None, + parse_mode: None, + reply_markup: None, + input_message_content: None, + } + } + + pub fn id(mut self, val: S) -> Self + where + S: Into, + { + self.id = val.into(); + self + } + + pub fn video_file_id(mut self, val: S) -> Self + where + S: Into, + { + self.video_file_id = val.into(); + self + } + + pub fn title(mut self, val: S) -> Self + where + S: Into, + { + self.title = val.into(); + self + } + + pub fn description(mut self, val: S) -> Self + where + S: Into, + { + self.description = Some(val.into()); + self + } + + pub fn caption(mut self, val: S) -> Self + where + S: Into, + { + self.caption = Some(val.into()); + self + } + + pub fn parse_mode(mut self, val: ParseMode) -> Self { + self.parse_mode = Some(val); + self + } + + pub fn reply_markup(mut self, val: InlineKeyboardMarkup) -> Self { + self.reply_markup = Some(val); + self + } + + pub fn input_message_content(mut self, val: InputMessageContent) -> Self { + self.input_message_content = Some(val); + self + } +}