netbox_openapi/models/
aggregate_family.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.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct AggregateFamily {
13    /// * `4` - IPv4 * `6` - IPv6
14    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15    pub value: Option<Value>,
16    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17    pub label: Option<Label>,
18}
19
20impl AggregateFamily {
21    pub fn new() -> AggregateFamily {
22        AggregateFamily {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29/// * `4` - IPv4 * `6` - IPv6
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32    #[serde(rename = "4")]
33    Variant4,
34    #[serde(rename = "6")]
35    Variant6,
36}
37
38impl Default for Value {
39    fn default() -> Value {
40        Self::Variant4
41    }
42}
43///
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Label {
46    #[serde(rename = "IPv4")]
47    Ipv4,
48    #[serde(rename = "IPv6")]
49    Ipv6,
50}
51
52impl Default for Label {
53    fn default() -> Label {
54        Self::Ipv4
55    }
56}