artifact-keeper-client 1.2.1

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PayloadTemplate : Supported webhook payload templates.  Controls how the outgoing JSON body is structured when delivering a webhook. The `Generic` variant preserves backward compatibility with the original flat JSON format.
/// Supported webhook payload templates.  Controls how the outgoing JSON body is structured when delivering a webhook. The `Generic` variant preserves backward compatibility with the original flat JSON format.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PayloadTemplate {
    #[serde(rename = "generic")]
    Generic,
    #[serde(rename = "slack")]
    Slack,
    #[serde(rename = "microsoft_teams")]
    MicrosoftTeams,
    #[serde(rename = "discord")]
    Discord,
    #[serde(rename = "mattermost")]
    Mattermost,

}

impl std::fmt::Display for PayloadTemplate {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Generic => write!(f, "generic"),
            Self::Slack => write!(f, "slack"),
            Self::MicrosoftTeams => write!(f, "microsoft_teams"),
            Self::Discord => write!(f, "discord"),
            Self::Mattermost => write!(f, "mattermost"),
        }
    }
}

impl Default for PayloadTemplate {
    fn default() -> PayloadTemplate {
        Self::Generic
    }
}