use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DetachedModuleContent {
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "botId")]
pub bot_id: String,
#[serde(rename = "reason")]
pub reason: Reason,
}
impl DetachedModuleContent {
pub fn new(r#type: String, bot_id: String, reason: Reason) -> DetachedModuleContent {
DetachedModuleContent {
r#type: Some(r#type),
bot_id,
reason,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Reason {
#[serde(rename = "bot_deleted")]
BotDeleted,
}
impl Default for Reason {
fn default() -> Reason {
Self::BotDeleted
}
}