/*
 * Tapis Applications API
 *
 * The Tapis Applications API provides for management of Tapis applications including permissions.
 *
 * The version of the OpenAPI document: 26Q1.0
 * 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 ListTypeEnum {
    #[serde(rename = "OWNED")]
    #[default]
    Owned,
    #[serde(rename = "SHARED_PUBLIC")]
    SharedPublic,
    #[serde(rename = "SHARED_DIRECT")]
    SharedDirect,
    #[serde(rename = "READ_PERM")]
    ReadPerm,
    #[serde(rename = "MINE")]
    Mine,
    #[serde(rename = "ALL")]
    All,
}

impl std::fmt::Display for ListTypeEnum {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Owned => write!(f, "OWNED"),
            Self::SharedPublic => write!(f, "SHARED_PUBLIC"),
            Self::SharedDirect => write!(f, "SHARED_DIRECT"),
            Self::ReadPerm => write!(f, "READ_PERM"),
            Self::Mine => write!(f, "MINE"),
            Self::All => write!(f, "ALL"),
        }
    }
}
