1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritablePowerFeedRequest {
15 #[serde(rename = "power_panel", skip_serializing_if = "Option::is_none")]
16 pub power_panel: Option<Box<crate::models::PatchedWritablePowerFeedRequestPowerPanel>>,
17 #[serde(
18 rename = "rack",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub rack: Option<Option<Box<crate::models::DeviceWithConfigContextRequestRack>>>,
24 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
25 pub name: Option<String>,
26 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
28 pub status: Option<Status>,
29 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
31 pub r#type: Option<RHashType>,
32 #[serde(rename = "supply", skip_serializing_if = "Option::is_none")]
34 pub supply: Option<Supply>,
35 #[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
37 pub phase: Option<Phase>,
38 #[serde(rename = "voltage", skip_serializing_if = "Option::is_none")]
39 pub voltage: Option<i32>,
40 #[serde(rename = "amperage", skip_serializing_if = "Option::is_none")]
41 pub amperage: Option<i32>,
42 #[serde(rename = "max_utilization", skip_serializing_if = "Option::is_none")]
44 pub max_utilization: Option<i32>,
45 #[serde(rename = "mark_connected", skip_serializing_if = "Option::is_none")]
47 pub mark_connected: Option<bool>,
48 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
49 pub description: Option<String>,
50 #[serde(
51 rename = "tenant",
52 default,
53 with = "::serde_with::rust::double_option",
54 skip_serializing_if = "Option::is_none"
55 )]
56 pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
57 #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
58 pub comments: Option<String>,
59 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
60 pub tags: Option<Vec<crate::models::NestedTagRequest>>,
61 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
62 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
63}
64
65impl PatchedWritablePowerFeedRequest {
66 pub fn new() -> PatchedWritablePowerFeedRequest {
68 PatchedWritablePowerFeedRequest {
69 power_panel: None,
70 rack: None,
71 name: None,
72 status: None,
73 r#type: None,
74 supply: None,
75 phase: None,
76 voltage: None,
77 amperage: None,
78 max_utilization: None,
79 mark_connected: None,
80 description: None,
81 tenant: None,
82 comments: None,
83 tags: None,
84 custom_fields: None,
85 }
86 }
87}
88
89#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
91pub enum Status {
92 #[serde(rename = "offline")]
93 Offline,
94 #[serde(rename = "active")]
95 Active,
96 #[serde(rename = "planned")]
97 Planned,
98 #[serde(rename = "failed")]
99 Failed,
100}
101
102impl Default for Status {
103 fn default() -> Status {
104 Self::Offline
105 }
106}
107#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
109pub enum RHashType {
110 #[serde(rename = "primary")]
111 Primary,
112 #[serde(rename = "redundant")]
113 Redundant,
114}
115
116impl Default for RHashType {
117 fn default() -> RHashType {
118 Self::Primary
119 }
120}
121#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
123pub enum Supply {
124 #[serde(rename = "ac")]
125 Ac,
126 #[serde(rename = "dc")]
127 Dc,
128}
129
130impl Default for Supply {
131 fn default() -> Supply {
132 Self::Ac
133 }
134}
135#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
137pub enum Phase {
138 #[serde(rename = "single-phase")]
139 SinglePhase,
140 #[serde(rename = "three-phase")]
141 ThreePhase,
142}
143
144impl Default for Phase {
145 fn default() -> Phase {
146 Self::SinglePhase
147 }
148}