aws_sdk_iotsitewise/operation/create_dashboard/_create_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 CreateDashboardInput {
6 /// <p>The ID of the project in which to create the dashboard.</p>
7 pub project_id: ::std::option::Option<::std::string::String>,
8 /// <p>A friendly name for the dashboard.</p>
9 pub dashboard_name: ::std::option::Option<::std::string::String>,
10 /// <p>A description for the dashboard.</p>
11 pub dashboard_description: ::std::option::Option<::std::string::String>,
12 /// <p>The dashboard definition 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 /// <p>A list of key-value pairs that contain metadata for the dashboard. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
24 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
25}
26impl CreateDashboardInput {
27 /// <p>The ID of the project in which to create the dashboard.</p>
28 pub fn project_id(&self) -> ::std::option::Option<&str> {
29 self.project_id.as_deref()
30 }
31 /// <p>A friendly name for the dashboard.</p>
32 pub fn dashboard_name(&self) -> ::std::option::Option<&str> {
33 self.dashboard_name.as_deref()
34 }
35 /// <p>A description for the dashboard.</p>
36 pub fn dashboard_description(&self) -> ::std::option::Option<&str> {
37 self.dashboard_description.as_deref()
38 }
39 /// <p>The dashboard definition specified in a JSON literal.</p>
40 /// <ul>
41 /// <li>
42 /// <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>
43 /// <li>
44 /// <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>
45 /// </ul>
46 /// <p>in the <i>IoT SiteWise User Guide</i></p>
47 pub fn dashboard_definition(&self) -> ::std::option::Option<&str> {
48 self.dashboard_definition.as_deref()
49 }
50 /// <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>
51 pub fn client_token(&self) -> ::std::option::Option<&str> {
52 self.client_token.as_deref()
53 }
54 /// <p>A list of key-value pairs that contain metadata for the dashboard. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
55 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
56 self.tags.as_ref()
57 }
58}
59impl CreateDashboardInput {
60 /// Creates a new builder-style object to manufacture [`CreateDashboardInput`](crate::operation::create_dashboard::CreateDashboardInput).
61 pub fn builder() -> crate::operation::create_dashboard::builders::CreateDashboardInputBuilder {
62 crate::operation::create_dashboard::builders::CreateDashboardInputBuilder::default()
63 }
64}
65
66/// A builder for [`CreateDashboardInput`](crate::operation::create_dashboard::CreateDashboardInput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct CreateDashboardInputBuilder {
70 pub(crate) project_id: ::std::option::Option<::std::string::String>,
71 pub(crate) dashboard_name: ::std::option::Option<::std::string::String>,
72 pub(crate) dashboard_description: ::std::option::Option<::std::string::String>,
73 pub(crate) dashboard_definition: ::std::option::Option<::std::string::String>,
74 pub(crate) client_token: ::std::option::Option<::std::string::String>,
75 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
76}
77impl CreateDashboardInputBuilder {
78 /// <p>The ID of the project in which to create the dashboard.</p>
79 /// This field is required.
80 pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.project_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>The ID of the project in which to create the dashboard.</p>
85 pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.project_id = input;
87 self
88 }
89 /// <p>The ID of the project in which to create the dashboard.</p>
90 pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.project_id
92 }
93 /// <p>A friendly name for the dashboard.</p>
94 /// This field is required.
95 pub fn dashboard_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.dashboard_name = ::std::option::Option::Some(input.into());
97 self
98 }
99 /// <p>A friendly name for the dashboard.</p>
100 pub fn set_dashboard_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.dashboard_name = input;
102 self
103 }
104 /// <p>A friendly name for the dashboard.</p>
105 pub fn get_dashboard_name(&self) -> &::std::option::Option<::std::string::String> {
106 &self.dashboard_name
107 }
108 /// <p>A description for the dashboard.</p>
109 pub fn dashboard_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.dashboard_description = ::std::option::Option::Some(input.into());
111 self
112 }
113 /// <p>A description for the dashboard.</p>
114 pub fn set_dashboard_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.dashboard_description = input;
116 self
117 }
118 /// <p>A description for the dashboard.</p>
119 pub fn get_dashboard_description(&self) -> &::std::option::Option<::std::string::String> {
120 &self.dashboard_description
121 }
122 /// <p>The dashboard definition specified in a JSON literal.</p>
123 /// <ul>
124 /// <li>
125 /// <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>
126 /// <li>
127 /// <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>
128 /// </ul>
129 /// <p>in the <i>IoT SiteWise User Guide</i></p>
130 /// This field is required.
131 pub fn dashboard_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.dashboard_definition = ::std::option::Option::Some(input.into());
133 self
134 }
135 /// <p>The dashboard definition specified in a JSON literal.</p>
136 /// <ul>
137 /// <li>
138 /// <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>
139 /// <li>
140 /// <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>
141 /// </ul>
142 /// <p>in the <i>IoT SiteWise User Guide</i></p>
143 pub fn set_dashboard_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144 self.dashboard_definition = input;
145 self
146 }
147 /// <p>The dashboard definition specified in a JSON literal.</p>
148 /// <ul>
149 /// <li>
150 /// <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>
151 /// <li>
152 /// <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>
153 /// </ul>
154 /// <p>in the <i>IoT SiteWise User Guide</i></p>
155 pub fn get_dashboard_definition(&self) -> &::std::option::Option<::std::string::String> {
156 &self.dashboard_definition
157 }
158 /// <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>
159 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.client_token = ::std::option::Option::Some(input.into());
161 self
162 }
163 /// <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>
164 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.client_token = input;
166 self
167 }
168 /// <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>
169 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
170 &self.client_token
171 }
172 /// Adds a key-value pair to `tags`.
173 ///
174 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
175 ///
176 /// <p>A list of key-value pairs that contain metadata for the dashboard. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
177 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
178 let mut hash_map = self.tags.unwrap_or_default();
179 hash_map.insert(k.into(), v.into());
180 self.tags = ::std::option::Option::Some(hash_map);
181 self
182 }
183 /// <p>A list of key-value pairs that contain metadata for the dashboard. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
184 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
185 self.tags = input;
186 self
187 }
188 /// <p>A list of key-value pairs that contain metadata for the dashboard. For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html">Tagging your IoT SiteWise resources</a> in the <i>IoT SiteWise User Guide</i>.</p>
189 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
190 &self.tags
191 }
192 /// Consumes the builder and constructs a [`CreateDashboardInput`](crate::operation::create_dashboard::CreateDashboardInput).
193 pub fn build(
194 self,
195 ) -> ::std::result::Result<crate::operation::create_dashboard::CreateDashboardInput, ::aws_smithy_types::error::operation::BuildError> {
196 ::std::result::Result::Ok(crate::operation::create_dashboard::CreateDashboardInput {
197 project_id: self.project_id,
198 dashboard_name: self.dashboard_name,
199 dashboard_description: self.dashboard_description,
200 dashboard_definition: self.dashboard_definition,
201 client_token: self.client_token,
202 tags: self.tags,
203 })
204 }
205}