netbox-openapi 0.6.0

low level netbox bindings (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * NetBox REST API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.6.2 (4.6)
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FhrpGroupAssignmentRequestGroup {
    /// * `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 FhrpGroupAssignmentRequestGroup {
    pub fn new(protocol: Protocol, group_id: i32) -> FhrpGroupAssignmentRequestGroup {
        FhrpGroupAssignmentRequestGroup {
            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
    }
}