Skip to main content

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.6.0 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritableIkeProposalRequest : Base serializer class for models inheriting from PrimaryModel.
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(
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    /// Base serializer class for models inheriting from PrimaryModel.
67    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/// * `preshared-keys` - Pre-shared keys * `certificates` - Certificates * `rsa-signatures` - RSA signatures * `dsa-signatures` - DSA signatures
85#[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/// * `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
103#[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/// * `hmac-sha1` - SHA-1 HMAC * `hmac-sha256` - SHA-256 HMAC * `hmac-sha384` - SHA-384 HMAC * `hmac-sha512` - SHA-512 HMAC * `hmac-md5` - MD5 HMAC
129#[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}