aws_sdk_iottwinmaker/operation/create_scene/
_create_scene_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateSceneInput {
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 tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18 pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateSceneInput {
22 pub fn workspace_id(&self) -> ::std::option::Option<&str> {
24 self.workspace_id.as_deref()
25 }
26 pub fn scene_id(&self) -> ::std::option::Option<&str> {
28 self.scene_id.as_deref()
29 }
30 pub fn content_location(&self) -> ::std::option::Option<&str> {
32 self.content_location.as_deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 pub fn capabilities(&self) -> &[::std::string::String] {
42 self.capabilities.as_deref().unwrap_or_default()
43 }
44 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46 self.tags.as_ref()
47 }
48 pub fn scene_metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
50 self.scene_metadata.as_ref()
51 }
52}
53impl CreateSceneInput {
54 pub fn builder() -> crate::operation::create_scene::builders::CreateSceneInputBuilder {
56 crate::operation::create_scene::builders::CreateSceneInputBuilder::default()
57 }
58}
59
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct CreateSceneInputBuilder {
64 pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
65 pub(crate) scene_id: ::std::option::Option<::std::string::String>,
66 pub(crate) content_location: ::std::option::Option<::std::string::String>,
67 pub(crate) description: ::std::option::Option<::std::string::String>,
68 pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
69 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
70 pub(crate) scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
71}
72impl CreateSceneInputBuilder {
73 pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.workspace_id = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.workspace_id = input;
82 self
83 }
84 pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
86 &self.workspace_id
87 }
88 pub fn scene_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.scene_id = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.scene_id = input;
97 self
98 }
99 pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
101 &self.scene_id
102 }
103 pub fn content_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.content_location = ::std::option::Option::Some(input.into());
107 self
108 }
109 pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.content_location = input;
112 self
113 }
114 pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
116 &self.content_location
117 }
118 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.description = ::std::option::Option::Some(input.into());
121 self
122 }
123 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.description = input;
126 self
127 }
128 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
130 &self.description
131 }
132 pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 let mut v = self.capabilities.unwrap_or_default();
139 v.push(input.into());
140 self.capabilities = ::std::option::Option::Some(v);
141 self
142 }
143 pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
145 self.capabilities = input;
146 self
147 }
148 pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
150 &self.capabilities
151 }
152 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
158 let mut hash_map = self.tags.unwrap_or_default();
159 hash_map.insert(k.into(), v.into());
160 self.tags = ::std::option::Option::Some(hash_map);
161 self
162 }
163 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
165 self.tags = input;
166 self
167 }
168 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
170 &self.tags
171 }
172 pub fn scene_metadata(
178 mut self,
179 k: impl ::std::convert::Into<::std::string::String>,
180 v: impl ::std::convert::Into<::std::string::String>,
181 ) -> Self {
182 let mut hash_map = self.scene_metadata.unwrap_or_default();
183 hash_map.insert(k.into(), v.into());
184 self.scene_metadata = ::std::option::Option::Some(hash_map);
185 self
186 }
187 pub fn set_scene_metadata(
189 mut self,
190 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
191 ) -> Self {
192 self.scene_metadata = input;
193 self
194 }
195 pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
197 &self.scene_metadata
198 }
199 pub fn build(self) -> ::std::result::Result<crate::operation::create_scene::CreateSceneInput, ::aws_smithy_types::error::operation::BuildError> {
201 ::std::result::Result::Ok(crate::operation::create_scene::CreateSceneInput {
202 workspace_id: self.workspace_id,
203 scene_id: self.scene_id,
204 content_location: self.content_location,
205 description: self.description,
206 capabilities: self.capabilities,
207 tags: self.tags,
208 scene_metadata: self.scene_metadata,
209 })
210 }
211}