aws_sdk_appstream/operation/update_stack/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_stack::_update_stack_output::UpdateStackOutputBuilder;
3
4pub use crate::operation::update_stack::_update_stack_input::UpdateStackInputBuilder;
5
6impl crate::operation::update_stack::builders::UpdateStackInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_stack::UpdateStackOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_stack::UpdateStackError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_stack();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateStack`.
24///
25/// <p>Updates the specified fields for the specified stack.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateStackFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_stack::builders::UpdateStackInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_stack::UpdateStackOutput,
35        crate::operation::update_stack::UpdateStackError,
36    > for UpdateStackFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::update_stack::UpdateStackOutput,
44            crate::operation::update_stack::UpdateStackError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateStackFluentBuilder {
51    /// Creates a new `UpdateStackFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the UpdateStack as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_stack::builders::UpdateStackInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_stack::UpdateStackOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_stack::UpdateStackError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_stack::UpdateStack::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_stack::UpdateStack::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_stack::UpdateStackOutput,
97        crate::operation::update_stack::UpdateStackError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The stack name to display.</p>
112    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.display_name(input.into());
114        self
115    }
116    /// <p>The stack name to display.</p>
117    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_display_name(input);
119        self
120    }
121    /// <p>The stack name to display.</p>
122    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_display_name()
124    }
125    /// <p>The description to display.</p>
126    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.description(input.into());
128        self
129    }
130    /// <p>The description to display.</p>
131    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_description(input);
133        self
134    }
135    /// <p>The description to display.</p>
136    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_description()
138    }
139    /// <p>The name of the stack.</p>
140    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.name(input.into());
142        self
143    }
144    /// <p>The name of the stack.</p>
145    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_name(input);
147        self
148    }
149    /// <p>The name of the stack.</p>
150    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_name()
152    }
153    ///
154    /// Appends an item to `StorageConnectors`.
155    ///
156    /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
157    ///
158    /// <p>The storage connectors to enable.</p>
159    pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
160        self.inner = self.inner.storage_connectors(input);
161        self
162    }
163    /// <p>The storage connectors to enable.</p>
164    pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
165        self.inner = self.inner.set_storage_connectors(input);
166        self
167    }
168    /// <p>The storage connectors to enable.</p>
169    pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
170        self.inner.get_storage_connectors()
171    }
172    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
173    #[deprecated]
174    pub fn delete_storage_connectors(mut self, input: bool) -> Self {
175        self.inner = self.inner.delete_storage_connectors(input);
176        self
177    }
178    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
179    #[deprecated]
180    pub fn set_delete_storage_connectors(mut self, input: ::std::option::Option<bool>) -> Self {
181        self.inner = self.inner.set_delete_storage_connectors(input);
182        self
183    }
184    /// <p>Deletes the storage connectors currently enabled for the stack.</p>
185    #[deprecated]
186    pub fn get_delete_storage_connectors(&self) -> &::std::option::Option<bool> {
187        self.inner.get_delete_storage_connectors()
188    }
189    /// <p>The URL that users are redirected to after their streaming session ends.</p>
190    pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.inner = self.inner.redirect_url(input.into());
192        self
193    }
194    /// <p>The URL that users are redirected to after their streaming session ends.</p>
195    pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.inner = self.inner.set_redirect_url(input);
197        self
198    }
199    /// <p>The URL that users are redirected to after their streaming session ends.</p>
200    pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
201        self.inner.get_redirect_url()
202    }
203    /// <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>
204    pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.inner = self.inner.feedback_url(input.into());
206        self
207    }
208    /// <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>
209    pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.inner = self.inner.set_feedback_url(input);
211        self
212    }
213    /// <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>
214    pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
215        self.inner.get_feedback_url()
216    }
217    ///
218    /// Appends an item to `AttributesToDelete`.
219    ///
220    /// To override the contents of this collection use [`set_attributes_to_delete`](Self::set_attributes_to_delete).
221    ///
222    /// <p>The stack attributes to delete.</p>
223    pub fn attributes_to_delete(mut self, input: crate::types::StackAttribute) -> Self {
224        self.inner = self.inner.attributes_to_delete(input);
225        self
226    }
227    /// <p>The stack attributes to delete.</p>
228    pub fn set_attributes_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>>) -> Self {
229        self.inner = self.inner.set_attributes_to_delete(input);
230        self
231    }
232    /// <p>The stack attributes to delete.</p>
233    pub fn get_attributes_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StackAttribute>> {
234        self.inner.get_attributes_to_delete()
235    }
236    ///
237    /// Appends an item to `UserSettings`.
238    ///
239    /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
240    ///
241    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
242    pub fn user_settings(mut self, input: crate::types::UserSetting) -> Self {
243        self.inner = self.inner.user_settings(input);
244        self
245    }
246    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
247    pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
248        self.inner = self.inner.set_user_settings(input);
249        self
250    }
251    /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
252    pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
253        self.inner.get_user_settings()
254    }
255    /// <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>
256    pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
257        self.inner = self.inner.application_settings(input);
258        self
259    }
260    /// <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>
261    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
262        self.inner = self.inner.set_application_settings(input);
263        self
264    }
265    /// <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>
266    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
267        self.inner.get_application_settings()
268    }
269    ///
270    /// Appends an item to `AccessEndpoints`.
271    ///
272    /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
273    ///
274    /// <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>
275    pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
276        self.inner = self.inner.access_endpoints(input);
277        self
278    }
279    /// <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>
280    pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
281        self.inner = self.inner.set_access_endpoints(input);
282        self
283    }
284    /// <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>
285    pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
286        self.inner.get_access_endpoints()
287    }
288    ///
289    /// Appends an item to `EmbedHostDomains`.
290    ///
291    /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
292    ///
293    /// <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>
294    pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
295        self.inner = self.inner.embed_host_domains(input.into());
296        self
297    }
298    /// <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>
299    pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
300        self.inner = self.inner.set_embed_host_domains(input);
301        self
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 get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
305        self.inner.get_embed_host_domains()
306    }
307    /// <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>
308    pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
309        self.inner = self.inner.streaming_experience_settings(input);
310        self
311    }
312    /// <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>
313    pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
314        self.inner = self.inner.set_streaming_experience_settings(input);
315        self
316    }
317    /// <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>
318    pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
319        self.inner.get_streaming_experience_settings()
320    }
321}