use crate::client::Bot;
use serde::Serialize;
#[derive(Clone, Debug, Serialize)]
pub struct SetMyProfilePhoto {
pub photo: crate::types::InputProfilePhoto,
}
impl SetMyProfilePhoto {
#[must_use]
pub fn new<T0: Into<crate::types::InputProfilePhoto>>(photo: T0) -> Self {
Self {
photo: photo.into(),
}
}
#[must_use]
pub fn photo<T: Into<crate::types::InputProfilePhoto>>(self, val: T) -> Self {
let mut this = self;
this.photo = val.into();
this
}
}
impl super::TelegramMethod for SetMyProfilePhoto {
type Method = Self;
type Return = bool;
fn build_request<Client>(self, _bot: &Bot<Client>) -> super::Request<Self::Method> {
super::Request::new("setMyProfilePhoto", self, None)
}
}