1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct Controller {
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(
27 rename = "capabilities",
28 default,
29 with = "::serde_with::rust::double_option",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub capabilities: Option<Option<Vec<crate::models::ControllerCapabilitiesInner>>>,
33 #[serde(rename = "name")]
34 pub name: String,
35 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
36 pub description: Option<String>,
37 #[serde(rename = "status")]
38 pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
39 #[serde(rename = "location")]
40 pub location: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
41 #[serde(
42 rename = "platform",
43 default,
44 with = "::serde_with::rust::double_option",
45 skip_serializing_if = "Option::is_none"
46 )]
47 pub platform: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
48 #[serde(
49 rename = "role",
50 default,
51 with = "::serde_with::rust::double_option",
52 skip_serializing_if = "Option::is_none"
53 )]
54 pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
55 #[serde(
56 rename = "tenant",
57 default,
58 with = "::serde_with::rust::double_option",
59 skip_serializing_if = "Option::is_none"
60 )]
61 pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
62 #[serde(
63 rename = "external_integration",
64 default,
65 with = "::serde_with::rust::double_option",
66 skip_serializing_if = "Option::is_none"
67 )]
68 pub external_integration: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
69 #[serde(
70 rename = "controller_device",
71 default,
72 with = "::serde_with::rust::double_option",
73 skip_serializing_if = "Option::is_none"
74 )]
75 pub controller_device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
76 #[serde(
77 rename = "controller_device_redundancy_group",
78 default,
79 with = "::serde_with::rust::double_option",
80 skip_serializing_if = "Option::is_none"
81 )]
82 pub controller_device_redundancy_group:
83 Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
84 #[serde(
85 rename = "created",
86 default,
87 with = "::serde_with::rust::double_option",
88 skip_serializing_if = "Option::is_none"
89 )]
90 pub created: Option<Option<String>>,
91 #[serde(
92 rename = "last_updated",
93 default,
94 with = "::serde_with::rust::double_option",
95 skip_serializing_if = "Option::is_none"
96 )]
97 pub last_updated: Option<Option<String>>,
98 #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
99 pub notes_url: Option<String>,
100 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
101 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
102 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
103 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
104}
105
106impl Controller {
107 pub fn new(
109 name: String,
110 status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
111 location: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
112 ) -> Controller {
113 Controller {
114 id: None,
115 object_type: None,
116 display: None,
117 url: None,
118 natural_slug: None,
119 capabilities: None,
120 name,
121 description: None,
122 status: Box::new(status),
123 location: Box::new(location),
124 platform: None,
125 role: None,
126 tenant: None,
127 external_integration: None,
128 controller_device: None,
129 controller_device_redundancy_group: None,
130 created: None,
131 last_updated: None,
132 notes_url: None,
133 custom_fields: None,
134 tags: None,
135 }
136 }
137}