Add setters to LoginUrl
@@ -21,3 +21,34 @@ pub struct LoginUrl {
pub bot_username: Option<String>,
pub request_write_access: Option<bool>,
}
+
+impl LoginUrl {
+ pub fn url<S>(mut self, val: S) -> Self
+ where
+ S: Into<String>,
+ {
+ self.url = val.into();
+ self
+ }
+
+ pub fn forward_text<S>(mut self, val: S) -> Self
+ where
+ S: Into<String>,
+ {
+ self.forward_text = Some(val.into());
+ self
+ }
+
+ pub fn bot_username<S>(mut self, val: S) -> Self
+ where
+ S: Into<String>,
+ {
+ self.bot_username = Some(val.into());
+ self
+ }
+
+ pub fn request_write_access<S>(mut self, val: bool) -> Self {
+ self.request_write_access = Some(val);
+ self
+ }
+}
