Skip to main content

netbox_openapi/models/
patched_writable_ip_sec_policy_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/// PatchedWritableIpSecPolicyRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritableIpSecPolicyRequest {
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(rename = "proposals", skip_serializing_if = "Option::is_none")]
20    pub proposals: Option<Vec<i32>>,
21    /// Diffie-Hellman group for Perfect Forward Secrecy  * `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
22    #[serde(
23        rename = "pfs_group",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub pfs_group: Option<Option<PfsGroup>>,
29    #[serde(
30        rename = "owner",
31        default,
32        with = "::serde_with::rust::double_option",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
36    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
37    pub comments: Option<String>,
38    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
39    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
40    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
41    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
42}
43
44impl PatchedWritableIpSecPolicyRequest {
45    /// Base serializer class for models inheriting from PrimaryModel.
46    pub fn new() -> PatchedWritableIpSecPolicyRequest {
47        PatchedWritableIpSecPolicyRequest {
48            name: None,
49            description: None,
50            proposals: None,
51            pfs_group: None,
52            owner: None,
53            comments: None,
54            tags: None,
55            custom_fields: None,
56        }
57    }
58}
59
60/// Diffie-Hellman group for Perfect Forward Secrecy  * `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
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum PfsGroup {
63    #[serde(rename = "1")]
64    Variant1,
65    #[serde(rename = "2")]
66    Variant2,
67    #[serde(rename = "5")]
68    Variant5,
69    #[serde(rename = "14")]
70    Variant14,
71    #[serde(rename = "15")]
72    Variant15,
73    #[serde(rename = "16")]
74    Variant16,
75    #[serde(rename = "17")]
76    Variant17,
77    #[serde(rename = "18")]
78    Variant18,
79    #[serde(rename = "19")]
80    Variant19,
81    #[serde(rename = "20")]
82    Variant20,
83    #[serde(rename = "21")]
84    Variant21,
85    #[serde(rename = "22")]
86    Variant22,
87    #[serde(rename = "23")]
88    Variant23,
89    #[serde(rename = "24")]
90    Variant24,
91    #[serde(rename = "25")]
92    Variant25,
93    #[serde(rename = "26")]
94    Variant26,
95    #[serde(rename = "27")]
96    Variant27,
97    #[serde(rename = "28")]
98    Variant28,
99    #[serde(rename = "29")]
100    Variant29,
101    #[serde(rename = "30")]
102    Variant30,
103    #[serde(rename = "31")]
104    Variant31,
105    #[serde(rename = "32")]
106    Variant32,
107    #[serde(rename = "33")]
108    Variant33,
109    #[serde(rename = "34")]
110    Variant34,
111    #[serde(rename = "null")]
112    Null,
113}
114
115impl Default for PfsGroup {
116    fn default() -> PfsGroup {
117        Self::Variant1
118    }
119}