aws_sdk_cloudtrail/operation/get_dashboard/
_get_dashboard_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDashboardOutput {
6 pub dashboard_arn: ::std::option::Option<::std::string::String>,
8 pub r#type: ::std::option::Option<crate::types::DashboardType>,
10 pub status: ::std::option::Option<crate::types::DashboardStatus>,
12 pub widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
14 pub refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
16 pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub last_refresh_id: ::std::option::Option<::std::string::String>,
22 pub last_refresh_failure_reason: ::std::option::Option<::std::string::String>,
24 pub termination_protection_enabled: ::std::option::Option<bool>,
26 _request_id: Option<String>,
27}
28impl GetDashboardOutput {
29 pub fn dashboard_arn(&self) -> ::std::option::Option<&str> {
31 self.dashboard_arn.as_deref()
32 }
33 pub fn r#type(&self) -> ::std::option::Option<&crate::types::DashboardType> {
35 self.r#type.as_ref()
36 }
37 pub fn status(&self) -> ::std::option::Option<&crate::types::DashboardStatus> {
39 self.status.as_ref()
40 }
41 pub fn widgets(&self) -> &[crate::types::Widget] {
45 self.widgets.as_deref().unwrap_or_default()
46 }
47 pub fn refresh_schedule(&self) -> ::std::option::Option<&crate::types::RefreshSchedule> {
49 self.refresh_schedule.as_ref()
50 }
51 pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53 self.created_timestamp.as_ref()
54 }
55 pub fn updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.updated_timestamp.as_ref()
58 }
59 pub fn last_refresh_id(&self) -> ::std::option::Option<&str> {
61 self.last_refresh_id.as_deref()
62 }
63 pub fn last_refresh_failure_reason(&self) -> ::std::option::Option<&str> {
65 self.last_refresh_failure_reason.as_deref()
66 }
67 pub fn termination_protection_enabled(&self) -> ::std::option::Option<bool> {
69 self.termination_protection_enabled
70 }
71}
72impl ::aws_types::request_id::RequestId for GetDashboardOutput {
73 fn request_id(&self) -> Option<&str> {
74 self._request_id.as_deref()
75 }
76}
77impl GetDashboardOutput {
78 pub fn builder() -> crate::operation::get_dashboard::builders::GetDashboardOutputBuilder {
80 crate::operation::get_dashboard::builders::GetDashboardOutputBuilder::default()
81 }
82}
83
84#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct GetDashboardOutputBuilder {
88 pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
89 pub(crate) r#type: ::std::option::Option<crate::types::DashboardType>,
90 pub(crate) status: ::std::option::Option<crate::types::DashboardStatus>,
91 pub(crate) widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
92 pub(crate) refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
93 pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
94 pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
95 pub(crate) last_refresh_id: ::std::option::Option<::std::string::String>,
96 pub(crate) last_refresh_failure_reason: ::std::option::Option<::std::string::String>,
97 pub(crate) termination_protection_enabled: ::std::option::Option<bool>,
98 _request_id: Option<String>,
99}
100impl GetDashboardOutputBuilder {
101 pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.dashboard_arn = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.dashboard_arn = input;
109 self
110 }
111 pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
113 &self.dashboard_arn
114 }
115 pub fn r#type(mut self, input: crate::types::DashboardType) -> Self {
117 self.r#type = ::std::option::Option::Some(input);
118 self
119 }
120 pub fn set_type(mut self, input: ::std::option::Option<crate::types::DashboardType>) -> Self {
122 self.r#type = input;
123 self
124 }
125 pub fn get_type(&self) -> &::std::option::Option<crate::types::DashboardType> {
127 &self.r#type
128 }
129 pub fn status(mut self, input: crate::types::DashboardStatus) -> Self {
131 self.status = ::std::option::Option::Some(input);
132 self
133 }
134 pub fn set_status(mut self, input: ::std::option::Option<crate::types::DashboardStatus>) -> Self {
136 self.status = input;
137 self
138 }
139 pub fn get_status(&self) -> &::std::option::Option<crate::types::DashboardStatus> {
141 &self.status
142 }
143 pub fn widgets(mut self, input: crate::types::Widget) -> Self {
149 let mut v = self.widgets.unwrap_or_default();
150 v.push(input);
151 self.widgets = ::std::option::Option::Some(v);
152 self
153 }
154 pub fn set_widgets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>) -> Self {
156 self.widgets = input;
157 self
158 }
159 pub fn get_widgets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Widget>> {
161 &self.widgets
162 }
163 pub fn refresh_schedule(mut self, input: crate::types::RefreshSchedule) -> Self {
165 self.refresh_schedule = ::std::option::Option::Some(input);
166 self
167 }
168 pub fn set_refresh_schedule(mut self, input: ::std::option::Option<crate::types::RefreshSchedule>) -> Self {
170 self.refresh_schedule = input;
171 self
172 }
173 pub fn get_refresh_schedule(&self) -> &::std::option::Option<crate::types::RefreshSchedule> {
175 &self.refresh_schedule
176 }
177 pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
179 self.created_timestamp = ::std::option::Option::Some(input);
180 self
181 }
182 pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
184 self.created_timestamp = input;
185 self
186 }
187 pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
189 &self.created_timestamp
190 }
191 pub fn updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
193 self.updated_timestamp = ::std::option::Option::Some(input);
194 self
195 }
196 pub fn set_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
198 self.updated_timestamp = input;
199 self
200 }
201 pub fn get_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
203 &self.updated_timestamp
204 }
205 pub fn last_refresh_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.last_refresh_id = ::std::option::Option::Some(input.into());
208 self
209 }
210 pub fn set_last_refresh_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.last_refresh_id = input;
213 self
214 }
215 pub fn get_last_refresh_id(&self) -> &::std::option::Option<::std::string::String> {
217 &self.last_refresh_id
218 }
219 pub fn last_refresh_failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221 self.last_refresh_failure_reason = ::std::option::Option::Some(input.into());
222 self
223 }
224 pub fn set_last_refresh_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226 self.last_refresh_failure_reason = input;
227 self
228 }
229 pub fn get_last_refresh_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
231 &self.last_refresh_failure_reason
232 }
233 pub fn termination_protection_enabled(mut self, input: bool) -> Self {
235 self.termination_protection_enabled = ::std::option::Option::Some(input);
236 self
237 }
238 pub fn set_termination_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
240 self.termination_protection_enabled = input;
241 self
242 }
243 pub fn get_termination_protection_enabled(&self) -> &::std::option::Option<bool> {
245 &self.termination_protection_enabled
246 }
247 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
248 self._request_id = Some(request_id.into());
249 self
250 }
251
252 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
253 self._request_id = request_id;
254 self
255 }
256 pub fn build(self) -> crate::operation::get_dashboard::GetDashboardOutput {
258 crate::operation::get_dashboard::GetDashboardOutput {
259 dashboard_arn: self.dashboard_arn,
260 r#type: self.r#type,
261 status: self.status,
262 widgets: self.widgets,
263 refresh_schedule: self.refresh_schedule,
264 created_timestamp: self.created_timestamp,
265 updated_timestamp: self.updated_timestamp,
266 last_refresh_id: self.last_refresh_id,
267 last_refresh_failure_reason: self.last_refresh_failure_reason,
268 termination_protection_enabled: self.termination_protection_enabled,
269 _request_id: self._request_id,
270 }
271 }
272}