/*
 * Tapis Systems API
 *
 * The Tapis Systems API provides for management of Tapis Systems including permissions, credentials and Scheduler Profiles.
 *
 * The version of the OpenAPI document: 26Q1.1
 * 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 AuthnEnum {
    #[serde(rename = "PASSWORD")]
    #[default]
    Password,
    #[serde(rename = "PKI_KEYS")]
    PkiKeys,
    #[serde(rename = "ACCESS_KEY")]
    AccessKey,
    #[serde(rename = "TOKEN")]
    Token,
    #[serde(rename = "TMS_KEYS")]
    TmsKeys,
    #[serde(rename = "CERT")]
    Cert,
}

impl std::fmt::Display for AuthnEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Password => write!(f, "PASSWORD"),
            Self::PkiKeys => write!(f, "PKI_KEYS"),
            Self::AccessKey => write!(f, "ACCESS_KEY"),
            Self::Token => write!(f, "TOKEN"),
            Self::TmsKeys => write!(f, "TMS_KEYS"),
            Self::Cert => write!(f, "CERT"),
        }
    }
}
