aws_sdk_iotsitewise/operation/describe_dashboard/
_describe_dashboard_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDashboardOutput {
6 pub dashboard_id: ::std::string::String,
8 pub dashboard_arn: ::std::string::String,
11 pub dashboard_name: ::std::string::String,
13 pub project_id: ::std::string::String,
15 pub dashboard_description: ::std::option::Option<::std::string::String>,
17 pub dashboard_definition: ::std::string::String,
19 pub dashboard_creation_date: ::aws_smithy_types::DateTime,
21 pub dashboard_last_update_date: ::aws_smithy_types::DateTime,
23 _request_id: Option<String>,
24}
25impl DescribeDashboardOutput {
26 pub fn dashboard_id(&self) -> &str {
28 use std::ops::Deref;
29 self.dashboard_id.deref()
30 }
31 pub fn dashboard_arn(&self) -> &str {
34 use std::ops::Deref;
35 self.dashboard_arn.deref()
36 }
37 pub fn dashboard_name(&self) -> &str {
39 use std::ops::Deref;
40 self.dashboard_name.deref()
41 }
42 pub fn project_id(&self) -> &str {
44 use std::ops::Deref;
45 self.project_id.deref()
46 }
47 pub fn dashboard_description(&self) -> ::std::option::Option<&str> {
49 self.dashboard_description.as_deref()
50 }
51 pub fn dashboard_definition(&self) -> &str {
53 use std::ops::Deref;
54 self.dashboard_definition.deref()
55 }
56 pub fn dashboard_creation_date(&self) -> &::aws_smithy_types::DateTime {
58 &self.dashboard_creation_date
59 }
60 pub fn dashboard_last_update_date(&self) -> &::aws_smithy_types::DateTime {
62 &self.dashboard_last_update_date
63 }
64}
65impl ::aws_types::request_id::RequestId for DescribeDashboardOutput {
66 fn request_id(&self) -> Option<&str> {
67 self._request_id.as_deref()
68 }
69}
70impl DescribeDashboardOutput {
71 pub fn builder() -> crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder {
73 crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::default()
74 }
75}
76
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
79#[non_exhaustive]
80pub struct DescribeDashboardOutputBuilder {
81 pub(crate) dashboard_id: ::std::option::Option<::std::string::String>,
82 pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
83 pub(crate) dashboard_name: ::std::option::Option<::std::string::String>,
84 pub(crate) project_id: ::std::option::Option<::std::string::String>,
85 pub(crate) dashboard_description: ::std::option::Option<::std::string::String>,
86 pub(crate) dashboard_definition: ::std::option::Option<::std::string::String>,
87 pub(crate) dashboard_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
88 pub(crate) dashboard_last_update_date: ::std::option::Option<::aws_smithy_types::DateTime>,
89 _request_id: Option<String>,
90}
91impl DescribeDashboardOutputBuilder {
92 pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.dashboard_id = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.dashboard_id = input;
101 self
102 }
103 pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
105 &self.dashboard_id
106 }
107 pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111 self.dashboard_arn = ::std::option::Option::Some(input.into());
112 self
113 }
114 pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117 self.dashboard_arn = input;
118 self
119 }
120 pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
123 &self.dashboard_arn
124 }
125 pub fn dashboard_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.dashboard_name = ::std::option::Option::Some(input.into());
129 self
130 }
131 pub fn set_dashboard_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.dashboard_name = input;
134 self
135 }
136 pub fn get_dashboard_name(&self) -> &::std::option::Option<::std::string::String> {
138 &self.dashboard_name
139 }
140 pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.project_id = ::std::option::Option::Some(input.into());
144 self
145 }
146 pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.project_id = input;
149 self
150 }
151 pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
153 &self.project_id
154 }
155 pub fn dashboard_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.dashboard_description = ::std::option::Option::Some(input.into());
158 self
159 }
160 pub fn set_dashboard_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.dashboard_description = input;
163 self
164 }
165 pub fn get_dashboard_description(&self) -> &::std::option::Option<::std::string::String> {
167 &self.dashboard_description
168 }
169 pub fn dashboard_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.dashboard_definition = ::std::option::Option::Some(input.into());
173 self
174 }
175 pub fn set_dashboard_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.dashboard_definition = input;
178 self
179 }
180 pub fn get_dashboard_definition(&self) -> &::std::option::Option<::std::string::String> {
182 &self.dashboard_definition
183 }
184 pub fn dashboard_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
187 self.dashboard_creation_date = ::std::option::Option::Some(input);
188 self
189 }
190 pub fn set_dashboard_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
192 self.dashboard_creation_date = input;
193 self
194 }
195 pub fn get_dashboard_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
197 &self.dashboard_creation_date
198 }
199 pub fn dashboard_last_update_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
202 self.dashboard_last_update_date = ::std::option::Option::Some(input);
203 self
204 }
205 pub fn set_dashboard_last_update_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
207 self.dashboard_last_update_date = input;
208 self
209 }
210 pub fn get_dashboard_last_update_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
212 &self.dashboard_last_update_date
213 }
214 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
215 self._request_id = Some(request_id.into());
216 self
217 }
218
219 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
220 self._request_id = request_id;
221 self
222 }
223 pub fn build(
233 self,
234 ) -> ::std::result::Result<crate::operation::describe_dashboard::DescribeDashboardOutput, ::aws_smithy_types::error::operation::BuildError> {
235 ::std::result::Result::Ok(crate::operation::describe_dashboard::DescribeDashboardOutput {
236 dashboard_id: self.dashboard_id.ok_or_else(|| {
237 ::aws_smithy_types::error::operation::BuildError::missing_field(
238 "dashboard_id",
239 "dashboard_id was not specified but it is required when building DescribeDashboardOutput",
240 )
241 })?,
242 dashboard_arn: self.dashboard_arn.ok_or_else(|| {
243 ::aws_smithy_types::error::operation::BuildError::missing_field(
244 "dashboard_arn",
245 "dashboard_arn was not specified but it is required when building DescribeDashboardOutput",
246 )
247 })?,
248 dashboard_name: self.dashboard_name.ok_or_else(|| {
249 ::aws_smithy_types::error::operation::BuildError::missing_field(
250 "dashboard_name",
251 "dashboard_name was not specified but it is required when building DescribeDashboardOutput",
252 )
253 })?,
254 project_id: self.project_id.ok_or_else(|| {
255 ::aws_smithy_types::error::operation::BuildError::missing_field(
256 "project_id",
257 "project_id was not specified but it is required when building DescribeDashboardOutput",
258 )
259 })?,
260 dashboard_description: self.dashboard_description,
261 dashboard_definition: self.dashboard_definition.ok_or_else(|| {
262 ::aws_smithy_types::error::operation::BuildError::missing_field(
263 "dashboard_definition",
264 "dashboard_definition was not specified but it is required when building DescribeDashboardOutput",
265 )
266 })?,
267 dashboard_creation_date: self.dashboard_creation_date.ok_or_else(|| {
268 ::aws_smithy_types::error::operation::BuildError::missing_field(
269 "dashboard_creation_date",
270 "dashboard_creation_date was not specified but it is required when building DescribeDashboardOutput",
271 )
272 })?,
273 dashboard_last_update_date: self.dashboard_last_update_date.ok_or_else(|| {
274 ::aws_smithy_types::error::operation::BuildError::missing_field(
275 "dashboard_last_update_date",
276 "dashboard_last_update_date was not specified but it is required when building DescribeDashboardOutput",
277 )
278 })?,
279 _request_id: self._request_id,
280 })
281 }
282}