netbox_openapi/models/
ike_proposal_authentication_algorithm.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct IkeProposalAuthenticationAlgorithm {
13 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15 pub value: Option<Value>,
16 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17 pub label: Option<Label>,
18}
19
20impl IkeProposalAuthenticationAlgorithm {
21 pub fn new() -> IkeProposalAuthenticationAlgorithm {
22 IkeProposalAuthenticationAlgorithm {
23 value: None,
24 label: None,
25 }
26 }
27}
28
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32 #[serde(rename = "hmac-sha1")]
33 Sha1,
34 #[serde(rename = "hmac-sha256")]
35 Sha256,
36 #[serde(rename = "hmac-sha384")]
37 Sha384,
38 #[serde(rename = "hmac-sha512")]
39 Sha512,
40 #[serde(rename = "hmac-md5")]
41 Md5,
42}
43
44impl Default for Value {
45 fn default() -> Value {
46 Self::Sha1
47 }
48}
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Label {
52 #[serde(rename = "SHA-1 HMAC")]
53 Sha1Hmac,
54 #[serde(rename = "SHA-256 HMAC")]
55 Sha256Hmac,
56 #[serde(rename = "SHA-384 HMAC")]
57 Sha384Hmac,
58 #[serde(rename = "SHA-512 HMAC")]
59 Sha512Hmac,
60 #[serde(rename = "MD5 HMAC")]
61 Md5Hmac,
62}
63
64impl Default for Label {
65 fn default() -> Label {
66 Self::Sha1Hmac
67 }
68}