1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* 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
}
}