aws_sdk_iottwinmaker/operation/update_scene/
_update_scene_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateSceneInput {
6 pub workspace_id: ::std::option::Option<::std::string::String>,
8 pub scene_id: ::std::option::Option<::std::string::String>,
10 pub content_location: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16 pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18}
19impl UpdateSceneInput {
20 pub fn workspace_id(&self) -> ::std::option::Option<&str> {
22 self.workspace_id.as_deref()
23 }
24 pub fn scene_id(&self) -> ::std::option::Option<&str> {
26 self.scene_id.as_deref()
27 }
28 pub fn content_location(&self) -> ::std::option::Option<&str> {
30 self.content_location.as_deref()
31 }
32 pub fn description(&self) -> ::std::option::Option<&str> {
34 self.description.as_deref()
35 }
36 pub fn capabilities(&self) -> &[::std::string::String] {
40 self.capabilities.as_deref().unwrap_or_default()
41 }
42 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 pub fn builder() -> crate::operation::update_scene::builders::UpdateSceneInputBuilder {
50 crate::operation::update_scene::builders::UpdateSceneInputBuilder::default()
51 }
52}
53
54#[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 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 pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.workspace_id = input;
75 self
76 }
77 pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.workspace_id
80 }
81 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 pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.scene_id = input;
90 self
91 }
92 pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
94 &self.scene_id
95 }
96 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 pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.content_location = input;
104 self
105 }
106 pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
108 &self.content_location
109 }
110 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117 self.description = input;
118 self
119 }
120 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
122 &self.description
123 }
124 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 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 pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
142 &self.capabilities
143 }
144 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 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 pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
169 &self.scene_metadata
170 }
171 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}