aws_sdk_iotsitewise/operation/update_dashboard/
_update_dashboard_input.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 UpdateDashboardInput {
6    /// <p>The ID of the dashboard to update.</p>
7    pub dashboard_id: ::std::option::Option<::std::string::String>,
8    /// <p>A new friendly name for the dashboard.</p>
9    pub dashboard_name: ::std::option::Option<::std::string::String>,
10    /// <p>A new description for the dashboard.</p>
11    pub dashboard_description: ::std::option::Option<::std::string::String>,
12    /// <p>The new dashboard definition, as specified in a JSON literal.</p>
13    /// <ul>
14    /// <li>
15    /// <p>IoT SiteWise Monitor (Classic) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Create dashboards (CLI)</a></p></li>
16    /// <li>
17    /// <p>IoT SiteWise Monitor (AI-aware) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html">Create dashboards (CLI)</a></p></li>
18    /// </ul>
19    /// <p>in the <i>IoT SiteWise User Guide</i></p>
20    pub dashboard_definition: ::std::option::Option<::std::string::String>,
21    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
22    pub client_token: ::std::option::Option<::std::string::String>,
23}
24impl UpdateDashboardInput {
25    /// <p>The ID of the dashboard to update.</p>
26    pub fn dashboard_id(&self) -> ::std::option::Option<&str> {
27        self.dashboard_id.as_deref()
28    }
29    /// <p>A new friendly name for the dashboard.</p>
30    pub fn dashboard_name(&self) -> ::std::option::Option<&str> {
31        self.dashboard_name.as_deref()
32    }
33    /// <p>A new description for the dashboard.</p>
34    pub fn dashboard_description(&self) -> ::std::option::Option<&str> {
35        self.dashboard_description.as_deref()
36    }
37    /// <p>The new dashboard definition, as specified in a JSON literal.</p>
38    /// <ul>
39    /// <li>
40    /// <p>IoT SiteWise Monitor (Classic) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Create dashboards (CLI)</a></p></li>
41    /// <li>
42    /// <p>IoT SiteWise Monitor (AI-aware) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html">Create dashboards (CLI)</a></p></li>
43    /// </ul>
44    /// <p>in the <i>IoT SiteWise User Guide</i></p>
45    pub fn dashboard_definition(&self) -> ::std::option::Option<&str> {
46        self.dashboard_definition.as_deref()
47    }
48    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
49    pub fn client_token(&self) -> ::std::option::Option<&str> {
50        self.client_token.as_deref()
51    }
52}
53impl UpdateDashboardInput {
54    /// Creates a new builder-style object to manufacture [`UpdateDashboardInput`](crate::operation::update_dashboard::UpdateDashboardInput).
55    pub fn builder() -> crate::operation::update_dashboard::builders::UpdateDashboardInputBuilder {
56        crate::operation::update_dashboard::builders::UpdateDashboardInputBuilder::default()
57    }
58}
59
60/// A builder for [`UpdateDashboardInput`](crate::operation::update_dashboard::UpdateDashboardInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct UpdateDashboardInputBuilder {
64    pub(crate) dashboard_id: ::std::option::Option<::std::string::String>,
65    pub(crate) dashboard_name: ::std::option::Option<::std::string::String>,
66    pub(crate) dashboard_description: ::std::option::Option<::std::string::String>,
67    pub(crate) dashboard_definition: ::std::option::Option<::std::string::String>,
68    pub(crate) client_token: ::std::option::Option<::std::string::String>,
69}
70impl UpdateDashboardInputBuilder {
71    /// <p>The ID of the dashboard to update.</p>
72    /// This field is required.
73    pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.dashboard_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ID of the dashboard to update.</p>
78    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.dashboard_id = input;
80        self
81    }
82    /// <p>The ID of the dashboard to update.</p>
83    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.dashboard_id
85    }
86    /// <p>A new friendly name for the dashboard.</p>
87    /// This field is required.
88    pub fn dashboard_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.dashboard_name = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>A new friendly name for the dashboard.</p>
93    pub fn set_dashboard_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.dashboard_name = input;
95        self
96    }
97    /// <p>A new friendly name for the dashboard.</p>
98    pub fn get_dashboard_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.dashboard_name
100    }
101    /// <p>A new description for the dashboard.</p>
102    pub fn dashboard_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.dashboard_description = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>A new description for the dashboard.</p>
107    pub fn set_dashboard_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.dashboard_description = input;
109        self
110    }
111    /// <p>A new description for the dashboard.</p>
112    pub fn get_dashboard_description(&self) -> &::std::option::Option<::std::string::String> {
113        &self.dashboard_description
114    }
115    /// <p>The new dashboard definition, as specified in a JSON literal.</p>
116    /// <ul>
117    /// <li>
118    /// <p>IoT SiteWise Monitor (Classic) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Create dashboards (CLI)</a></p></li>
119    /// <li>
120    /// <p>IoT SiteWise Monitor (AI-aware) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html">Create dashboards (CLI)</a></p></li>
121    /// </ul>
122    /// <p>in the <i>IoT SiteWise User Guide</i></p>
123    /// This field is required.
124    pub fn dashboard_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.dashboard_definition = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The new dashboard definition, as specified in a JSON literal.</p>
129    /// <ul>
130    /// <li>
131    /// <p>IoT SiteWise Monitor (Classic) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Create dashboards (CLI)</a></p></li>
132    /// <li>
133    /// <p>IoT SiteWise Monitor (AI-aware) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html">Create dashboards (CLI)</a></p></li>
134    /// </ul>
135    /// <p>in the <i>IoT SiteWise User Guide</i></p>
136    pub fn set_dashboard_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.dashboard_definition = input;
138        self
139    }
140    /// <p>The new dashboard definition, as specified in a JSON literal.</p>
141    /// <ul>
142    /// <li>
143    /// <p>IoT SiteWise Monitor (Classic) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-using-aws-cli.html">Create dashboards (CLI)</a></p></li>
144    /// <li>
145    /// <p>IoT SiteWise Monitor (AI-aware) see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-dashboards-ai-dashboard-cli.html">Create dashboards (CLI)</a></p></li>
146    /// </ul>
147    /// <p>in the <i>IoT SiteWise User Guide</i></p>
148    pub fn get_dashboard_definition(&self) -> &::std::option::Option<::std::string::String> {
149        &self.dashboard_definition
150    }
151    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
152    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.client_token = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
157    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.client_token = input;
159        self
160    }
161    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
162    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
163        &self.client_token
164    }
165    /// Consumes the builder and constructs a [`UpdateDashboardInput`](crate::operation::update_dashboard::UpdateDashboardInput).
166    pub fn build(
167        self,
168    ) -> ::std::result::Result<crate::operation::update_dashboard::UpdateDashboardInput, ::aws_smithy_types::error::operation::BuildError> {
169        ::std::result::Result::Ok(crate::operation::update_dashboard::UpdateDashboardInput {
170            dashboard_id: self.dashboard_id,
171            dashboard_name: self.dashboard_name,
172            dashboard_description: self.dashboard_description,
173            dashboard_definition: self.dashboard_definition,
174            client_token: self.client_token,
175        })
176    }
177}