Skip to main content

nautobot_openapi/models/
interface_redundancy_group_protocol.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct InterfaceRedundancyGroupProtocol {
13    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
14    pub value: Option<Value>,
15    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
16    pub label: Option<Label>,
17}
18
19impl InterfaceRedundancyGroupProtocol {
20    pub fn new() -> InterfaceRedundancyGroupProtocol {
21        InterfaceRedundancyGroupProtocol {
22            value: None,
23            label: None,
24        }
25    }
26}
27
28///
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
30pub enum Value {
31    #[serde(rename = "hsrp")]
32    Hsrp,
33    #[serde(rename = "vrrp")]
34    Vrrp,
35    #[serde(rename = "glbp")]
36    Glbp,
37    #[serde(rename = "carp")]
38    Carp,
39}
40
41impl Default for Value {
42    fn default() -> Value {
43        Self::Hsrp
44    }
45}
46///
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Label {
49    #[serde(rename = "HSRP")]
50    Hsrp,
51    #[serde(rename = "VRRP")]
52    Vrrp,
53    #[serde(rename = "GLBP")]
54    Glbp,
55    #[serde(rename = "CARP")]
56    Carp,
57}
58
59impl Default for Label {
60    fn default() -> Label {
61        Self::Hsrp
62    }
63}