/*
 * 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 JobEventCategoryFilter {
    #[serde(rename = "ALL")]
    #[default]
    All,
    #[serde(rename = "JOB_NEW_STATUS")]
    JobNewStatus,
    #[serde(rename = "JOB_INPUT_TRANSACTION_ID")]
    JobInputTransactionId,
    #[serde(rename = "JOB_ARCHIVE_TRANSACTION_ID")]
    JobArchiveTransactionId,
    #[serde(rename = "JOB_ERROR_MESSAGE")]
    JobErrorMessage,
    #[serde(rename = "JOB_SUBSCRIPTION")]
    JobSubscription,
}

impl std::fmt::Display for JobEventCategoryFilter {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::All => write!(f, "ALL"),
            Self::JobNewStatus => write!(f, "JOB_NEW_STATUS"),
            Self::JobInputTransactionId => write!(f, "JOB_INPUT_TRANSACTION_ID"),
            Self::JobArchiveTransactionId => write!(f, "JOB_ARCHIVE_TRANSACTION_ID"),
            Self::JobErrorMessage => write!(f, "JOB_ERROR_MESSAGE"),
            Self::JobSubscription => write!(f, "JOB_SUBSCRIPTION"),
        }
    }
}
