1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* NetBox REST API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 4.6.0 (4.6)
*
* Generated by: https://openapi-generator.tech
*/
/// BriefFhrpGroupRequest : Base serializer class for models inheriting from PrimaryModel.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BriefFhrpGroupRequest {
/// * `vrrp2` - VRRPv2 * `vrrp3` - VRRPv3 * `carp` - CARP * `clusterxl` - ClusterXL * `hsrp` - HSRP * `glbp` - GLBP * `other` - Other
#[serde(rename = "protocol")]
pub protocol: Protocol,
#[serde(rename = "group_id")]
pub group_id: i32,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl BriefFhrpGroupRequest {
/// Base serializer class for models inheriting from PrimaryModel.
pub fn new(protocol: Protocol, group_id: i32) -> BriefFhrpGroupRequest {
BriefFhrpGroupRequest {
protocol,
group_id,
description: None,
}
}
}
/// * `vrrp2` - VRRPv2 * `vrrp3` - VRRPv3 * `carp` - CARP * `clusterxl` - ClusterXL * `hsrp` - HSRP * `glbp` - GLBP * `other` - Other
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Protocol {
#[serde(rename = "vrrp2")]
Vrrp2,
#[serde(rename = "vrrp3")]
Vrrp3,
#[serde(rename = "carp")]
Carp,
#[serde(rename = "clusterxl")]
Clusterxl,
#[serde(rename = "hsrp")]
Hsrp,
#[serde(rename = "glbp")]
Glbp,
#[serde(rename = "other")]
Other,
}
impl Default for Protocol {
fn default() -> Protocol {
Self::Vrrp2
}
}