nautobot_openapi/models/
power_panel.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PowerPanel {
15 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16 pub id: Option<uuid::Uuid>,
17 #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
18 pub object_type: Option<String>,
19 #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
21 pub display: Option<String>,
22 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
23 pub url: Option<String>,
24 #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
25 pub natural_slug: Option<String>,
26 #[serde(rename = "panel_type", skip_serializing_if = "Option::is_none")]
27 pub panel_type: Option<Box<crate::models::PowerPanelPanelType>>,
28 #[serde(rename = "power_path", skip_serializing_if = "Option::is_none")]
29 pub power_path: Option<Box<crate::models::PowerFeedPowerPath>>,
30 #[serde(rename = "power_feed_count", skip_serializing_if = "Option::is_none")]
31 pub power_feed_count: Option<i32>,
32 #[serde(rename = "name")]
33 pub name: String,
34 #[serde(
36 rename = "breaker_position_count",
37 default,
38 with = "::serde_with::rust::double_option",
39 skip_serializing_if = "Option::is_none"
40 )]
41 pub breaker_position_count: Option<Option<i32>>,
42 #[serde(rename = "location")]
43 pub location: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
44 #[serde(
45 rename = "rack_group",
46 default,
47 with = "::serde_with::rust::double_option",
48 skip_serializing_if = "Option::is_none"
49 )]
50 pub rack_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
51 #[serde(
52 rename = "created",
53 default,
54 with = "::serde_with::rust::double_option",
55 skip_serializing_if = "Option::is_none"
56 )]
57 pub created: Option<Option<String>>,
58 #[serde(
59 rename = "last_updated",
60 default,
61 with = "::serde_with::rust::double_option",
62 skip_serializing_if = "Option::is_none"
63 )]
64 pub last_updated: Option<Option<String>>,
65 #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
66 pub notes_url: Option<String>,
67 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
68 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
69 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
70 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
71}
72
73impl PowerPanel {
74 pub fn new(
76 name: String,
77 location: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
78 ) -> PowerPanel {
79 PowerPanel {
80 id: None,
81 object_type: None,
82 display: None,
83 url: None,
84 natural_slug: None,
85 panel_type: None,
86 power_path: None,
87 power_feed_count: None,
88 name,
89 breaker_position_count: None,
90 location: Box::new(location),
91 rack_group: None,
92 created: None,
93 last_updated: None,
94 notes_url: None,
95 custom_fields: None,
96 tags: None,
97 }
98 }
99}