1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct WritableRackRequest {
15 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16 pub id: Option<uuid::Uuid>,
17 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(
21 rename = "facility_id",
22 default,
23 with = "::serde_with::rust::double_option",
24 skip_serializing_if = "Option::is_none"
25 )]
26 pub facility_id: Option<Option<String>>,
27 #[serde(rename = "serial", skip_serializing_if = "Option::is_none")]
28 pub serial: Option<String>,
29 #[serde(
31 rename = "asset_tag",
32 default,
33 with = "::serde_with::rust::double_option",
34 skip_serializing_if = "Option::is_none"
35 )]
36 pub asset_tag: Option<Option<String>>,
37 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
38 pub r#type: Option<Box<crate::models::PatchedWritableRackRequestType>>,
39 #[serde(rename = "width", skip_serializing_if = "Option::is_none")]
40 pub width: Option<i32>,
41 #[serde(rename = "u_height", skip_serializing_if = "Option::is_none")]
43 pub u_height: Option<i32>,
44 #[serde(rename = "desc_units", skip_serializing_if = "Option::is_none")]
46 pub desc_units: Option<bool>,
47 #[serde(
49 rename = "outer_width",
50 default,
51 with = "::serde_with::rust::double_option",
52 skip_serializing_if = "Option::is_none"
53 )]
54 pub outer_width: Option<Option<i32>>,
55 #[serde(
57 rename = "outer_depth",
58 default,
59 with = "::serde_with::rust::double_option",
60 skip_serializing_if = "Option::is_none"
61 )]
62 pub outer_depth: Option<Option<i32>>,
63 #[serde(rename = "outer_unit", skip_serializing_if = "Option::is_none")]
64 pub outer_unit: Option<Box<crate::models::PatchedWritableRackRequestOuterUnit>>,
65 #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
66 pub comments: Option<String>,
67 #[serde(rename = "status")]
68 pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
69 #[serde(
70 rename = "role",
71 default,
72 with = "::serde_with::rust::double_option",
73 skip_serializing_if = "Option::is_none"
74 )]
75 pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
76 #[serde(rename = "location")]
77 pub location: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
78 #[serde(
79 rename = "rack_group",
80 default,
81 with = "::serde_with::rust::double_option",
82 skip_serializing_if = "Option::is_none"
83 )]
84 pub rack_group: Option<Option<Box<crate::models::BulkWritableRackRequestRackGroup>>>,
85 #[serde(
86 rename = "tenant",
87 default,
88 with = "::serde_with::rust::double_option",
89 skip_serializing_if = "Option::is_none"
90 )]
91 pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
92 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
93 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
94 #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
95 pub relationships: Option<
96 ::std::collections::HashMap<
97 String,
98 crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
99 >,
100 >,
101 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
102 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
103}
104
105impl WritableRackRequest {
106 pub fn new(
108 name: String,
109 status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
110 location: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
111 ) -> WritableRackRequest {
112 WritableRackRequest {
113 id: None,
114 name,
115 facility_id: None,
116 serial: None,
117 asset_tag: None,
118 r#type: None,
119 width: None,
120 u_height: None,
121 desc_units: None,
122 outer_width: None,
123 outer_depth: None,
124 outer_unit: None,
125 comments: None,
126 status: Box::new(status),
127 role: None,
128 location: Box::new(location),
129 rack_group: None,
130 tenant: None,
131 custom_fields: None,
132 relationships: None,
133 tags: None,
134 }
135 }
136}