aws_sdk_iottwinmaker/operation/get_scene/
_get_scene_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 GetSceneOutput {
6    /// <p>The ID of the workspace that contains the scene.</p>
7    pub workspace_id: ::std::string::String,
8    /// <p>The ID of the scene.</p>
9    pub scene_id: ::std::string::String,
10    /// <p>The relative path that specifies the location of the content definition file.</p>
11    pub content_location: ::std::string::String,
12    /// <p>The ARN of the scene.</p>
13    pub arn: ::std::string::String,
14    /// <p>The date and time when the scene was created.</p>
15    pub creation_date_time: ::aws_smithy_types::DateTime,
16    /// <p>The date and time when the scene was last updated.</p>
17    pub update_date_time: ::aws_smithy_types::DateTime,
18    /// <p>The description of the scene.</p>
19    pub description: ::std::option::Option<::std::string::String>,
20    /// <p>A list of capabilities that the scene uses to render.</p>
21    pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
22    /// <p>The response metadata.</p>
23    pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    /// <p>The generated scene metadata.</p>
25    pub generated_scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    /// <p>The SceneResponse error.</p>
27    pub error: ::std::option::Option<crate::types::SceneError>,
28    _request_id: Option<String>,
29}
30impl GetSceneOutput {
31    /// <p>The ID of the workspace that contains the scene.</p>
32    pub fn workspace_id(&self) -> &str {
33        use std::ops::Deref;
34        self.workspace_id.deref()
35    }
36    /// <p>The ID of the scene.</p>
37    pub fn scene_id(&self) -> &str {
38        use std::ops::Deref;
39        self.scene_id.deref()
40    }
41    /// <p>The relative path that specifies the location of the content definition file.</p>
42    pub fn content_location(&self) -> &str {
43        use std::ops::Deref;
44        self.content_location.deref()
45    }
46    /// <p>The ARN of the scene.</p>
47    pub fn arn(&self) -> &str {
48        use std::ops::Deref;
49        self.arn.deref()
50    }
51    /// <p>The date and time when the scene was created.</p>
52    pub fn creation_date_time(&self) -> &::aws_smithy_types::DateTime {
53        &self.creation_date_time
54    }
55    /// <p>The date and time when the scene was last updated.</p>
56    pub fn update_date_time(&self) -> &::aws_smithy_types::DateTime {
57        &self.update_date_time
58    }
59    /// <p>The description of the scene.</p>
60    pub fn description(&self) -> ::std::option::Option<&str> {
61        self.description.as_deref()
62    }
63    /// <p>A list of capabilities that the scene uses to render.</p>
64    ///
65    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capabilities.is_none()`.
66    pub fn capabilities(&self) -> &[::std::string::String] {
67        self.capabilities.as_deref().unwrap_or_default()
68    }
69    /// <p>The response metadata.</p>
70    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    /// <p>The generated scene metadata.</p>
74    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    /// <p>The SceneResponse error.</p>
78    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    /// Creates a new builder-style object to manufacture [`GetSceneOutput`](crate::operation::get_scene::GetSceneOutput).
89    pub fn builder() -> crate::operation::get_scene::builders::GetSceneOutputBuilder {
90        crate::operation::get_scene::builders::GetSceneOutputBuilder::default()
91    }
92}
93
94/// A builder for [`GetSceneOutput`](crate::operation::get_scene::GetSceneOutput).
95#[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    /// <p>The ID of the workspace that contains the scene.</p>
113    /// This field is required.
114    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    /// <p>The ID of the workspace that contains the scene.</p>
119    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.workspace_id = input;
121        self
122    }
123    /// <p>The ID of the workspace that contains the scene.</p>
124    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.workspace_id
126    }
127    /// <p>The ID of the scene.</p>
128    /// This field is required.
129    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    /// <p>The ID of the scene.</p>
134    pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.scene_id = input;
136        self
137    }
138    /// <p>The ID of the scene.</p>
139    pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
140        &self.scene_id
141    }
142    /// <p>The relative path that specifies the location of the content definition file.</p>
143    /// This field is required.
144    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    /// <p>The relative path that specifies the location of the content definition file.</p>
149    pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.content_location = input;
151        self
152    }
153    /// <p>The relative path that specifies the location of the content definition file.</p>
154    pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
155        &self.content_location
156    }
157    /// <p>The ARN of the scene.</p>
158    /// This field is required.
159    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    /// <p>The ARN of the scene.</p>
164    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.arn = input;
166        self
167    }
168    /// <p>The ARN of the scene.</p>
169    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
170        &self.arn
171    }
172    /// <p>The date and time when the scene was created.</p>
173    /// This field is required.
174    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    /// <p>The date and time when the scene was created.</p>
179    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    /// <p>The date and time when the scene was created.</p>
184    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
185        &self.creation_date_time
186    }
187    /// <p>The date and time when the scene was last updated.</p>
188    /// This field is required.
189    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    /// <p>The date and time when the scene was last updated.</p>
194    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    /// <p>The date and time when the scene was last updated.</p>
199    pub fn get_update_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
200        &self.update_date_time
201    }
202    /// <p>The description of the scene.</p>
203    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    /// <p>The description of the scene.</p>
208    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.description = input;
210        self
211    }
212    /// <p>The description of the scene.</p>
213    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
214        &self.description
215    }
216    /// Appends an item to `capabilities`.
217    ///
218    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
219    ///
220    /// <p>A list of capabilities that the scene uses to render.</p>
221    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    /// <p>A list of capabilities that the scene uses to render.</p>
228    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    /// <p>A list of capabilities that the scene uses to render.</p>
233    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
234        &self.capabilities
235    }
236    /// Adds a key-value pair to `scene_metadata`.
237    ///
238    /// To override the contents of this collection use [`set_scene_metadata`](Self::set_scene_metadata).
239    ///
240    /// <p>The response metadata.</p>
241    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    /// <p>The response metadata.</p>
252    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    /// <p>The response metadata.</p>
260    pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
261        &self.scene_metadata
262    }
263    /// Adds a key-value pair to `generated_scene_metadata`.
264    ///
265    /// To override the contents of this collection use [`set_generated_scene_metadata`](Self::set_generated_scene_metadata).
266    ///
267    /// <p>The generated scene metadata.</p>
268    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    /// <p>The generated scene metadata.</p>
279    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    /// <p>The generated scene metadata.</p>
287    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    /// <p>The SceneResponse error.</p>
291    pub fn error(mut self, input: crate::types::SceneError) -> Self {
292        self.error = ::std::option::Option::Some(input);
293        self
294    }
295    /// <p>The SceneResponse error.</p>
296    pub fn set_error(mut self, input: ::std::option::Option<crate::types::SceneError>) -> Self {
297        self.error = input;
298        self
299    }
300    /// <p>The SceneResponse error.</p>
301    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    /// Consumes the builder and constructs a [`GetSceneOutput`](crate::operation::get_scene::GetSceneOutput).
314    /// This method will fail if any of the following fields are not set:
315    /// - [`workspace_id`](crate::operation::get_scene::builders::GetSceneOutputBuilder::workspace_id)
316    /// - [`scene_id`](crate::operation::get_scene::builders::GetSceneOutputBuilder::scene_id)
317    /// - [`content_location`](crate::operation::get_scene::builders::GetSceneOutputBuilder::content_location)
318    /// - [`arn`](crate::operation::get_scene::builders::GetSceneOutputBuilder::arn)
319    /// - [`creation_date_time`](crate::operation::get_scene::builders::GetSceneOutputBuilder::creation_date_time)
320    /// - [`update_date_time`](crate::operation::get_scene::builders::GetSceneOutputBuilder::update_date_time)
321    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}