aws_sdk_iottwinmaker/operation/create_scene/
_create_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 CreateSceneInput {
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 for this scene.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>A list of capabilities that the scene uses to render itself.</p>
15    pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>Metadata that you can use to manage the scene.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The request metadata.</p>
19    pub scene_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateSceneInput {
22    /// <p>The ID of the workspace that contains the scene.</p>
23    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
24        self.workspace_id.as_deref()
25    }
26    /// <p>The ID of the scene.</p>
27    pub fn scene_id(&self) -> ::std::option::Option<&str> {
28        self.scene_id.as_deref()
29    }
30    /// <p>The relative path that specifies the location of the content definition file.</p>
31    pub fn content_location(&self) -> ::std::option::Option<&str> {
32        self.content_location.as_deref()
33    }
34    /// <p>The description for this scene.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>A list of capabilities that the scene uses to render itself.</p>
39    ///
40    /// 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()`.
41    pub fn capabilities(&self) -> &[::std::string::String] {
42        self.capabilities.as_deref().unwrap_or_default()
43    }
44    /// <p>Metadata that you can use to manage the scene.</p>
45    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46        self.tags.as_ref()
47    }
48    /// <p>The request metadata.</p>
49    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    /// Creates a new builder-style object to manufacture [`CreateSceneInput`](crate::operation::create_scene::CreateSceneInput).
55    pub fn builder() -> crate::operation::create_scene::builders::CreateSceneInputBuilder {
56        crate::operation::create_scene::builders::CreateSceneInputBuilder::default()
57    }
58}
59
60/// A builder for [`CreateSceneInput`](crate::operation::create_scene::CreateSceneInput).
61#[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    /// <p>The ID of the workspace that contains the scene.</p>
74    /// This field is required.
75    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    /// <p>The ID of the workspace that contains the scene.</p>
80    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.workspace_id = input;
82        self
83    }
84    /// <p>The ID of the workspace that contains the scene.</p>
85    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.workspace_id
87    }
88    /// <p>The ID of the scene.</p>
89    /// This field is required.
90    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    /// <p>The ID of the scene.</p>
95    pub fn set_scene_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.scene_id = input;
97        self
98    }
99    /// <p>The ID of the scene.</p>
100    pub fn get_scene_id(&self) -> &::std::option::Option<::std::string::String> {
101        &self.scene_id
102    }
103    /// <p>The relative path that specifies the location of the content definition file.</p>
104    /// This field is required.
105    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    /// <p>The relative path that specifies the location of the content definition file.</p>
110    pub fn set_content_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.content_location = input;
112        self
113    }
114    /// <p>The relative path that specifies the location of the content definition file.</p>
115    pub fn get_content_location(&self) -> &::std::option::Option<::std::string::String> {
116        &self.content_location
117    }
118    /// <p>The description for this scene.</p>
119    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    /// <p>The description for this scene.</p>
124    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.description = input;
126        self
127    }
128    /// <p>The description for this scene.</p>
129    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
130        &self.description
131    }
132    /// Appends an item to `capabilities`.
133    ///
134    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
135    ///
136    /// <p>A list of capabilities that the scene uses to render itself.</p>
137    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    /// <p>A list of capabilities that the scene uses to render itself.</p>
144    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    /// <p>A list of capabilities that the scene uses to render itself.</p>
149    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
150        &self.capabilities
151    }
152    /// Adds a key-value pair to `tags`.
153    ///
154    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
155    ///
156    /// <p>Metadata that you can use to manage the scene.</p>
157    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    /// <p>Metadata that you can use to manage the scene.</p>
164    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    /// <p>Metadata that you can use to manage the scene.</p>
169    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
170        &self.tags
171    }
172    /// Adds a key-value pair to `scene_metadata`.
173    ///
174    /// To override the contents of this collection use [`set_scene_metadata`](Self::set_scene_metadata).
175    ///
176    /// <p>The request metadata.</p>
177    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    /// <p>The request metadata.</p>
188    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    /// <p>The request metadata.</p>
196    pub fn get_scene_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
197        &self.scene_metadata
198    }
199    /// Consumes the builder and constructs a [`CreateSceneInput`](crate::operation::create_scene::CreateSceneInput).
200    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}