revolt_api 0.6.5

Open source user-first chat platform.
Documentation
/*
 * Revolt API
 *
 * Open source user-first chat platform.
 *
 * The version of the OpenAPI document: 0.6.5
 * Contact: contact@revolt.chat
 * Generated by: https://openapi-generator.tech
 */

/// Presence : Presence status

/// Presence status
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Presence {
    #[serde(rename = "Online")]
    Online,
    #[serde(rename = "Idle")]
    Idle,
    #[serde(rename = "Focus")]
    Focus,
    #[serde(rename = "Busy")]
    Busy,
    #[serde(rename = "Invisible")]
    Invisible,

}

impl ToString for Presence {
    fn to_string(&self) -> String {
        match self {
            Self::Online => String::from("Online"),
            Self::Idle => String::from("Idle"),
            Self::Focus => String::from("Focus"),
            Self::Busy => String::from("Busy"),
            Self::Invisible => String::from("Invisible"),
        }
    }
}

impl Default for Presence {
    fn default() -> Presence {
        Self::Online
    }
}