Skip to main content

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.6.2 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritableIpSecProposalRequest : Base serializer class for models inheriting from PrimaryModel.
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(
52        rename = "owner",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
58    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
59    pub comments: Option<String>,
60    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
61    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
62    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
63    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
64}
65
66impl PatchedWritableIpSecProposalRequest {
67    /// Base serializer class for models inheriting from PrimaryModel.
68    pub fn new() -> PatchedWritableIpSecProposalRequest {
69        PatchedWritableIpSecProposalRequest {
70            name: None,
71            description: None,
72            encryption_algorithm: None,
73            authentication_algorithm: None,
74            sa_lifetime_seconds: None,
75            sa_lifetime_data: None,
76            owner: None,
77            comments: None,
78            tags: None,
79            custom_fields: None,
80        }
81    }
82}
83
84/// * `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
85#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
86pub enum EncryptionAlgorithm {
87    #[serde(rename = "aes-128-cbc")]
88    Aes128Cbc,
89    #[serde(rename = "aes-128-gcm")]
90    Aes128Gcm,
91    #[serde(rename = "aes-192-cbc")]
92    Aes192Cbc,
93    #[serde(rename = "aes-192-gcm")]
94    Aes192Gcm,
95    #[serde(rename = "aes-256-cbc")]
96    Aes256Cbc,
97    #[serde(rename = "aes-256-gcm")]
98    Aes256Gcm,
99    #[serde(rename = "3des-cbc")]
100    Variant3desCbc,
101    #[serde(rename = "des-cbc")]
102    DesCbc,
103    #[serde(rename = "")]
104    Empty,
105    #[serde(rename = "null")]
106    Null,
107}
108
109impl Default for EncryptionAlgorithm {
110    fn default() -> EncryptionAlgorithm {
111        Self::Aes128Cbc
112    }
113}
114/// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
115#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
116pub enum AuthenticationAlgorithm {
117    #[serde(rename = "hmac-sha1")]
118    HmacSha1,
119    #[serde(rename = "hmac-sha256")]
120    HmacSha256,
121    #[serde(rename = "hmac-sha384")]
122    HmacSha384,
123    #[serde(rename = "hmac-sha512")]
124    HmacSha512,
125    #[serde(rename = "hmac-md5")]
126    HmacMd5,
127    #[serde(rename = "")]
128    Empty,
129    #[serde(rename = "null")]
130    Null,
131}
132
133impl Default for AuthenticationAlgorithm {
134    fn default() -> AuthenticationAlgorithm {
135        Self::HmacSha1
136    }
137}