/*
 * Tapis Security API
 *
 * The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
 *
 * The version of the OpenAPI document: 1.8.2
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum RoleTypeEnum {
    #[serde(rename = "USER")]
    #[default]
    User,
    #[serde(rename = "USER_DEFAULT")]
    UserDefault,
    #[serde(rename = "RESTRICTED_SVC")]
    RestrictedSvc,
    #[serde(rename = "TENANT_ADMIN")]
    TenantAdmin,
    #[serde(rename = "SITE_ADMIN")]
    SiteAdmin,
}

impl std::fmt::Display for RoleTypeEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::User => write!(f, "USER"),
            Self::UserDefault => write!(f, "USER_DEFAULT"),
            Self::RestrictedSvc => write!(f, "RESTRICTED_SVC"),
            Self::TenantAdmin => write!(f, "TENANT_ADMIN"),
            Self::SiteAdmin => write!(f, "SITE_ADMIN"),
        }
    }
}
