aws_sdk_iottwinmaker/operation/update_scene/
_update_scene_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 UpdateSceneInput {
6    /// <p>The ID of the workspace that contains the scene.</p>
7    pub workspace_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the scene.</p>
9    pub scene_id: ::std::option::Option<::std::string::String>,
10    /// <p>The relative path that specifies the location of the content definition file.</p>
11    pub content_location: ::std::option::Option<::std::string::String>,
12    /// <p>The description of this scene.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>A list of capabilities that the scene uses to render.</p>
15    pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The scene metadata.</p>
17    pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18}
19impl UpdateSceneInput {
20    /// <p>The ID of the workspace that contains the scene.</p>
21    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
22        self.workspace_id.as_deref()
23    }
24    /// <p>The ID of the scene.</p>
25    pub fn scene_id(&self) -> ::std::option::Option<&str> {
26        self.scene_id.as_deref()
27    }
28    /// <p>The relative path that specifies the location of the content definition file.</p>
29    pub fn content_location(&self) -> ::std::option::Option<&str> {
30        self.content_location.as_deref()
31    }
32    /// <p>The description of this scene.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>A list of capabilities that the scene uses to render.</p>
37    ///
38    /// 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()`.
39    pub fn capabilities(&self) -> &[::std::string::String] {
40        self.capabilities.as_deref().unwrap_or_default()
41    }
42    /// <p>The scene metadata.</p>
43    pub fn scene_metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44        self.scene_metadata.as_ref()
45    }
46}
47impl UpdateSceneInput {
48    /// Creates a new builder-style object to manufacture [`UpdateSceneInput`](crate::operation::update_scene::UpdateSceneInput).
49    pub fn builder() -> crate::operation::update_scene::builders::UpdateSceneInputBuilder {
50        crate::operation::update_scene::builders::UpdateSceneInputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateSceneInput`](crate::operation::update_scene::UpdateSceneInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateSceneInputBuilder {
58    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
59    pub(crate) scene_id: ::std::option::Option<::std::string::String>,
60    pub(crate) content_location: ::std::option::Option<::std::string::String>,
61    pub(crate) description: ::std::option::Option<::std::string::String>,
62    pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
63    pub(crate) scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
64}
65impl UpdateSceneInputBuilder {
66    /// <p>The ID of the workspace that contains the scene.</p>
67    /// This field is required.
68    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.workspace_id = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The ID of the workspace that contains the scene.</p>
73    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.workspace_id = input;
75        self
76    }
77    /// <p>The ID of the workspace that contains the scene.</p>
78    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.workspace_id
80    }
81    /// <p>The ID of the scene.</p>
82    /// This field is required.
83    pub fn scene_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.scene_id = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The ID of the scene.</p>
88    pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.scene_id = input;
90        self
91    }
92    /// <p>The ID of the scene.</p>
93    pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
94        &self.scene_id
95    }
96    /// <p>The relative path that specifies the location of the content definition file.</p>
97    pub fn content_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.content_location = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The relative path that specifies the location of the content definition file.</p>
102    pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.content_location = input;
104        self
105    }
106    /// <p>The relative path that specifies the location of the content definition file.</p>
107    pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
108        &self.content_location
109    }
110    /// <p>The description of this scene.</p>
111    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.description = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The description of this scene.</p>
116    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.description = input;
118        self
119    }
120    /// <p>The description of this scene.</p>
121    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
122        &self.description
123    }
124    /// Appends an item to `capabilities`.
125    ///
126    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
127    ///
128    /// <p>A list of capabilities that the scene uses to render.</p>
129    pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        let mut v = self.capabilities.unwrap_or_default();
131        v.push(input.into());
132        self.capabilities = ::std::option::Option::Some(v);
133        self
134    }
135    /// <p>A list of capabilities that the scene uses to render.</p>
136    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
137        self.capabilities = input;
138        self
139    }
140    /// <p>A list of capabilities that the scene uses to render.</p>
141    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
142        &self.capabilities
143    }
144    /// Adds a key-value pair to `scene_metadata`.
145    ///
146    /// To override the contents of this collection use [`set_scene_metadata`](Self::set_scene_metadata).
147    ///
148    /// <p>The scene metadata.</p>
149    pub fn scene_metadata(
150        mut self,
151        k: impl ::std::convert::Into<::std::string::String>,
152        v: impl ::std::convert::Into<::std::string::String>,
153    ) -> Self {
154        let mut hash_map = self.scene_metadata.unwrap_or_default();
155        hash_map.insert(k.into(), v.into());
156        self.scene_metadata = ::std::option::Option::Some(hash_map);
157        self
158    }
159    /// <p>The scene metadata.</p>
160    pub fn set_scene_metadata(
161        mut self,
162        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
163    ) -> Self {
164        self.scene_metadata = input;
165        self
166    }
167    /// <p>The scene metadata.</p>
168    pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
169        &self.scene_metadata
170    }
171    /// Consumes the builder and constructs a [`UpdateSceneInput`](crate::operation::update_scene::UpdateSceneInput).
172    pub fn build(self) -> ::std::result::Result<crate::operation::update_scene::UpdateSceneInput, ::aws_smithy_types::error::operation::BuildError> {
173        ::std::result::Result::Ok(crate::operation::update_scene::UpdateSceneInput {
174            workspace_id: self.workspace_id,
175            scene_id: self.scene_id,
176            content_location: self.content_location,
177            description: self.description,
178            capabilities: self.capabilities,
179            scene_metadata: self.scene_metadata,
180        })
181    }
182}