authentik_client/models/
digest_algorithm_enum.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14///
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum DigestAlgorithmEnum {
17    #[serde(rename = "http://www.w3.org/2000/09/xmldsig#sha1")]
18    HttpColonSlashSlashWwwW3OrgSlash2000Slash09SlashXmldsigHashSha1,
19    #[serde(rename = "http://www.w3.org/2001/04/xmlenc#sha256")]
20    HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmlencHashSha256,
21    #[serde(rename = "http://www.w3.org/2001/04/xmldsig-more#sha384")]
22    HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmldsigMoreHashSha384,
23    #[serde(rename = "http://www.w3.org/2001/04/xmlenc#sha512")]
24    HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmlencHashSha512,
25}
26
27impl std::fmt::Display for DigestAlgorithmEnum {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::HttpColonSlashSlashWwwW3OrgSlash2000Slash09SlashXmldsigHashSha1 => {
31                write!(f, "http://www.w3.org/2000/09/xmldsig#sha1")
32            }
33            Self::HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmlencHashSha256 => {
34                write!(f, "http://www.w3.org/2001/04/xmlenc#sha256")
35            }
36            Self::HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmldsigMoreHashSha384 => {
37                write!(f, "http://www.w3.org/2001/04/xmldsig-more#sha384")
38            }
39            Self::HttpColonSlashSlashWwwW3OrgSlash2001Slash04SlashXmlencHashSha512 => {
40                write!(f, "http://www.w3.org/2001/04/xmlenc#sha512")
41            }
42        }
43    }
44}
45
46impl Default for DigestAlgorithmEnum {
47    fn default() -> DigestAlgorithmEnum {
48        Self::HttpColonSlashSlashWwwW3OrgSlash2000Slash09SlashXmldsigHashSha1
49    }
50}