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};

/// UserAccountState : ユーザーアカウント状態 0: 停止 1: 有効 2: 一時停止

/// ユーザーアカウント状態 0: 停止 1: 有効 2: 一時停止
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
)]
#[repr(u8)]
pub enum UserAccountState {
    Deactivated = 0,
    Active = 1,
    Suspended = 2,
}

impl ToString for UserAccountState {
    fn to_string(&self) -> String {
        match self {
            Self::Deactivated => String::from("0"),
            Self::Active => String::from("1"),
            Self::Suspended => String::from("2"),
        }
    }
}

impl Default for UserAccountState {
    fn default() -> UserAccountState {
        Self::Deactivated
    }
}