Skip to main content

aws_sdk_appstream/operation/update_stack/
_update_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 UpdateStackInput {
6    /// <p>The stack name to display.</p>
7    pub display_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 name of the stack.</p>
11    pub 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>Deletes the storage connectors currently enabled for the stack.</p>
15    #[deprecated]
16    pub delete_storage_connectors: ::std::option::Option<bool>,
17    /// <p>The URL that users are redirected to after their streaming session ends.</p>
18    pub redirect_url: ::std::option::Option<::std::string::String>,
19    /// <p>The URL that users are redirected to after they choose the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
20    pub feedback_url: ::std::option::Option<::std::string::String>,
21    /// <p>The stack attributes to delete.</p>
22    pub attributes_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>>,
23    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
24    pub user_settings: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>,
25    /// <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>
26    pub application_settings: ::std::option::Option<crate::types::ApplicationSettings>,
27    /// <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>
28    pub access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
29    /// <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>
30    pub embed_host_domains: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
31    /// <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>
32    pub streaming_experience_settings: ::std::option::Option<crate::types::StreamingExperienceSettings>,
33    /// <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>
34    pub content_redirection: ::std::option::Option<crate::types::ContentRedirection>,
35}
36impl UpdateStackInput {
37    /// <p>The stack name to display.</p>
38    pub fn display_name(&self) -> ::std::option::Option<&str> {
39        self.display_name.as_deref()
40    }
41    /// <p>The description to display.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The name of the stack.</p>
46    pub fn name(&self) -> ::std::option::Option<&str> {
47        self.name.as_deref()
48    }
49    /// <p>The storage connectors to enable.</p>
50    ///
51    /// 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()`.
52    pub fn storage_connectors(&self) -> &[crate::types::StorageConnector] {
53        self.storage_connectors.as_deref().unwrap_or_default()
54    }
55    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
56    #[deprecated]
57    pub fn delete_storage_connectors(&self) -> ::std::option::Option<bool> {
58        self.delete_storage_connectors
59    }
60    /// <p>The URL that users are redirected to after their streaming session ends.</p>
61    pub fn redirect_url(&self) -> ::std::option::Option<&str> {
62        self.redirect_url.as_deref()
63    }
64    /// <p>The URL that users are redirected to after they choose the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
65    pub fn feedback_url(&self) -> ::std::option::Option<&str> {
66        self.feedback_url.as_deref()
67    }
68    /// <p>The stack attributes to delete.</p>
69    ///
70    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes_to_delete.is_none()`.
71    pub fn attributes_to_delete(&self) -> &[crate::types::StackAttribute] {
72        self.attributes_to_delete.as_deref().unwrap_or_default()
73    }
74    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
75    ///
76    /// 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()`.
77    pub fn user_settings(&self) -> &[crate::types::UserSetting] {
78        self.user_settings.as_deref().unwrap_or_default()
79    }
80    /// <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>
81    pub fn application_settings(&self) -> ::std::option::Option<&crate::types::ApplicationSettings> {
82        self.application_settings.as_ref()
83    }
84    /// <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>
85    ///
86    /// 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()`.
87    pub fn access_endpoints(&self) -> &[crate::types::AccessEndpoint] {
88        self.access_endpoints.as_deref().unwrap_or_default()
89    }
90    /// <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>
91    ///
92    /// 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()`.
93    pub fn embed_host_domains(&self) -> &[::std::string::String] {
94        self.embed_host_domains.as_deref().unwrap_or_default()
95    }
96    /// <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>
97    pub fn streaming_experience_settings(&self) -> ::std::option::Option<&crate::types::StreamingExperienceSettings> {
98        self.streaming_experience_settings.as_ref()
99    }
100    /// <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>
101    pub fn content_redirection(&self) -> ::std::option::Option<&crate::types::ContentRedirection> {
102        self.content_redirection.as_ref()
103    }
104}
105impl UpdateStackInput {
106    /// Creates a new builder-style object to manufacture [`UpdateStackInput`](crate::operation::update_stack::UpdateStackInput).
107    pub fn builder() -> crate::operation::update_stack::builders::UpdateStackInputBuilder {
108        crate::operation::update_stack::builders::UpdateStackInputBuilder::default()
109    }
110}
111
112/// A builder for [`UpdateStackInput`](crate::operation::update_stack::UpdateStackInput).
113#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
114#[non_exhaustive]
115pub struct UpdateStackInputBuilder {
116    pub(crate) display_name: ::std::option::Option<::std::string::String>,
117    pub(crate) description: ::std::option::Option<::std::string::String>,
118    pub(crate) name: ::std::option::Option<::std::string::String>,
119    pub(crate) storage_connectors: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>,
120    pub(crate) delete_storage_connectors: ::std::option::Option<bool>,
121    pub(crate) redirect_url: ::std::option::Option<::std::string::String>,
122    pub(crate) feedback_url: ::std::option::Option<::std::string::String>,
123    pub(crate) attributes_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>>,
124    pub(crate) user_settings: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>,
125    pub(crate) application_settings: ::std::option::Option<crate::types::ApplicationSettings>,
126    pub(crate) access_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>,
127    pub(crate) embed_host_domains: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
128    pub(crate) streaming_experience_settings: ::std::option::Option<crate::types::StreamingExperienceSettings>,
129    pub(crate) content_redirection: ::std::option::Option<crate::types::ContentRedirection>,
130}
131impl UpdateStackInputBuilder {
132    /// <p>The stack name to display.</p>
133    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.display_name = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>The stack name to display.</p>
138    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.display_name = input;
140        self
141    }
142    /// <p>The stack name to display.</p>
143    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
144        &self.display_name
145    }
146    /// <p>The description to display.</p>
147    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.description = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The description to display.</p>
152    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.description = input;
154        self
155    }
156    /// <p>The description to display.</p>
157    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
158        &self.description
159    }
160    /// <p>The name of the stack.</p>
161    /// This field is required.
162    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.name = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>The name of the stack.</p>
167    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.name = input;
169        self
170    }
171    /// <p>The name of the stack.</p>
172    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
173        &self.name
174    }
175    /// Appends an item to `storage_connectors`.
176    ///
177    /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
178    ///
179    /// <p>The storage connectors to enable.</p>
180    pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
181        let mut v = self.storage_connectors.unwrap_or_default();
182        v.push(input);
183        self.storage_connectors = ::std::option::Option::Some(v);
184        self
185    }
186    /// <p>The storage connectors to enable.</p>
187    pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
188        self.storage_connectors = input;
189        self
190    }
191    /// <p>The storage connectors to enable.</p>
192    pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
193        &self.storage_connectors
194    }
195    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
196    #[deprecated]
197    pub fn delete_storage_connectors(mut self, input: bool) -> Self {
198        self.delete_storage_connectors = ::std::option::Option::Some(input);
199        self
200    }
201    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
202    #[deprecated]
203    pub fn set_delete_storage_connectors(mut self, input: ::std::option::Option<bool>) -> Self {
204        self.delete_storage_connectors = input;
205        self
206    }
207    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
208    #[deprecated]
209    pub fn get_delete_storage_connectors(&self) -> &::std::option::Option<bool> {
210        &self.delete_storage_connectors
211    }
212    /// <p>The URL that users are redirected to after their streaming session ends.</p>
213    pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.redirect_url = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>The URL that users are redirected to after their streaming session ends.</p>
218    pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.redirect_url = input;
220        self
221    }
222    /// <p>The URL that users are redirected to after their streaming session ends.</p>
223    pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
224        &self.redirect_url
225    }
226    /// <p>The URL that users are redirected to after they choose the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
227    pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.feedback_url = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The URL that users are redirected to after they choose the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
232    pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.feedback_url = input;
234        self
235    }
236    /// <p>The URL that users are redirected to after they choose the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
237    pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
238        &self.feedback_url
239    }
240    /// Appends an item to `attributes_to_delete`.
241    ///
242    /// To override the contents of this collection use [`set_attributes_to_delete`](Self::set_attributes_to_delete).
243    ///
244    /// <p>The stack attributes to delete.</p>
245    pub fn attributes_to_delete(mut self, input: crate::types::StackAttribute) -> Self {
246        let mut v = self.attributes_to_delete.unwrap_or_default();
247        v.push(input);
248        self.attributes_to_delete = ::std::option::Option::Some(v);
249        self
250    }
251    /// <p>The stack attributes to delete.</p>
252    pub fn set_attributes_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>>) -> Self {
253        self.attributes_to_delete = input;
254        self
255    }
256    /// <p>The stack attributes to delete.</p>
257    pub fn get_attributes_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>> {
258        &self.attributes_to_delete
259    }
260    /// Appends an item to `user_settings`.
261    ///
262    /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
263    ///
264    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
265    pub fn user_settings(mut self, input: crate::types::UserSetting) -> Self {
266        let mut v = self.user_settings.unwrap_or_default();
267        v.push(input);
268        self.user_settings = ::std::option::Option::Some(v);
269        self
270    }
271    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
272    pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
273        self.user_settings = input;
274        self
275    }
276    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
277    pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
278        &self.user_settings
279    }
280    /// <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>
281    pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
282        self.application_settings = ::std::option::Option::Some(input);
283        self
284    }
285    /// <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>
286    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
287        self.application_settings = input;
288        self
289    }
290    /// <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>
291    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
292        &self.application_settings
293    }
294    /// Appends an item to `access_endpoints`.
295    ///
296    /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
297    ///
298    /// <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>
299    pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
300        let mut v = self.access_endpoints.unwrap_or_default();
301        v.push(input);
302        self.access_endpoints = ::std::option::Option::Some(v);
303        self
304    }
305    /// <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>
306    pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
307        self.access_endpoints = input;
308        self
309    }
310    /// <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>
311    pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
312        &self.access_endpoints
313    }
314    /// Appends an item to `embed_host_domains`.
315    ///
316    /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
317    ///
318    /// <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>
319    pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320        let mut v = self.embed_host_domains.unwrap_or_default();
321        v.push(input.into());
322        self.embed_host_domains = ::std::option::Option::Some(v);
323        self
324    }
325    /// <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>
326    pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
327        self.embed_host_domains = input;
328        self
329    }
330    /// <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>
331    pub fn get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
332        &self.embed_host_domains
333    }
334    /// <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>
335    pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
336        self.streaming_experience_settings = ::std::option::Option::Some(input);
337        self
338    }
339    /// <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>
340    pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
341        self.streaming_experience_settings = input;
342        self
343    }
344    /// <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>
345    pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
346        &self.streaming_experience_settings
347    }
348    /// <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>
349    pub fn content_redirection(mut self, input: crate::types::ContentRedirection) -> Self {
350        self.content_redirection = ::std::option::Option::Some(input);
351        self
352    }
353    /// <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>
354    pub fn set_content_redirection(mut self, input: ::std::option::Option<crate::types::ContentRedirection>) -> Self {
355        self.content_redirection = input;
356        self
357    }
358    /// <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>
359    pub fn get_content_redirection(&self) -> &::std::option::Option<crate::types::ContentRedirection> {
360        &self.content_redirection
361    }
362    /// Consumes the builder and constructs a [`UpdateStackInput`](crate::operation::update_stack::UpdateStackInput).
363    pub fn build(self) -> ::std::result::Result<crate::operation::update_stack::UpdateStackInput, ::aws_smithy_types::error::operation::BuildError> {
364        ::std::result::Result::Ok(crate::operation::update_stack::UpdateStackInput {
365            display_name: self.display_name,
366            description: self.description,
367            name: self.name,
368            storage_connectors: self.storage_connectors,
369            delete_storage_connectors: self.delete_storage_connectors,
370            redirect_url: self.redirect_url,
371            feedback_url: self.feedback_url,
372            attributes_to_delete: self.attributes_to_delete,
373            user_settings: self.user_settings,
374            application_settings: self.application_settings,
375            access_endpoints: self.access_endpoints,
376            embed_host_domains: self.embed_host_domains,
377            streaming_experience_settings: self.streaming_experience_settings,
378            content_redirection: self.content_redirection,
379        })
380    }
381}