#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Webhook {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "avatar", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub avatar: Option<Option<Box<crate::models::WebhookAvatar>>>,
#[serde(rename = "channel_id")]
pub channel_id: String,
#[serde(rename = "permissions")]
pub permissions: i32,
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub token: Option<Option<String>>,
}
impl Webhook {
pub fn new(id: String, name: String, channel_id: String, permissions: i32) -> Webhook {
Webhook {
id,
name,
avatar: None,
channel_id,
permissions,
token: None,
}
}
}