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(
51 rename = "owner",
52 default,
53 with = "::serde_with::rust::double_option",
54 skip_serializing_if = "Option::is_none"
55 )]
56 pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
57 #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
58 pub comments: Option<String>,
59 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
60 pub tags: Option<Vec<crate::models::NestedTagRequest>>,
61 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
62 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
63}
64
65impl PatchedWritableIkeProposalRequest {
66 pub fn new() -> PatchedWritableIkeProposalRequest {
68 PatchedWritableIkeProposalRequest {
69 name: None,
70 description: None,
71 authentication_method: None,
72 encryption_algorithm: None,
73 authentication_algorithm: None,
74 group: None,
75 sa_lifetime: None,
76 owner: None,
77 comments: None,
78 tags: None,
79 custom_fields: None,
80 }
81 }
82}
83
84#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
86pub enum AuthenticationMethod {
87 #[serde(rename = "preshared-keys")]
88 PresharedKeys,
89 #[serde(rename = "certificates")]
90 Certificates,
91 #[serde(rename = "rsa-signatures")]
92 RsaSignatures,
93 #[serde(rename = "dsa-signatures")]
94 DsaSignatures,
95}
96
97impl Default for AuthenticationMethod {
98 fn default() -> AuthenticationMethod {
99 Self::PresharedKeys
100 }
101}
102#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
104pub enum EncryptionAlgorithm {
105 #[serde(rename = "aes-128-cbc")]
106 Aes128Cbc,
107 #[serde(rename = "aes-128-gcm")]
108 Aes128Gcm,
109 #[serde(rename = "aes-192-cbc")]
110 Aes192Cbc,
111 #[serde(rename = "aes-192-gcm")]
112 Aes192Gcm,
113 #[serde(rename = "aes-256-cbc")]
114 Aes256Cbc,
115 #[serde(rename = "aes-256-gcm")]
116 Aes256Gcm,
117 #[serde(rename = "3des-cbc")]
118 Variant3desCbc,
119 #[serde(rename = "des-cbc")]
120 DesCbc,
121}
122
123impl Default for EncryptionAlgorithm {
124 fn default() -> EncryptionAlgorithm {
125 Self::Aes128Cbc
126 }
127}
128#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
130pub enum AuthenticationAlgorithm {
131 #[serde(rename = "hmac-sha1")]
132 HmacSha1,
133 #[serde(rename = "hmac-sha256")]
134 HmacSha256,
135 #[serde(rename = "hmac-sha384")]
136 HmacSha384,
137 #[serde(rename = "hmac-sha512")]
138 HmacSha512,
139 #[serde(rename = "hmac-md5")]
140 HmacMd5,
141 #[serde(rename = "")]
142 Empty,
143 #[serde(rename = "null")]
144 Null,
145}
146
147impl Default for AuthenticationAlgorithm {
148 fn default() -> AuthenticationAlgorithm {
149 Self::HmacSha1
150 }
151}