Skip to main content

nautobot_openapi/models/
hashing_algorithm_enum.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11///
12#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum HashingAlgorithmEnum {
14    #[serde(rename = "md5")]
15    Md5,
16    #[serde(rename = "sha1")]
17    Sha1,
18    #[serde(rename = "sha224")]
19    Sha224,
20    #[serde(rename = "sha384")]
21    Sha384,
22    #[serde(rename = "sha256")]
23    Sha256,
24    #[serde(rename = "sha512")]
25    Sha512,
26    #[serde(rename = "sha3")]
27    Sha3,
28    #[serde(rename = "blake2")]
29    Blake2,
30    #[serde(rename = "blake3")]
31    Blake3,
32}
33
34impl ToString for HashingAlgorithmEnum {
35    fn to_string(&self) -> String {
36        match self {
37            Self::Md5 => String::from("md5"),
38            Self::Sha1 => String::from("sha1"),
39            Self::Sha224 => String::from("sha224"),
40            Self::Sha384 => String::from("sha384"),
41            Self::Sha256 => String::from("sha256"),
42            Self::Sha512 => String::from("sha512"),
43            Self::Sha3 => String::from("sha3"),
44            Self::Blake2 => String::from("blake2"),
45            Self::Blake3 => String::from("blake3"),
46        }
47    }
48}
49
50impl Default for HashingAlgorithmEnum {
51    fn default() -> HashingAlgorithmEnum {
52        Self::Md5
53    }
54}