authentik_rust/models/
digest_algorithm_enum.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// DigestAlgorithmEnum : * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512
14/// * `http://www.w3.org/2000/09/xmldsig#sha1` - SHA1 * `http://www.w3.org/2001/04/xmlenc#sha256` - SHA256 * `http://www.w3.org/2001/04/xmldsig-more#sha384` - SHA384 * `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512
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    Variant2000Slash09SlashXmldsigHashSha1,
19    #[serde(rename = "http://www.w3.org/2001/04/xmlenc#sha256")]
20    Variant2001Slash04SlashXmlencHashSha256,
21    #[serde(rename = "http://www.w3.org/2001/04/xmldsig-more#sha384")]
22    Variant2001Slash04SlashXmldsigMoreHashSha384,
23    #[serde(rename = "http://www.w3.org/2001/04/xmlenc#sha512")]
24    Variant2001Slash04SlashXmlencHashSha512,
25
26}
27
28impl ToString for DigestAlgorithmEnum {
29    fn to_string(&self) -> String {
30        match self {
31            Self::Variant2000Slash09SlashXmldsigHashSha1 => String::from("http://www.w3.org/2000/09/xmldsig#sha1"),
32            Self::Variant2001Slash04SlashXmlencHashSha256 => String::from("http://www.w3.org/2001/04/xmlenc#sha256"),
33            Self::Variant2001Slash04SlashXmldsigMoreHashSha384 => String::from("http://www.w3.org/2001/04/xmldsig-more#sha384"),
34            Self::Variant2001Slash04SlashXmlencHashSha512 => String::from("http://www.w3.org/2001/04/xmlenc#sha512"),
35        }
36    }
37}
38
39impl Default for DigestAlgorithmEnum {
40    fn default() -> DigestAlgorithmEnum {
41        Self::Variant2000Slash09SlashXmldsigHashSha1
42    }
43}
44