Skip to main content

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 WorkSpaces Applications 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 WorkSpaces Applications only through the specified endpoints.</p>
29    pub access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
30    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications 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    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
35    pub content_redirection: ::std::option::Option<crate::types::ContentRedirection>,
36}
37impl CreateStackInput {
38    /// <p>The name of the stack.</p>
39    pub fn name(&self) -> ::std::option::Option<&str> {
40        self.name.as_deref()
41    }
42    /// <p>The description to display.</p>
43    pub fn description(&self) -> ::std::option::Option<&str> {
44        self.description.as_deref()
45    }
46    /// <p>The stack name to display.</p>
47    pub fn display_name(&self) -> ::std::option::Option<&str> {
48        self.display_name.as_deref()
49    }
50    /// <p>The storage connectors to enable.</p>
51    ///
52    /// 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()`.
53    pub fn storage_connectors(&self) -> &[crate::types::StorageConnector] {
54        self.storage_connectors.as_deref().unwrap_or_default()
55    }
56    /// <p>The URL that users are redirected to after their streaming session ends.</p>
57    pub fn redirect_url(&self) -> ::std::option::Option<&str> {
58        self.redirect_url.as_deref()
59    }
60    /// <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>
61    pub fn feedback_url(&self) -> ::std::option::Option<&str> {
62        self.feedback_url.as_deref()
63    }
64    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
65    ///
66    /// 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()`.
67    pub fn user_settings(&self) -> &[crate::types::UserSetting] {
68        self.user_settings.as_deref().unwrap_or_default()
69    }
70    /// <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>
71    pub fn application_settings(&self) -> ::std::option::Option<&crate::types::ApplicationSettings> {
72        self.application_settings.as_ref()
73    }
74    /// <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>
75    /// <p>If you do not specify a value, the value is set to an empty string.</p>
76    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
77    /// <p>_ . : / = + \ - @</p>
78    /// <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 WorkSpaces Applications Administration Guide</i>.</p>
79    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
80        self.tags.as_ref()
81    }
82    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
83    ///
84    /// 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()`.
85    pub fn access_endpoints(&self) -> &[crate::types::AccessEndpoint] {
86        self.access_endpoints.as_deref().unwrap_or_default()
87    }
88    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
89    ///
90    /// 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()`.
91    pub fn embed_host_domains(&self) -> &[::std::string::String] {
92        self.embed_host_domains.as_deref().unwrap_or_default()
93    }
94    /// <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>
95    pub fn streaming_experience_settings(&self) -> ::std::option::Option<&crate::types::StreamingExperienceSettings> {
96        self.streaming_experience_settings.as_ref()
97    }
98    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
99    pub fn content_redirection(&self) -> ::std::option::Option<&crate::types::ContentRedirection> {
100        self.content_redirection.as_ref()
101    }
102}
103impl CreateStackInput {
104    /// Creates a new builder-style object to manufacture [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
105    pub fn builder() -> crate::operation::create_stack::builders::CreateStackInputBuilder {
106        crate::operation::create_stack::builders::CreateStackInputBuilder::default()
107    }
108}
109
110/// A builder for [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
112#[non_exhaustive]
113pub struct CreateStackInputBuilder {
114    pub(crate) name: ::std::option::Option<::std::string::String>,
115    pub(crate) description: ::std::option::Option<::std::string::String>,
116    pub(crate) display_name: ::std::option::Option<::std::string::String>,
117    pub(crate) storage_connectors: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>,
118    pub(crate) redirect_url: ::std::option::Option<::std::string::String>,
119    pub(crate) feedback_url: ::std::option::Option<::std::string::String>,
120    pub(crate) user_settings: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>,
121    pub(crate) application_settings: ::std::option::Option<crate::types::ApplicationSettings>,
122    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
123    pub(crate) access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
124    pub(crate) embed_host_domains: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
125    pub(crate) streaming_experience_settings: ::std::option::Option<crate::types::StreamingExperienceSettings>,
126    pub(crate) content_redirection: ::std::option::Option<crate::types::ContentRedirection>,
127}
128impl CreateStackInputBuilder {
129    /// <p>The name of the stack.</p>
130    /// This field is required.
131    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.name = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>The name of the stack.</p>
136    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.name = input;
138        self
139    }
140    /// <p>The name of the stack.</p>
141    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142        &self.name
143    }
144    /// <p>The description to display.</p>
145    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.description = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The description to display.</p>
150    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.description = input;
152        self
153    }
154    /// <p>The description to display.</p>
155    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156        &self.description
157    }
158    /// <p>The stack name to display.</p>
159    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.display_name = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The stack name to display.</p>
164    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.display_name = input;
166        self
167    }
168    /// <p>The stack name to display.</p>
169    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
170        &self.display_name
171    }
172    /// Appends an item to `storage_connectors`.
173    ///
174    /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
175    ///
176    /// <p>The storage connectors to enable.</p>
177    pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
178        let mut v = self.storage_connectors.unwrap_or_default();
179        v.push(input);
180        self.storage_connectors = ::std::option::Option::Some(v);
181        self
182    }
183    /// <p>The storage connectors to enable.</p>
184    pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
185        self.storage_connectors = input;
186        self
187    }
188    /// <p>The storage connectors to enable.</p>
189    pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
190        &self.storage_connectors
191    }
192    /// <p>The URL that users are redirected to after their streaming session ends.</p>
193    pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.redirect_url = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// <p>The URL that users are redirected to after their streaming session ends.</p>
198    pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.redirect_url = input;
200        self
201    }
202    /// <p>The URL that users are redirected to after their streaming session ends.</p>
203    pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
204        &self.redirect_url
205    }
206    /// <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>
207    pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.feedback_url = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <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>
212    pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.feedback_url = input;
214        self
215    }
216    /// <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>
217    pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
218        &self.feedback_url
219    }
220    /// Appends an item to `user_settings`.
221    ///
222    /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
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 user_settings(mut self, input: crate::types::UserSetting) -> Self {
226        let mut v = self.user_settings.unwrap_or_default();
227        v.push(input);
228        self.user_settings = ::std::option::Option::Some(v);
229        self
230    }
231    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
232    pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
233        self.user_settings = input;
234        self
235    }
236    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
237    pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
238        &self.user_settings
239    }
240    /// <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>
241    pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
242        self.application_settings = ::std::option::Option::Some(input);
243        self
244    }
245    /// <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>
246    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
247        self.application_settings = input;
248        self
249    }
250    /// <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>
251    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
252        &self.application_settings
253    }
254    /// Adds a key-value pair to `tags`.
255    ///
256    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
257    ///
258    /// <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>
259    /// <p>If you do not specify a value, the value is set to an empty string.</p>
260    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
261    /// <p>_ . : / = + \ - @</p>
262    /// <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 WorkSpaces Applications Administration Guide</i>.</p>
263    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
264        let mut hash_map = self.tags.unwrap_or_default();
265        hash_map.insert(k.into(), v.into());
266        self.tags = ::std::option::Option::Some(hash_map);
267        self
268    }
269    /// <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>
270    /// <p>If you do not specify a value, the value is set to an empty string.</p>
271    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
272    /// <p>_ . : / = + \ - @</p>
273    /// <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 WorkSpaces Applications Administration Guide</i>.</p>
274    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
275        self.tags = input;
276        self
277    }
278    /// <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>
279    /// <p>If you do not specify a value, the value is set to an empty string.</p>
280    /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
281    /// <p>_ . : / = + \ - @</p>
282    /// <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 WorkSpaces Applications Administration Guide</i>.</p>
283    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
284        &self.tags
285    }
286    /// Appends an item to `access_endpoints`.
287    ///
288    /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
289    ///
290    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
291    pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
292        let mut v = self.access_endpoints.unwrap_or_default();
293        v.push(input);
294        self.access_endpoints = ::std::option::Option::Some(v);
295        self
296    }
297    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
298    pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
299        self.access_endpoints = input;
300        self
301    }
302    /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to WorkSpaces Applications only through the specified endpoints.</p>
303    pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
304        &self.access_endpoints
305    }
306    /// Appends an item to `embed_host_domains`.
307    ///
308    /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
309    ///
310    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
311    pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312        let mut v = self.embed_host_domains.unwrap_or_default();
313        v.push(input.into());
314        self.embed_host_domains = ::std::option::Option::Some(v);
315        self
316    }
317    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
318    pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
319        self.embed_host_domains = input;
320        self
321    }
322    /// <p>The domains where WorkSpaces Applications streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded WorkSpaces Applications streaming sessions.</p>
323    pub fn get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
324        &self.embed_host_domains
325    }
326    /// <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>
327    pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
328        self.streaming_experience_settings = ::std::option::Option::Some(input);
329        self
330    }
331    /// <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>
332    pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
333        self.streaming_experience_settings = input;
334        self
335    }
336    /// <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>
337    pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
338        &self.streaming_experience_settings
339    }
340    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
341    pub fn content_redirection(mut self, input: crate::types::ContentRedirection) -> Self {
342        self.content_redirection = ::std::option::Option::Some(input);
343        self
344    }
345    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
346    pub fn set_content_redirection(mut self, input: ::std::option::Option<crate::types::ContentRedirection>) -> Self {
347        self.content_redirection = input;
348        self
349    }
350    /// <p>Configuration for bidirectional URL redirection between the streaming session and the local client. Use HostToClient to redirect URLs from the remote desktop to the local browser.</p>
351    pub fn get_content_redirection(&self) -> &::std::option::Option<crate::types::ContentRedirection> {
352        &self.content_redirection
353    }
354    /// Consumes the builder and constructs a [`CreateStackInput`](crate::operation::create_stack::CreateStackInput).
355    pub fn build(self) -> ::std::result::Result<crate::operation::create_stack::CreateStackInput, ::aws_smithy_types::error::operation::BuildError> {
356        ::std::result::Result::Ok(crate::operation::create_stack::CreateStackInput {
357            name: self.name,
358            description: self.description,
359            display_name: self.display_name,
360            storage_connectors: self.storage_connectors,
361            redirect_url: self.redirect_url,
362            feedback_url: self.feedback_url,
363            user_settings: self.user_settings,
364            application_settings: self.application_settings,
365            tags: self.tags,
366            access_endpoints: self.access_endpoints,
367            embed_host_domains: self.embed_host_domains,
368            streaming_experience_settings: self.streaming_experience_settings,
369            content_redirection: self.content_redirection,
370        })
371    }
372}