/*
 * 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 EnumRunStatus {
    #[serde(rename = "staging")]
    #[default]
    Staging,
    #[serde(rename = "submitted")]
    Submitted,
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "backoff")]
    Backoff,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "suspended")]
    Suspended,
    #[serde(rename = "archiving")]
    Archiving,
    #[serde(rename = "terminated")]
    Terminated,
    #[serde(rename = "terminating")]
    Terminating,
    #[serde(rename = "skipped")]
    Skipped,
}

impl std::fmt::Display for EnumRunStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Staging => write!(f, "staging"),
            Self::Submitted => write!(f, "submitted"),
            Self::Active => write!(f, "active"),
            Self::Pending => write!(f, "pending"),
            Self::Backoff => write!(f, "backoff"),
            Self::Completed => write!(f, "completed"),
            Self::Failed => write!(f, "failed"),
            Self::Suspended => write!(f, "suspended"),
            Self::Archiving => write!(f, "archiving"),
            Self::Terminated => write!(f, "terminated"),
            Self::Terminating => write!(f, "terminating"),
            Self::Skipped => write!(f, "skipped"),
        }
    }
}
