authentik_rust/models/
signature_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/// SignatureAlgorithmEnum : * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1
14/// * `http://www.w3.org/2000/09/xmldsig#rsa-sha1` - RSA-SHA1 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha256` - RSA-SHA256 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha384` - RSA-SHA384 * `http://www.w3.org/2001/04/xmldsig-more#rsa-sha512` - RSA-SHA512 * `http://www.w3.org/2000/09/xmldsig#dsa-sha1` - DSA-SHA1
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum SignatureAlgorithmEnum {
17    #[serde(rename = "http://www.w3.org/2000/09/xmldsig#rsa-sha1")]
18    Variant2000Slash09SlashXmldsigHashRsaSha1,
19    #[serde(rename = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256")]
20    Variant2001Slash04SlashXmldsigMoreHashRsaSha256,
21    #[serde(rename = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384")]
22    Variant2001Slash04SlashXmldsigMoreHashRsaSha384,
23    #[serde(rename = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512")]
24    Variant2001Slash04SlashXmldsigMoreHashRsaSha512,
25    #[serde(rename = "http://www.w3.org/2000/09/xmldsig#dsa-sha1")]
26    Variant2000Slash09SlashXmldsigHashDsaSha1,
27
28}
29
30impl ToString for SignatureAlgorithmEnum {
31    fn to_string(&self) -> String {
32        match self {
33            Self::Variant2000Slash09SlashXmldsigHashRsaSha1 => String::from("http://www.w3.org/2000/09/xmldsig#rsa-sha1"),
34            Self::Variant2001Slash04SlashXmldsigMoreHashRsaSha256 => String::from("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),
35            Self::Variant2001Slash04SlashXmldsigMoreHashRsaSha384 => String::from("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"),
36            Self::Variant2001Slash04SlashXmldsigMoreHashRsaSha512 => String::from("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"),
37            Self::Variant2000Slash09SlashXmldsigHashDsaSha1 => String::from("http://www.w3.org/2000/09/xmldsig#dsa-sha1"),
38        }
39    }
40}
41
42impl Default for SignatureAlgorithmEnum {
43    fn default() -> SignatureAlgorithmEnum {
44        Self::Variant2000Slash09SlashXmldsigHashRsaSha1
45    }
46}
47