traq 0.1.5

⚠️ Community Driven ⚠️ traQ v3 API
Documentation
/*
 * traQ v3
 *
 * traQ v3 API
 *
 * The version of the OpenAPI document: 3.0
 *
 * Generated by: https://openapi-generator.tech
 */

use serde_repr::{Deserialize_repr, Serialize_repr};

/// ChannelSubscribeLevel : チャンネル購読レベル 0:無し 1:未読管理 2:未読管理+通知

/// チャンネル購読レベル 0:無し 1:未読管理 2:未読管理+通知
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
)]
#[repr(u8)]
pub enum ChannelSubscribeLevel {
    None = 0,
    Subscribed = 1,
    Notified = 2,
}

impl ToString for ChannelSubscribeLevel {
    fn to_string(&self) -> String {
        match self {
            Self::None => String::from("0"),
            Self::Subscribed => String::from("1"),
            Self::Notified => String::from("2"),
        }
    }
}

impl Default for ChannelSubscribeLevel {
    fn default() -> ChannelSubscribeLevel {
        Self::None
    }
}