diff --git a/src/types/inline_query_result_video.rs b/src/types/inline_query_result_video.rs index f356b5dd..d51258fc 100644 --- a/src/types/inline_query_result_video.rs +++ b/src/types/inline_query_result_video.rs @@ -65,3 +65,118 @@ pub struct InlineQueryResultVideo { /// crate::types::InlineQueryResultVideo pub input_message_content: Option, } + +impl InlineQueryResultVideo { + pub fn new( + id: S1, + video_url: S2, + mime_type: MimeWrapper, + thumb_url: S3, + title: S4, + ) -> Self + where + S1: Into, + S2: Into, + S3: Into, + S4: Into, + { + Self { + id: id.into(), + video_url: video_url.into(), + mime_type, + thumb_url: thumb_url.into(), + title: title.into(), + caption: None, + parse_mode: None, + video_width: None, + video_height: None, + video_duration: None, + description: 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_url(mut self, val: S) -> Self + where + S: Into, + { + self.video_url = val.into(); + self + } + + pub fn mime_type(mut self, val: MimeWrapper) -> Self { + self.mime_type = val; + self + } + + pub fn thumb_url(mut self, val: S) -> Self + where + S: Into, + { + self.thumb_url = val.into(); + self + } + + pub fn title(mut self, val: S) -> Self + where + S: Into, + { + self.title = 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 video_width(mut self, val: i32) -> Self { + self.video_width = Some(val); + self + } + + pub fn video_height(mut self, val: i32) -> Self { + self.video_height = Some(val); + self + } + + pub fn video_duration(mut self, val: i32) -> Self { + self.video_duration = Some(val); + self + } + + pub fn description(mut self, val: S) -> Self + where + S: Into, + { + self.description = Some(val.into()); + 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 + } +}