aws_sdk_workspacesweb/operation/update_user_settings/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_user_settings::_update_user_settings_output::UpdateUserSettingsOutputBuilder;
3
4pub use crate::operation::update_user_settings::_update_user_settings_input::UpdateUserSettingsInputBuilder;
5
6impl crate::operation::update_user_settings::builders::UpdateUserSettingsInputBuilder {
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_user_settings::UpdateUserSettingsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_user_settings::UpdateUserSettingsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_user_settings();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateUserSettings`.
24///
25/// <p>Updates the user settings.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateUserSettingsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_user_settings::builders::UpdateUserSettingsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_user_settings::UpdateUserSettingsOutput,
35        crate::operation::update_user_settings::UpdateUserSettingsError,
36    > for UpdateUserSettingsFluentBuilder
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_user_settings::UpdateUserSettingsOutput,
44            crate::operation::update_user_settings::UpdateUserSettingsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateUserSettingsFluentBuilder {
51    /// Creates a new `UpdateUserSettingsFluentBuilder`.
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 UpdateUserSettings as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_user_settings::builders::UpdateUserSettingsInputBuilder {
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_user_settings::UpdateUserSettingsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_user_settings::UpdateUserSettingsError,
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_user_settings::UpdateUserSettings::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_user_settings::UpdateUserSettings::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_user_settings::UpdateUserSettingsOutput,
97        crate::operation::update_user_settings::UpdateUserSettingsError,
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 ARN of the user settings.</p>
112    pub fn user_settings_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.user_settings_arn(input.into());
114        self
115    }
116    /// <p>The ARN of the user settings.</p>
117    pub fn set_user_settings_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_user_settings_arn(input);
119        self
120    }
121    /// <p>The ARN of the user settings.</p>
122    pub fn get_user_settings_arn(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_user_settings_arn()
124    }
125    /// <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
126    pub fn copy_allowed(mut self, input: crate::types::EnabledType) -> Self {
127        self.inner = self.inner.copy_allowed(input);
128        self
129    }
130    /// <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
131    pub fn set_copy_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
132        self.inner = self.inner.set_copy_allowed(input);
133        self
134    }
135    /// <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
136    pub fn get_copy_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
137        self.inner.get_copy_allowed()
138    }
139    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
140    pub fn paste_allowed(mut self, input: crate::types::EnabledType) -> Self {
141        self.inner = self.inner.paste_allowed(input);
142        self
143    }
144    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
145    pub fn set_paste_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
146        self.inner = self.inner.set_paste_allowed(input);
147        self
148    }
149    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
150    pub fn get_paste_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
151        self.inner.get_paste_allowed()
152    }
153    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
154    pub fn download_allowed(mut self, input: crate::types::EnabledType) -> Self {
155        self.inner = self.inner.download_allowed(input);
156        self
157    }
158    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
159    pub fn set_download_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
160        self.inner = self.inner.set_download_allowed(input);
161        self
162    }
163    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
164    pub fn get_download_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
165        self.inner.get_download_allowed()
166    }
167    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
168    pub fn upload_allowed(mut self, input: crate::types::EnabledType) -> Self {
169        self.inner = self.inner.upload_allowed(input);
170        self
171    }
172    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
173    pub fn set_upload_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
174        self.inner = self.inner.set_upload_allowed(input);
175        self
176    }
177    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
178    pub fn get_upload_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
179        self.inner.get_upload_allowed()
180    }
181    /// <p>Specifies whether the user can print to the local device.</p>
182    pub fn print_allowed(mut self, input: crate::types::EnabledType) -> Self {
183        self.inner = self.inner.print_allowed(input);
184        self
185    }
186    /// <p>Specifies whether the user can print to the local device.</p>
187    pub fn set_print_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
188        self.inner = self.inner.set_print_allowed(input);
189        self
190    }
191    /// <p>Specifies whether the user can print to the local device.</p>
192    pub fn get_print_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
193        self.inner.get_print_allowed()
194    }
195    /// <p>The amount of time that a streaming session remains active after users disconnect.</p>
196    pub fn disconnect_timeout_in_minutes(mut self, input: i32) -> Self {
197        self.inner = self.inner.disconnect_timeout_in_minutes(input);
198        self
199    }
200    /// <p>The amount of time that a streaming session remains active after users disconnect.</p>
201    pub fn set_disconnect_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
202        self.inner = self.inner.set_disconnect_timeout_in_minutes(input);
203        self
204    }
205    /// <p>The amount of time that a streaming session remains active after users disconnect.</p>
206    pub fn get_disconnect_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
207        self.inner.get_disconnect_timeout_in_minutes()
208    }
209    /// <p>The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.</p>
210    pub fn idle_disconnect_timeout_in_minutes(mut self, input: i32) -> Self {
211        self.inner = self.inner.idle_disconnect_timeout_in_minutes(input);
212        self
213    }
214    /// <p>The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.</p>
215    pub fn set_idle_disconnect_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
216        self.inner = self.inner.set_idle_disconnect_timeout_in_minutes(input);
217        self
218    }
219    /// <p>The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.</p>
220    pub fn get_idle_disconnect_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
221        self.inner.get_idle_disconnect_timeout_in_minutes()
222    }
223    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.</p>
224    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
225    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226        self.inner = self.inner.client_token(input.into());
227        self
228    }
229    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.</p>
230    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
231    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.inner = self.inner.set_client_token(input);
233        self
234    }
235    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.</p>
236    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
237    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
238        self.inner.get_client_token()
239    }
240    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
241    /// <p>If the allowlist and blocklist are empty, the configuration becomes null.</p>
242    pub fn cookie_synchronization_configuration(mut self, input: crate::types::CookieSynchronizationConfiguration) -> Self {
243        self.inner = self.inner.cookie_synchronization_configuration(input);
244        self
245    }
246    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
247    /// <p>If the allowlist and blocklist are empty, the configuration becomes null.</p>
248    pub fn set_cookie_synchronization_configuration(
249        mut self,
250        input: ::std::option::Option<crate::types::CookieSynchronizationConfiguration>,
251    ) -> Self {
252        self.inner = self.inner.set_cookie_synchronization_configuration(input);
253        self
254    }
255    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
256    /// <p>If the allowlist and blocklist are empty, the configuration becomes null.</p>
257    pub fn get_cookie_synchronization_configuration(&self) -> &::std::option::Option<crate::types::CookieSynchronizationConfiguration> {
258        self.inner.get_cookie_synchronization_configuration()
259    }
260    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
261    pub fn deep_link_allowed(mut self, input: crate::types::EnabledType) -> Self {
262        self.inner = self.inner.deep_link_allowed(input);
263        self
264    }
265    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
266    pub fn set_deep_link_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
267        self.inner = self.inner.set_deep_link_allowed(input);
268        self
269    }
270    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
271    pub fn get_deep_link_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
272        self.inner.get_deep_link_allowed()
273    }
274    /// <p>The configuration of the toolbar. This allows administrators to select the toolbar type and visual mode, set maximum display resolution for sessions, and choose which items are visible to end users during their sessions. If administrators do not modify these settings, end users retain control over their toolbar preferences.</p>
275    pub fn toolbar_configuration(mut self, input: crate::types::ToolbarConfiguration) -> Self {
276        self.inner = self.inner.toolbar_configuration(input);
277        self
278    }
279    /// <p>The configuration of the toolbar. This allows administrators to select the toolbar type and visual mode, set maximum display resolution for sessions, and choose which items are visible to end users during their sessions. If administrators do not modify these settings, end users retain control over their toolbar preferences.</p>
280    pub fn set_toolbar_configuration(mut self, input: ::std::option::Option<crate::types::ToolbarConfiguration>) -> Self {
281        self.inner = self.inner.set_toolbar_configuration(input);
282        self
283    }
284    /// <p>The configuration of the toolbar. This allows administrators to select the toolbar type and visual mode, set maximum display resolution for sessions, and choose which items are visible to end users during their sessions. If administrators do not modify these settings, end users retain control over their toolbar preferences.</p>
285    pub fn get_toolbar_configuration(&self) -> &::std::option::Option<crate::types::ToolbarConfiguration> {
286        self.inner.get_toolbar_configuration()
287    }
288}