netbox_openapi/models/
aggregate_family.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct AggregateFamily {
13 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15 pub value: Option<i32>,
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#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Label {
32 #[serde(rename = "IPv4")]
33 Ipv4,
34 #[serde(rename = "IPv6")]
35 Ipv6,
36}
37
38impl Default for Label {
39 fn default() -> Label {
40 Self::Ipv4
41 }
42}