aws_sdk_appstream/operation/create_stack/
_create_stack_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 CreateStackInput {
6    /// <p>The name of the stack.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The description to display.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The stack name to display.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The storage connectors to enable.</p>
13    pub storage_connectors: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>,
14    /// <p>The URL that users are redirected to after their streaming session ends.</p>
15    pub redirect_url: ::std::option::Option<::std::string::String>,
16    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
17    pub feedback_url: ::std::option::Option<::std::string::String>,
18    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
19    pub user_settings: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>,
20    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
21    pub application_settings: ::std::option::Option<crate::types::ApplicationSettings>,
22    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
23    /// <p>If you do not specify a value, the value is set to an empty string.</p>
24    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
25    /// <p>_ . : / = + \ - @</p>
26    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
27    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
29    pub access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
30    /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
31    pub embed_host_domains: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
33    pub streaming_experience_settings: ::std::option::Option<crate::types::StreamingExperienceSettings>,
34}
35impl CreateStackInput {
36    /// <p>The name of the stack.</p>
37    pub fn name(&self) -> ::std::option::Option<&str> {
38        self.name.as_deref()
39    }
40    /// <p>The description to display.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44    /// <p>The stack name to display.</p>
45    pub fn display_name(&self) -> ::std::option::Option<&str> {
46        self.display_name.as_deref()
47    }
48    /// <p>The storage connectors to enable.</p>
49    ///
50    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.storage_connectors.is_none()`.
51    pub fn storage_connectors(&self) -> &[crate::types::StorageConnector] {
52        self.storage_connectors.as_deref().unwrap_or_default()
53    }
54    /// <p>The URL that users are redirected to after their streaming session ends.</p>
55    pub fn redirect_url(&self) -> ::std::option::Option<&str> {
56        self.redirect_url.as_deref()
57    }
58    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
59    pub fn feedback_url(&self) -> ::std::option::Option<&str> {
60        self.feedback_url.as_deref()
61    }
62    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
63    ///
64    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_settings.is_none()`.
65    pub fn user_settings(&self) -> &[crate::types::UserSetting] {
66        self.user_settings.as_deref().unwrap_or_default()
67    }
68    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
69    pub fn application_settings(&self) -> ::std::option::Option<&crate::types::ApplicationSettings> {
70        self.application_settings.as_ref()
71    }
72    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
73    /// <p>If you do not specify a value, the value is set to an empty string.</p>
74    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
75    /// <p>_ . : / = + \ - @</p>
76    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
77    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
78        self.tags.as_ref()
79    }
80    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
81    ///
82    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.access_endpoints.is_none()`.
83    pub fn access_endpoints(&self) -> &[crate::types::AccessEndpoint] {
84        self.access_endpoints.as_deref().unwrap_or_default()
85    }
86    /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
87    ///
88    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.embed_host_domains.is_none()`.
89    pub fn embed_host_domains(&self) -> &[::std::string::String] {
90        self.embed_host_domains.as_deref().unwrap_or_default()
91    }
92    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
93    pub fn streaming_experience_settings(&self) -> ::std::option::Option<&crate::types::StreamingExperienceSettings> {
94        self.streaming_experience_settings.as_ref()
95    }
96}
97impl CreateStackInput {
98    /// Creates a new builder-style object to manufacture [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
99    pub fn builder() -> crate::operation::create_stack::builders::CreateStackInputBuilder {
100        crate::operation::create_stack::builders::CreateStackInputBuilder::default()
101    }
102}
103
104/// A builder for [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
105#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct CreateStackInputBuilder {
108    pub(crate) name: ::std::option::Option<::std::string::String>,
109    pub(crate) description: ::std::option::Option<::std::string::String>,
110    pub(crate) display_name: ::std::option::Option<::std::string::String>,
111    pub(crate) storage_connectors: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>,
112    pub(crate) redirect_url: ::std::option::Option<::std::string::String>,
113    pub(crate) feedback_url: ::std::option::Option<::std::string::String>,
114    pub(crate) user_settings: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>,
115    pub(crate) application_settings: ::std::option::Option<crate::types::ApplicationSettings>,
116    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
117    pub(crate) access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
118    pub(crate) embed_host_domains: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
119    pub(crate) streaming_experience_settings: ::std::option::Option<crate::types::StreamingExperienceSettings>,
120}
121impl CreateStackInputBuilder {
122    /// <p>The name of the stack.</p>
123    /// This field is required.
124    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.name = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The name of the stack.</p>
129    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.name = input;
131        self
132    }
133    /// <p>The name of the stack.</p>
134    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
135        &self.name
136    }
137    /// <p>The description to display.</p>
138    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.description = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>The description to display.</p>
143    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.description = input;
145        self
146    }
147    /// <p>The description to display.</p>
148    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
149        &self.description
150    }
151    /// <p>The stack name to display.</p>
152    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.display_name = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The stack name to display.</p>
157    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.display_name = input;
159        self
160    }
161    /// <p>The stack name to display.</p>
162    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
163        &self.display_name
164    }
165    /// Appends an item to `storage_connectors`.
166    ///
167    /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
168    ///
169    /// <p>The storage connectors to enable.</p>
170    pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
171        let mut v = self.storage_connectors.unwrap_or_default();
172        v.push(input);
173        self.storage_connectors = ::std::option::Option::Some(v);
174        self
175    }
176    /// <p>The storage connectors to enable.</p>
177    pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
178        self.storage_connectors = input;
179        self
180    }
181    /// <p>The storage connectors to enable.</p>
182    pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
183        &self.storage_connectors
184    }
185    /// <p>The URL that users are redirected to after their streaming session ends.</p>
186    pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.redirect_url = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The URL that users are redirected to after their streaming session ends.</p>
191    pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.redirect_url = input;
193        self
194    }
195    /// <p>The URL that users are redirected to after their streaming session ends.</p>
196    pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
197        &self.redirect_url
198    }
199    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
200    pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.feedback_url = ::std::option::Option::Some(input.into());
202        self
203    }
204    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
205    pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.feedback_url = input;
207        self
208    }
209    /// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
210    pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
211        &self.feedback_url
212    }
213    /// Appends an item to `user_settings`.
214    ///
215    /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
216    ///
217    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
218    pub fn user_settings(mut self, input: crate::types::UserSetting) -> Self {
219        let mut v = self.user_settings.unwrap_or_default();
220        v.push(input);
221        self.user_settings = ::std::option::Option::Some(v);
222        self
223    }
224    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
225    pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
226        self.user_settings = input;
227        self
228    }
229    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
230    pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
231        &self.user_settings
232    }
233    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
234    pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
235        self.application_settings = ::std::option::Option::Some(input);
236        self
237    }
238    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
239    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
240        self.application_settings = input;
241        self
242    }
243    /// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
244    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
245        &self.application_settings
246    }
247    /// Adds a key-value pair to `tags`.
248    ///
249    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
250    ///
251    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
252    /// <p>If you do not specify a value, the value is set to an empty string.</p>
253    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
254    /// <p>_ . : / = + \ - @</p>
255    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
256    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
257        let mut hash_map = self.tags.unwrap_or_default();
258        hash_map.insert(k.into(), v.into());
259        self.tags = ::std::option::Option::Some(hash_map);
260        self
261    }
262    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
263    /// <p>If you do not specify a value, the value is set to an empty string.</p>
264    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
265    /// <p>_ . : / = + \ - @</p>
266    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
267    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
268        self.tags = input;
269        self
270    }
271    /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
272    /// <p>If you do not specify a value, the value is set to an empty string.</p>
273    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
274    /// <p>_ . : / = + \ - @</p>
275    /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
276    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
277        &self.tags
278    }
279    /// Appends an item to `access_endpoints`.
280    ///
281    /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
282    ///
283    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
284    pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
285        let mut v = self.access_endpoints.unwrap_or_default();
286        v.push(input);
287        self.access_endpoints = ::std::option::Option::Some(v);
288        self
289    }
290    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
291    pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
292        self.access_endpoints = input;
293        self
294    }
295    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
296    pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
297        &self.access_endpoints
298    }
299    /// Appends an item to `embed_host_domains`.
300    ///
301    /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
302    ///
303    /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
304    pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305        let mut v = self.embed_host_domains.unwrap_or_default();
306        v.push(input.into());
307        self.embed_host_domains = ::std::option::Option::Some(v);
308        self
309    }
310    /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
311    pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
312        self.embed_host_domains = input;
313        self
314    }
315    /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
316    pub fn get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
317        &self.embed_host_domains
318    }
319    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
320    pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
321        self.streaming_experience_settings = ::std::option::Option::Some(input);
322        self
323    }
324    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
325    pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
326        self.streaming_experience_settings = input;
327        self
328    }
329    /// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
330    pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
331        &self.streaming_experience_settings
332    }
333    /// Consumes the builder and constructs a [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
334    pub fn build(self) -> ::std::result::Result<crate::operation::create_stack::CreateStackInput, ::aws_smithy_types::error::operation::BuildError> {
335        ::std::result::Result::Ok(crate::operation::create_stack::CreateStackInput {
336            name: self.name,
337            description: self.description,
338            display_name: self.display_name,
339            storage_connectors: self.storage_connectors,
340            redirect_url: self.redirect_url,
341            feedback_url: self.feedback_url,
342            user_settings: self.user_settings,
343            application_settings: self.application_settings,
344            tags: self.tags,
345            access_endpoints: self.access_endpoints,
346            embed_host_domains: self.embed_host_domains,
347            streaming_experience_settings: self.streaming_experience_settings,
348        })
349    }
350}