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