aws_sdk_iotsitewise/operation/describe_dashboard/
_describe_dashboard_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDashboardOutput {
6    /// <p>The ID of the dashboard.</p>
7    pub dashboard_id: ::std::string::String,
8    /// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the dashboard, which has the following format.</p>
9    /// <p><code>arn:${Partition}:iotsitewise:${Region}:${Account}:dashboard/${DashboardId}</code></p>
10    pub dashboard_arn: ::std::string::String,
11    /// <p>The name of the dashboard.</p>
12    pub dashboard_name: ::std::string::String,
13    /// <p>The ID of the project that the dashboard is in.</p>
14    pub project_id: ::std::string::String,
15    /// <p>The dashboard's description.</p>
16    pub dashboard_description: ::std::option::Option<::std::string::String>,
17    /// <p>The dashboard's definition JSON literal. For detailed information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Creating dashboards (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>
18    pub dashboard_definition: ::std::string::String,
19    /// <p>The date the dashboard was created, in Unix epoch time.</p>
20    pub dashboard_creation_date: ::aws_smithy_types::DateTime,
21    /// <p>The date the dashboard was last updated, in Unix epoch time.</p>
22    pub dashboard_last_update_date: ::aws_smithy_types::DateTime,
23    _request_id: Option<String>,
24}
25impl DescribeDashboardOutput {
26    /// <p>The ID of the dashboard.</p>
27    pub fn dashboard_id(&self) -> &str {
28        use std::ops::Deref;
29        self.dashboard_id.deref()
30    }
31    /// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the dashboard, which has the following format.</p>
32    /// <p><code>arn:${Partition}:iotsitewise:${Region}:${Account}:dashboard/${DashboardId}</code></p>
33    pub fn dashboard_arn(&self) -> &str {
34        use std::ops::Deref;
35        self.dashboard_arn.deref()
36    }
37    /// <p>The name of the dashboard.</p>
38    pub fn dashboard_name(&self) -> &str {
39        use std::ops::Deref;
40        self.dashboard_name.deref()
41    }
42    /// <p>The ID of the project that the dashboard is in.</p>
43    pub fn project_id(&self) -> &str {
44        use std::ops::Deref;
45        self.project_id.deref()
46    }
47    /// <p>The dashboard's description.</p>
48    pub fn dashboard_description(&self) -> ::std::option::Option<&str> {
49        self.dashboard_description.as_deref()
50    }
51    /// <p>The dashboard's definition JSON literal. For detailed information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Creating dashboards (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>
52    pub fn dashboard_definition(&self) -> &str {
53        use std::ops::Deref;
54        self.dashboard_definition.deref()
55    }
56    /// <p>The date the dashboard was created, in Unix epoch time.</p>
57    pub fn dashboard_creation_date(&self) -> &::aws_smithy_types::DateTime {
58        &self.dashboard_creation_date
59    }
60    /// <p>The date the dashboard was last updated, in Unix epoch time.</p>
61    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    /// Creates a new builder-style object to manufacture [`DescribeDashboardOutput`](crate::operation::describe_dashboard::DescribeDashboardOutput).
72    pub fn builder() -> crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder {
73        crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::default()
74    }
75}
76
77/// A builder for [`DescribeDashboardOutput`](crate::operation::describe_dashboard::DescribeDashboardOutput).
78#[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    /// <p>The ID of the dashboard.</p>
93    /// This field is required.
94    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    /// <p>The ID of the dashboard.</p>
99    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.dashboard_id = input;
101        self
102    }
103    /// <p>The ID of the dashboard.</p>
104    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.dashboard_id
106    }
107    /// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the dashboard, which has the following format.</p>
108    /// <p><code>arn:${Partition}:iotsitewise:${Region}:${Account}:dashboard/${DashboardId}</code></p>
109    /// This field is required.
110    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    /// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the dashboard, which has the following format.</p>
115    /// <p><code>arn:${Partition}:iotsitewise:${Region}:${Account}:dashboard/${DashboardId}</code></p>
116    pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.dashboard_arn = input;
118        self
119    }
120    /// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the dashboard, which has the following format.</p>
121    /// <p><code>arn:${Partition}:iotsitewise:${Region}:${Account}:dashboard/${DashboardId}</code></p>
122    pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
123        &self.dashboard_arn
124    }
125    /// <p>The name of the dashboard.</p>
126    /// This field is required.
127    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    /// <p>The name of the dashboard.</p>
132    pub fn set_dashboard_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.dashboard_name = input;
134        self
135    }
136    /// <p>The name of the dashboard.</p>
137    pub fn get_dashboard_name(&self) -> &::std::option::Option<::std::string::String> {
138        &self.dashboard_name
139    }
140    /// <p>The ID of the project that the dashboard is in.</p>
141    /// This field is required.
142    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    /// <p>The ID of the project that the dashboard is in.</p>
147    pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.project_id = input;
149        self
150    }
151    /// <p>The ID of the project that the dashboard is in.</p>
152    pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
153        &self.project_id
154    }
155    /// <p>The dashboard's description.</p>
156    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    /// <p>The dashboard's description.</p>
161    pub fn set_dashboard_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.dashboard_description = input;
163        self
164    }
165    /// <p>The dashboard's description.</p>
166    pub fn get_dashboard_description(&self) -> &::std::option::Option<::std::string::String> {
167        &self.dashboard_description
168    }
169    /// <p>The dashboard's definition JSON literal. For detailed information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Creating dashboards (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>
170    /// This field is required.
171    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    /// <p>The dashboard's definition JSON literal. For detailed information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Creating dashboards (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>
176    pub fn set_dashboard_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.dashboard_definition = input;
178        self
179    }
180    /// <p>The dashboard's definition JSON literal. For detailed information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Creating dashboards (CLI)</a> in the <i>IoT SiteWise User Guide</i>.</p>
181    pub fn get_dashboard_definition(&self) -> &::std::option::Option<::std::string::String> {
182        &self.dashboard_definition
183    }
184    /// <p>The date the dashboard was created, in Unix epoch time.</p>
185    /// This field is required.
186    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    /// <p>The date the dashboard was created, in Unix epoch time.</p>
191    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    /// <p>The date the dashboard was created, in Unix epoch time.</p>
196    pub fn get_dashboard_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
197        &self.dashboard_creation_date
198    }
199    /// <p>The date the dashboard was last updated, in Unix epoch time.</p>
200    /// This field is required.
201    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    /// <p>The date the dashboard was last updated, in Unix epoch time.</p>
206    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    /// <p>The date the dashboard was last updated, in Unix epoch time.</p>
211    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    /// Consumes the builder and constructs a [`DescribeDashboardOutput`](crate::operation::describe_dashboard::DescribeDashboardOutput).
224    /// This method will fail if any of the following fields are not set:
225    /// - [`dashboard_id`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_id)
226    /// - [`dashboard_arn`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_arn)
227    /// - [`dashboard_name`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_name)
228    /// - [`project_id`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::project_id)
229    /// - [`dashboard_definition`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_definition)
230    /// - [`dashboard_creation_date`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_creation_date)
231    /// - [`dashboard_last_update_date`](crate::operation::describe_dashboard::builders::DescribeDashboardOutputBuilder::dashboard_last_update_date)
232    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}