aws_sdk_workspacesweb/operation/create_user_settings/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_user_settings::_create_user_settings_output::CreateUserSettingsOutputBuilder;
3
4pub use crate::operation::create_user_settings::_create_user_settings_input::CreateUserSettingsInputBuilder;
5
6impl crate::operation::create_user_settings::builders::CreateUserSettingsInputBuilder {
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::create_user_settings::CreateUserSettingsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_user_settings::CreateUserSettingsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_user_settings();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateUserSettings`.
24///
25/// <p>Creates a user settings resource that can be associated with a web portal. Once associated with a web portal, user settings control how users can transfer data between a streaming session and the their local devices.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateUserSettingsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_user_settings::builders::CreateUserSettingsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_user_settings::CreateUserSettingsOutput,
35        crate::operation::create_user_settings::CreateUserSettingsError,
36    > for CreateUserSettingsFluentBuilder
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::create_user_settings::CreateUserSettingsOutput,
44            crate::operation::create_user_settings::CreateUserSettingsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateUserSettingsFluentBuilder {
51    /// Creates a new `CreateUserSettingsFluentBuilder`.
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 CreateUserSettings as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_user_settings::builders::CreateUserSettingsInputBuilder {
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::create_user_settings::CreateUserSettingsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_user_settings::CreateUserSettingsError,
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::create_user_settings::CreateUserSettings::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_user_settings::CreateUserSettings::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::create_user_settings::CreateUserSettingsOutput,
97        crate::operation::create_user_settings::CreateUserSettingsError,
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>Specifies whether the user can copy text from the streaming session to the local device.</p>
112    pub fn copy_allowed(mut self, input: crate::types::EnabledType) -> Self {
113        self.inner = self.inner.copy_allowed(input);
114        self
115    }
116    /// <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
117    pub fn set_copy_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
118        self.inner = self.inner.set_copy_allowed(input);
119        self
120    }
121    /// <p>Specifies whether the user can copy text from the streaming session to the local device.</p>
122    pub fn get_copy_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
123        self.inner.get_copy_allowed()
124    }
125    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
126    pub fn paste_allowed(mut self, input: crate::types::EnabledType) -> Self {
127        self.inner = self.inner.paste_allowed(input);
128        self
129    }
130    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
131    pub fn set_paste_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
132        self.inner = self.inner.set_paste_allowed(input);
133        self
134    }
135    /// <p>Specifies whether the user can paste text from the local device to the streaming session.</p>
136    pub fn get_paste_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
137        self.inner.get_paste_allowed()
138    }
139    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
140    pub fn download_allowed(mut self, input: crate::types::EnabledType) -> Self {
141        self.inner = self.inner.download_allowed(input);
142        self
143    }
144    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
145    pub fn set_download_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
146        self.inner = self.inner.set_download_allowed(input);
147        self
148    }
149    /// <p>Specifies whether the user can download files from the streaming session to the local device.</p>
150    pub fn get_download_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
151        self.inner.get_download_allowed()
152    }
153    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
154    pub fn upload_allowed(mut self, input: crate::types::EnabledType) -> Self {
155        self.inner = self.inner.upload_allowed(input);
156        self
157    }
158    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
159    pub fn set_upload_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
160        self.inner = self.inner.set_upload_allowed(input);
161        self
162    }
163    /// <p>Specifies whether the user can upload files from the local device to the streaming session.</p>
164    pub fn get_upload_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
165        self.inner.get_upload_allowed()
166    }
167    /// <p>Specifies whether the user can print to the local device.</p>
168    pub fn print_allowed(mut self, input: crate::types::EnabledType) -> Self {
169        self.inner = self.inner.print_allowed(input);
170        self
171    }
172    /// <p>Specifies whether the user can print to the local device.</p>
173    pub fn set_print_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
174        self.inner = self.inner.set_print_allowed(input);
175        self
176    }
177    /// <p>Specifies whether the user can print to the local device.</p>
178    pub fn get_print_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
179        self.inner.get_print_allowed()
180    }
181    ///
182    /// Appends an item to `tags`.
183    ///
184    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
185    ///
186    /// <p>The tags to add to the user settings resource. A tag is a key-value pair.</p>
187    pub fn tags(mut self, input: crate::types::Tag) -> Self {
188        self.inner = self.inner.tags(input);
189        self
190    }
191    /// <p>The tags to add to the user settings resource. A tag is a key-value pair.</p>
192    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
193        self.inner = self.inner.set_tags(input);
194        self
195    }
196    /// <p>The tags to add to the user settings resource. A tag is a key-value pair.</p>
197    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
198        self.inner.get_tags()
199    }
200    /// <p>The amount of time that a streaming session remains active after users disconnect.</p>
201    pub fn disconnect_timeout_in_minutes(mut self, input: i32) -> Self {
202        self.inner = self.inner.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 set_disconnect_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
207        self.inner = self.inner.set_disconnect_timeout_in_minutes(input);
208        self
209    }
210    /// <p>The amount of time that a streaming session remains active after users disconnect.</p>
211    pub fn get_disconnect_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
212        self.inner.get_disconnect_timeout_in_minutes()
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 idle_disconnect_timeout_in_minutes(mut self, input: i32) -> Self {
216        self.inner = self.inner.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 set_idle_disconnect_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
221        self.inner = self.inner.set_idle_disconnect_timeout_in_minutes(input);
222        self
223    }
224    /// <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>
225    pub fn get_idle_disconnect_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
226        self.inner.get_idle_disconnect_timeout_in_minutes()
227    }
228    /// <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 returns the result from the original successful request.</p>
229    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
230    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.inner = self.inner.client_token(input.into());
232        self
233    }
234    /// <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 returns the result from the original successful request.</p>
235    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
236    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237        self.inner = self.inner.set_client_token(input);
238        self
239    }
240    /// <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 returns the result from the original successful request.</p>
241    /// <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
242    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
243        self.inner.get_client_token()
244    }
245    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
246    pub fn cookie_synchronization_configuration(mut self, input: crate::types::CookieSynchronizationConfiguration) -> Self {
247        self.inner = self.inner.cookie_synchronization_configuration(input);
248        self
249    }
250    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
251    pub fn set_cookie_synchronization_configuration(
252        mut self,
253        input: ::std::option::Option<crate::types::CookieSynchronizationConfiguration>,
254    ) -> Self {
255        self.inner = self.inner.set_cookie_synchronization_configuration(input);
256        self
257    }
258    /// <p>The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.</p>
259    pub fn get_cookie_synchronization_configuration(&self) -> &::std::option::Option<crate::types::CookieSynchronizationConfiguration> {
260        self.inner.get_cookie_synchronization_configuration()
261    }
262    /// <p>The customer managed key used to encrypt sensitive information in the user settings.</p>
263    pub fn customer_managed_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.inner = self.inner.customer_managed_key(input.into());
265        self
266    }
267    /// <p>The customer managed key used to encrypt sensitive information in the user settings.</p>
268    pub fn set_customer_managed_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.inner = self.inner.set_customer_managed_key(input);
270        self
271    }
272    /// <p>The customer managed key used to encrypt sensitive information in the user settings.</p>
273    pub fn get_customer_managed_key(&self) -> &::std::option::Option<::std::string::String> {
274        self.inner.get_customer_managed_key()
275    }
276    ///
277    /// Adds a key-value pair to `additionalEncryptionContext`.
278    ///
279    /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
280    ///
281    /// <p>The additional encryption context of the user settings.</p>
282    pub fn additional_encryption_context(
283        mut self,
284        k: impl ::std::convert::Into<::std::string::String>,
285        v: impl ::std::convert::Into<::std::string::String>,
286    ) -> Self {
287        self.inner = self.inner.additional_encryption_context(k.into(), v.into());
288        self
289    }
290    /// <p>The additional encryption context of the user settings.</p>
291    pub fn set_additional_encryption_context(
292        mut self,
293        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
294    ) -> Self {
295        self.inner = self.inner.set_additional_encryption_context(input);
296        self
297    }
298    /// <p>The additional encryption context of the user settings.</p>
299    pub fn get_additional_encryption_context(
300        &self,
301    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
302        self.inner.get_additional_encryption_context()
303    }
304    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
305    pub fn deep_link_allowed(mut self, input: crate::types::EnabledType) -> Self {
306        self.inner = self.inner.deep_link_allowed(input);
307        self
308    }
309    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
310    pub fn set_deep_link_allowed(mut self, input: ::std::option::Option<crate::types::EnabledType>) -> Self {
311        self.inner = self.inner.set_deep_link_allowed(input);
312        self
313    }
314    /// <p>Specifies whether the user can use deep links that open automatically when connecting to a session.</p>
315    pub fn get_deep_link_allowed(&self) -> &::std::option::Option<crate::types::EnabledType> {
316        self.inner.get_deep_link_allowed()
317    }
318    /// <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>
319    pub fn toolbar_configuration(mut self, input: crate::types::ToolbarConfiguration) -> Self {
320        self.inner = self.inner.toolbar_configuration(input);
321        self
322    }
323    /// <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>
324    pub fn set_toolbar_configuration(mut self, input: ::std::option::Option<crate::types::ToolbarConfiguration>) -> Self {
325        self.inner = self.inner.set_toolbar_configuration(input);
326        self
327    }
328    /// <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>
329    pub fn get_toolbar_configuration(&self) -> &::std::option::Option<crate::types::ToolbarConfiguration> {
330        self.inner.get_toolbar_configuration()
331    }
332}