Skip to main content

nautobot_openapi/models/
encryption_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 EncryptionAlgorithmEnum {
14    #[serde(rename = "AES-128-CBC")]
15    Aes128Cbc,
16    #[serde(rename = "AES-128-GCM")]
17    Aes128Gcm,
18    #[serde(rename = "AES-192-CBC")]
19    Aes192Cbc,
20    #[serde(rename = "AES-192-GCM")]
21    Aes192Gcm,
22    #[serde(rename = "AES-256-CBC")]
23    Aes256Cbc,
24    #[serde(rename = "AES-256-GCM")]
25    Aes256Gcm,
26    #[serde(rename = "DES")]
27    Des,
28    #[serde(rename = "3DES")]
29    Variant3Des,
30}
31
32impl ToString for EncryptionAlgorithmEnum {
33    fn to_string(&self) -> String {
34        match self {
35            Self::Aes128Cbc => String::from("AES-128-CBC"),
36            Self::Aes128Gcm => String::from("AES-128-GCM"),
37            Self::Aes192Cbc => String::from("AES-192-CBC"),
38            Self::Aes192Gcm => String::from("AES-192-GCM"),
39            Self::Aes256Cbc => String::from("AES-256-CBC"),
40            Self::Aes256Gcm => String::from("AES-256-GCM"),
41            Self::Des => String::from("DES"),
42            Self::Variant3Des => String::from("3DES"),
43        }
44    }
45}
46
47impl Default for EncryptionAlgorithmEnum {
48    fn default() -> EncryptionAlgorithmEnum {
49        Self::Aes128Cbc
50    }
51}