1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritableIkeProposalRequest {
15 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
16 pub name: Option<String>,
17 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
18 pub description: Option<String>,
19 #[serde(
21 rename = "authentication_method",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub authentication_method: Option<AuthenticationMethod>,
25 #[serde(
27 rename = "encryption_algorithm",
28 skip_serializing_if = "Option::is_none"
29 )]
30 pub encryption_algorithm: Option<EncryptionAlgorithm>,
31 #[serde(
33 rename = "authentication_algorithm",
34 default,
35 with = "::serde_with::rust::double_option",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub authentication_algorithm: Option<Option<AuthenticationAlgorithm>>,
39 #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
41 pub group: Option<i32>,
42 #[serde(
44 rename = "sa_lifetime",
45 default,
46 with = "::serde_with::rust::double_option",
47 skip_serializing_if = "Option::is_none"
48 )]
49 pub sa_lifetime: Option<Option<i32>>,
50 #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
51 pub comments: Option<String>,
52 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
53 pub tags: Option<Vec<crate::models::NestedTagRequest>>,
54 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
55 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
56}
57
58impl PatchedWritableIkeProposalRequest {
59 pub fn new() -> PatchedWritableIkeProposalRequest {
61 PatchedWritableIkeProposalRequest {
62 name: None,
63 description: None,
64 authentication_method: None,
65 encryption_algorithm: None,
66 authentication_algorithm: None,
67 group: None,
68 sa_lifetime: None,
69 comments: None,
70 tags: None,
71 custom_fields: None,
72 }
73 }
74}
75
76#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
78pub enum AuthenticationMethod {
79 #[serde(rename = "preshared-keys")]
80 PresharedKeys,
81 #[serde(rename = "certificates")]
82 Certificates,
83 #[serde(rename = "rsa-signatures")]
84 RsaSignatures,
85 #[serde(rename = "dsa-signatures")]
86 DsaSignatures,
87}
88
89impl Default for AuthenticationMethod {
90 fn default() -> AuthenticationMethod {
91 Self::PresharedKeys
92 }
93}
94#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
96pub enum EncryptionAlgorithm {
97 #[serde(rename = "aes-128-cbc")]
98 Aes128Cbc,
99 #[serde(rename = "aes-128-gcm")]
100 Aes128Gcm,
101 #[serde(rename = "aes-192-cbc")]
102 Aes192Cbc,
103 #[serde(rename = "aes-192-gcm")]
104 Aes192Gcm,
105 #[serde(rename = "aes-256-cbc")]
106 Aes256Cbc,
107 #[serde(rename = "aes-256-gcm")]
108 Aes256Gcm,
109 #[serde(rename = "3des-cbc")]
110 Variant3desCbc,
111 #[serde(rename = "des-cbc")]
112 DesCbc,
113}
114
115impl Default for EncryptionAlgorithm {
116 fn default() -> EncryptionAlgorithm {
117 Self::Aes128Cbc
118 }
119}
120#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
122pub enum AuthenticationAlgorithm {
123 #[serde(rename = "hmac-sha1")]
124 HmacSha1,
125 #[serde(rename = "hmac-sha256")]
126 HmacSha256,
127 #[serde(rename = "hmac-sha384")]
128 HmacSha384,
129 #[serde(rename = "hmac-sha512")]
130 HmacSha512,
131 #[serde(rename = "hmac-md5")]
132 HmacMd5,
133 #[serde(rename = "")]
134 Empty,
135 #[serde(rename = "null")]
136 Null,
137}
138
139impl Default for AuthenticationAlgorithm {
140 fn default() -> AuthenticationAlgorithm {
141 Self::HmacSha1
142 }
143}