netbox_openapi/models/
patched_writable_ip_sec_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/// PatchedWritableIpSecProposalRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritableIpSecProposalRequest {
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    /// * `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
20    #[serde(
21        rename = "encryption_algorithm",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub encryption_algorithm: Option<Option<EncryptionAlgorithm>>,
27    /// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
28    #[serde(
29        rename = "authentication_algorithm",
30        default,
31        with = "::serde_with::rust::double_option",
32        skip_serializing_if = "Option::is_none"
33    )]
34    pub authentication_algorithm: Option<Option<AuthenticationAlgorithm>>,
35    /// Security association lifetime (seconds)
36    #[serde(
37        rename = "sa_lifetime_seconds",
38        default,
39        with = "::serde_with::rust::double_option",
40        skip_serializing_if = "Option::is_none"
41    )]
42    pub sa_lifetime_seconds: Option<Option<i32>>,
43    /// Security association lifetime (in kilobytes)
44    #[serde(
45        rename = "sa_lifetime_data",
46        default,
47        with = "::serde_with::rust::double_option",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub sa_lifetime_data: Option<Option<i32>>,
51    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
52    pub comments: Option<String>,
53    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
54    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
55    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
56    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
57}
58
59impl PatchedWritableIpSecProposalRequest {
60    /// Adds support for custom fields and tags.
61    pub fn new() -> PatchedWritableIpSecProposalRequest {
62        PatchedWritableIpSecProposalRequest {
63            name: None,
64            description: None,
65            encryption_algorithm: None,
66            authentication_algorithm: None,
67            sa_lifetime_seconds: None,
68            sa_lifetime_data: None,
69            comments: None,
70            tags: None,
71            custom_fields: None,
72        }
73    }
74}
75
76/// * `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
77#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
78pub enum EncryptionAlgorithm {
79    #[serde(rename = "aes-128-cbc")]
80    Aes128Cbc,
81    #[serde(rename = "aes-128-gcm")]
82    Aes128Gcm,
83    #[serde(rename = "aes-192-cbc")]
84    Aes192Cbc,
85    #[serde(rename = "aes-192-gcm")]
86    Aes192Gcm,
87    #[serde(rename = "aes-256-cbc")]
88    Aes256Cbc,
89    #[serde(rename = "aes-256-gcm")]
90    Aes256Gcm,
91    #[serde(rename = "3des-cbc")]
92    Variant3desCbc,
93    #[serde(rename = "des-cbc")]
94    DesCbc,
95    #[serde(rename = "")]
96    Empty,
97    #[serde(rename = "null")]
98    Null,
99}
100
101impl Default for EncryptionAlgorithm {
102    fn default() -> EncryptionAlgorithm {
103        Self::Aes128Cbc
104    }
105}
106/// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
107#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
108pub enum AuthenticationAlgorithm {
109    #[serde(rename = "hmac-sha1")]
110    HmacSha1,
111    #[serde(rename = "hmac-sha256")]
112    HmacSha256,
113    #[serde(rename = "hmac-sha384")]
114    HmacSha384,
115    #[serde(rename = "hmac-sha512")]
116    HmacSha512,
117    #[serde(rename = "hmac-md5")]
118    HmacMd5,
119    #[serde(rename = "")]
120    Empty,
121    #[serde(rename = "null")]
122    Null,
123}
124
125impl Default for AuthenticationAlgorithm {
126    fn default() -> AuthenticationAlgorithm {
127        Self::HmacSha1
128    }
129}