diff --git a/src/types/inline_query_result_document.rs b/src/types/inline_query_result_document.rs index 5027edcb..ea66f561 100644 --- a/src/types/inline_query_result_document.rs +++ b/src/types/inline_query_result_document.rs @@ -56,3 +56,83 @@ pub struct InlineQueryResultDocument { /// Thumbnail height. pub thumb_height: Option, } + +impl InlineQueryResultDocument { + pub fn id(mut self, val: S) -> Self + where + S: Into, + { + self.id = 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 document_url(mut self, val: S) -> Self + where + S: Into, + { + self.document_url = val.into(); + self + } + + pub fn mime_type(mut self, val: MimeWrapper) -> Self { + self.mime_type = 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 + } + + pub fn thumb_url(mut self, val: S) -> Self + where + S: Into, + { + self.thumb_url = Some(val.into()); + self + } + + pub fn thumb_width(mut self, val: i32) -> Self { + self.thumb_width = Some(val); + self + } + + pub fn thumb_height(mut self, val: i32) -> Self { + self.thumb_height = Some(val); + self + } +}