netbox_openapi/models/
patched_writable_ike_proposal_request.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritableIkeProposalRequest : Adds support for custom fields and tags.
12
13#[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    /// * `preshared-keys` - Pre-shared keys * `certificates` - Certificates * `rsa-signatures` - RSA signatures * `dsa-signatures` - DSA signatures
20    #[serde(
21        rename = "authentication_method",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub authentication_method: Option<AuthenticationMethod>,
25    /// * `aes-128-cbc` - 128-bit AES (CBC) * `aes-128-gcm` - 128-bit AES (GCM) * `aes-192-cbc` - 192-bit AES (CBC) * `aes-192-gcm` - 192-bit AES (GCM) * `aes-256-cbc` - 256-bit AES (CBC) * `aes-256-gcm` - 256-bit AES (GCM) * `3des-cbc` - 3DES * `des-cbc` - DES
26    #[serde(
27        rename = "encryption_algorithm",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub encryption_algorithm: Option<EncryptionAlgorithm>,
31    /// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
32    #[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    /// Diffie-Hellman group ID  * `1` - Group 1 * `2` - Group 2 * `5` - Group 5 * `14` - Group 14 * `15` - Group 15 * `16` - Group 16 * `17` - Group 17 * `18` - Group 18 * `19` - Group 19 * `20` - Group 20 * `21` - Group 21 * `22` - Group 22 * `23` - Group 23 * `24` - Group 24 * `25` - Group 25 * `26` - Group 26 * `27` - Group 27 * `28` - Group 28 * `29` - Group 29 * `30` - Group 30 * `31` - Group 31 * `32` - Group 32 * `33` - Group 33 * `34` - Group 34
40    #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
41    pub group: Option<i32>,
42    /// Security association lifetime (in seconds)
43    #[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    /// Adds support for custom fields and tags.
60    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/// * `preshared-keys` - Pre-shared keys * `certificates` - Certificates * `rsa-signatures` - RSA signatures * `dsa-signatures` - DSA signatures
77#[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/// * `aes-128-cbc` - 128-bit AES (CBC) * `aes-128-gcm` - 128-bit AES (GCM) * `aes-192-cbc` - 192-bit AES (CBC) * `aes-192-gcm` - 192-bit AES (GCM) * `aes-256-cbc` - 256-bit AES (CBC) * `aes-256-gcm` - 256-bit AES (GCM) * `3des-cbc` - 3DES * `des-cbc` - DES
95#[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/// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
121#[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}