aws_sdk_iottwinmaker/operation/get_scene/
_get_scene_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetSceneOutput {
6 pub workspace_id: ::std::string::String,
8 pub scene_id: ::std::string::String,
10 pub content_location: ::std::string::String,
12 pub arn: ::std::string::String,
14 pub creation_date_time: ::aws_smithy_types::DateTime,
16 pub update_date_time: ::aws_smithy_types::DateTime,
18 pub description: ::std::option::Option<::std::string::String>,
20 pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
22 pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24 pub generated_scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26 pub error: ::std::option::Option<crate::types::SceneError>,
28 _request_id: Option<String>,
29}
30impl GetSceneOutput {
31 pub fn workspace_id(&self) -> &str {
33 use std::ops::Deref;
34 self.workspace_id.deref()
35 }
36 pub fn scene_id(&self) -> &str {
38 use std::ops::Deref;
39 self.scene_id.deref()
40 }
41 pub fn content_location(&self) -> &str {
43 use std::ops::Deref;
44 self.content_location.deref()
45 }
46 pub fn arn(&self) -> &str {
48 use std::ops::Deref;
49 self.arn.deref()
50 }
51 pub fn creation_date_time(&self) -> &::aws_smithy_types::DateTime {
53 &self.creation_date_time
54 }
55 pub fn update_date_time(&self) -> &::aws_smithy_types::DateTime {
57 &self.update_date_time
58 }
59 pub fn description(&self) -> ::std::option::Option<&str> {
61 self.description.as_deref()
62 }
63 pub fn capabilities(&self) -> &[::std::string::String] {
67 self.capabilities.as_deref().unwrap_or_default()
68 }
69 pub fn scene_metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71 self.scene_metadata.as_ref()
72 }
73 pub fn generated_scene_metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
75 self.generated_scene_metadata.as_ref()
76 }
77 pub fn error(&self) -> ::std::option::Option<&crate::types::SceneError> {
79 self.error.as_ref()
80 }
81}
82impl ::aws_types::request_id::RequestId for GetSceneOutput {
83 fn request_id(&self) -> Option<&str> {
84 self._request_id.as_deref()
85 }
86}
87impl GetSceneOutput {
88 pub fn builder() -> crate::operation::get_scene::builders::GetSceneOutputBuilder {
90 crate::operation::get_scene::builders::GetSceneOutputBuilder::default()
91 }
92}
93
94#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
96#[non_exhaustive]
97pub struct GetSceneOutputBuilder {
98 pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
99 pub(crate) scene_id: ::std::option::Option<::std::string::String>,
100 pub(crate) content_location: ::std::option::Option<::std::string::String>,
101 pub(crate) arn: ::std::option::Option<::std::string::String>,
102 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
103 pub(crate) update_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
104 pub(crate) description: ::std::option::Option<::std::string::String>,
105 pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
106 pub(crate) scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
107 pub(crate) generated_scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
108 pub(crate) error: ::std::option::Option<crate::types::SceneError>,
109 _request_id: Option<String>,
110}
111impl GetSceneOutputBuilder {
112 pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.workspace_id = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.workspace_id = input;
121 self
122 }
123 pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
125 &self.workspace_id
126 }
127 pub fn scene_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.scene_id = ::std::option::Option::Some(input.into());
131 self
132 }
133 pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.scene_id = input;
136 self
137 }
138 pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
140 &self.scene_id
141 }
142 pub fn content_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.content_location = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.content_location = input;
151 self
152 }
153 pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
155 &self.content_location
156 }
157 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.arn = ::std::option::Option::Some(input.into());
161 self
162 }
163 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.arn = input;
166 self
167 }
168 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
170 &self.arn
171 }
172 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
175 self.creation_date_time = ::std::option::Option::Some(input);
176 self
177 }
178 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
180 self.creation_date_time = input;
181 self
182 }
183 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
185 &self.creation_date_time
186 }
187 pub fn update_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
190 self.update_date_time = ::std::option::Option::Some(input);
191 self
192 }
193 pub fn set_update_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
195 self.update_date_time = input;
196 self
197 }
198 pub fn get_update_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
200 &self.update_date_time
201 }
202 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.description = ::std::option::Option::Some(input.into());
205 self
206 }
207 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.description = input;
210 self
211 }
212 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
214 &self.description
215 }
216 pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 let mut v = self.capabilities.unwrap_or_default();
223 v.push(input.into());
224 self.capabilities = ::std::option::Option::Some(v);
225 self
226 }
227 pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
229 self.capabilities = input;
230 self
231 }
232 pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
234 &self.capabilities
235 }
236 pub fn scene_metadata(
242 mut self,
243 k: impl ::std::convert::Into<::std::string::String>,
244 v: impl ::std::convert::Into<::std::string::String>,
245 ) -> Self {
246 let mut hash_map = self.scene_metadata.unwrap_or_default();
247 hash_map.insert(k.into(), v.into());
248 self.scene_metadata = ::std::option::Option::Some(hash_map);
249 self
250 }
251 pub fn set_scene_metadata(
253 mut self,
254 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
255 ) -> Self {
256 self.scene_metadata = input;
257 self
258 }
259 pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
261 &self.scene_metadata
262 }
263 pub fn generated_scene_metadata(
269 mut self,
270 k: impl ::std::convert::Into<::std::string::String>,
271 v: impl ::std::convert::Into<::std::string::String>,
272 ) -> Self {
273 let mut hash_map = self.generated_scene_metadata.unwrap_or_default();
274 hash_map.insert(k.into(), v.into());
275 self.generated_scene_metadata = ::std::option::Option::Some(hash_map);
276 self
277 }
278 pub fn set_generated_scene_metadata(
280 mut self,
281 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
282 ) -> Self {
283 self.generated_scene_metadata = input;
284 self
285 }
286 pub fn get_generated_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
288 &self.generated_scene_metadata
289 }
290 pub fn error(mut self, input: crate::types::SceneError) -> Self {
292 self.error = ::std::option::Option::Some(input);
293 self
294 }
295 pub fn set_error(mut self, input: ::std::option::Option<crate::types::SceneError>) -> Self {
297 self.error = input;
298 self
299 }
300 pub fn get_error(&self) -> &::std::option::Option<crate::types::SceneError> {
302 &self.error
303 }
304 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
305 self._request_id = Some(request_id.into());
306 self
307 }
308
309 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
310 self._request_id = request_id;
311 self
312 }
313 pub fn build(self) -> ::std::result::Result<crate::operation::get_scene::GetSceneOutput, ::aws_smithy_types::error::operation::BuildError> {
322 ::std::result::Result::Ok(crate::operation::get_scene::GetSceneOutput {
323 workspace_id: self.workspace_id.ok_or_else(|| {
324 ::aws_smithy_types::error::operation::BuildError::missing_field(
325 "workspace_id",
326 "workspace_id was not specified but it is required when building GetSceneOutput",
327 )
328 })?,
329 scene_id: self.scene_id.ok_or_else(|| {
330 ::aws_smithy_types::error::operation::BuildError::missing_field(
331 "scene_id",
332 "scene_id was not specified but it is required when building GetSceneOutput",
333 )
334 })?,
335 content_location: self.content_location.ok_or_else(|| {
336 ::aws_smithy_types::error::operation::BuildError::missing_field(
337 "content_location",
338 "content_location was not specified but it is required when building GetSceneOutput",
339 )
340 })?,
341 arn: self.arn.ok_or_else(|| {
342 ::aws_smithy_types::error::operation::BuildError::missing_field(
343 "arn",
344 "arn was not specified but it is required when building GetSceneOutput",
345 )
346 })?,
347 creation_date_time: self.creation_date_time.ok_or_else(|| {
348 ::aws_smithy_types::error::operation::BuildError::missing_field(
349 "creation_date_time",
350 "creation_date_time was not specified but it is required when building GetSceneOutput",
351 )
352 })?,
353 update_date_time: self.update_date_time.ok_or_else(|| {
354 ::aws_smithy_types::error::operation::BuildError::missing_field(
355 "update_date_time",
356 "update_date_time was not specified but it is required when building GetSceneOutput",
357 )
358 })?,
359 description: self.description,
360 capabilities: self.capabilities,
361 scene_metadata: self.scene_metadata,
362 generated_scene_metadata: self.generated_scene_metadata,
363 error: self.error,
364 _request_id: self._request_id,
365 })
366 }
367}