use crate::client::Bot;
use serde::Serialize;
#[derive(Clone, Debug, Serialize)]
pub struct GetMyShortDescription {
#[serde(skip_serializing_if = "Option::is_none")]
pub language_code: Option<Box<str>>,
}
impl GetMyShortDescription {
#[must_use]
pub fn new() -> Self {
Self {
language_code: None,
}
}
#[must_use]
pub fn language_code<T: Into<Box<str>>>(self, val: T) -> Self {
let mut this = self;
this.language_code = Some(val.into());
this
}
#[must_use]
pub fn language_code_option<T: Into<Box<str>>>(self, val: Option<T>) -> Self {
let mut this = self;
this.language_code = val.map(Into::into);
this
}
}
impl Default for GetMyShortDescription {
fn default() -> Self {
Self::new()
}
}
impl super::TelegramMethod for GetMyShortDescription {
type Method = Self;
type Return = crate::types::BotShortDescription;
fn build_request<Client>(self, _bot: &Bot<Client>) -> super::Request<Self::Method> {
super::Request::new("getMyShortDescription", self, None)
}
}