/*
 * Tapis Workflows API
 *
 * Create and manage pipelines
 *
 * The version of the OpenAPI document: 1.6.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 EnumDuplicateSubmissionPolicy {
    #[serde(rename = "allow")]
    #[default]
    Allow,
    #[serde(rename = "deny")]
    Deny,
    #[serde(rename = "terminate")]
    Terminate,
    #[serde(rename = "defer")]
    Defer,
}

impl std::fmt::Display for EnumDuplicateSubmissionPolicy {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Allow => write!(f, "allow"),
            Self::Deny => write!(f, "deny"),
            Self::Terminate => write!(f, "terminate"),
            Self::Defer => write!(f, "defer"),
        }
    }
}
