aws_sdk_cloudtrail/operation/update_dashboard/
_update_dashboard_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDashboardOutput {
6 pub dashboard_arn: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub r#type: ::std::option::Option<crate::types::DashboardType>,
12 pub widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
14 pub refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
16 pub termination_protection_enabled: ::std::option::Option<bool>,
18 pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
22 _request_id: Option<String>,
23}
24impl UpdateDashboardOutput {
25 pub fn dashboard_arn(&self) -> ::std::option::Option<&str> {
27 self.dashboard_arn.as_deref()
28 }
29 pub fn name(&self) -> ::std::option::Option<&str> {
31 self.name.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 widgets(&self) -> &[crate::types::Widget] {
41 self.widgets.as_deref().unwrap_or_default()
42 }
43 pub fn refresh_schedule(&self) -> ::std::option::Option<&crate::types::RefreshSchedule> {
45 self.refresh_schedule.as_ref()
46 }
47 pub fn termination_protection_enabled(&self) -> ::std::option::Option<bool> {
49 self.termination_protection_enabled
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}
60impl ::aws_types::request_id::RequestId for UpdateDashboardOutput {
61 fn request_id(&self) -> Option<&str> {
62 self._request_id.as_deref()
63 }
64}
65impl UpdateDashboardOutput {
66 pub fn builder() -> crate::operation::update_dashboard::builders::UpdateDashboardOutputBuilder {
68 crate::operation::update_dashboard::builders::UpdateDashboardOutputBuilder::default()
69 }
70}
71
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct UpdateDashboardOutputBuilder {
76 pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
77 pub(crate) name: ::std::option::Option<::std::string::String>,
78 pub(crate) r#type: ::std::option::Option<crate::types::DashboardType>,
79 pub(crate) widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
80 pub(crate) refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
81 pub(crate) termination_protection_enabled: ::std::option::Option<bool>,
82 pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
83 pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
84 _request_id: Option<String>,
85}
86impl UpdateDashboardOutputBuilder {
87 pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.dashboard_arn = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.dashboard_arn = input;
95 self
96 }
97 pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
99 &self.dashboard_arn
100 }
101 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.name = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.name = input;
109 self
110 }
111 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
113 &self.name
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 widgets(mut self, input: crate::types::Widget) -> Self {
135 let mut v = self.widgets.unwrap_or_default();
136 v.push(input);
137 self.widgets = ::std::option::Option::Some(v);
138 self
139 }
140 pub fn set_widgets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>) -> Self {
142 self.widgets = input;
143 self
144 }
145 pub fn get_widgets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Widget>> {
147 &self.widgets
148 }
149 pub fn refresh_schedule(mut self, input: crate::types::RefreshSchedule) -> Self {
151 self.refresh_schedule = ::std::option::Option::Some(input);
152 self
153 }
154 pub fn set_refresh_schedule(mut self, input: ::std::option::Option<crate::types::RefreshSchedule>) -> Self {
156 self.refresh_schedule = input;
157 self
158 }
159 pub fn get_refresh_schedule(&self) -> &::std::option::Option<crate::types::RefreshSchedule> {
161 &self.refresh_schedule
162 }
163 pub fn termination_protection_enabled(mut self, input: bool) -> Self {
165 self.termination_protection_enabled = ::std::option::Option::Some(input);
166 self
167 }
168 pub fn set_termination_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
170 self.termination_protection_enabled = input;
171 self
172 }
173 pub fn get_termination_protection_enabled(&self) -> &::std::option::Option<bool> {
175 &self.termination_protection_enabled
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(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
206 self._request_id = Some(request_id.into());
207 self
208 }
209
210 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
211 self._request_id = request_id;
212 self
213 }
214 pub fn build(self) -> crate::operation::update_dashboard::UpdateDashboardOutput {
216 crate::operation::update_dashboard::UpdateDashboardOutput {
217 dashboard_arn: self.dashboard_arn,
218 name: self.name,
219 r#type: self.r#type,
220 widgets: self.widgets,
221 refresh_schedule: self.refresh_schedule,
222 termination_protection_enabled: self.termination_protection_enabled,
223 created_timestamp: self.created_timestamp,
224 updated_timestamp: self.updated_timestamp,
225 _request_id: self._request_id,
226 }
227 }
228}