Skip to main content

aws_sdk_workspaces/operation/update_workspaces_pool/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_workspaces_pool::_update_workspaces_pool_input::UpdateWorkspacesPoolInputBuilder;
3
4pub use crate::operation::update_workspaces_pool::_update_workspaces_pool_output::UpdateWorkspacesPoolOutputBuilder;
5
6impl crate::operation::update_workspaces_pool::builders::UpdateWorkspacesPoolInputBuilder {
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_workspaces_pool::UpdateWorkspacesPoolOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_workspaces_pool::UpdateWorkspacesPoolError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_workspaces_pool();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateWorkspacesPool`.
24///
25/// <note>
26/// <p>End of support notice: On December 31, 2027, Amazon Web Services will end support for Amazon WorkSpaces Pools. After December 31, 2027, you will no longer be able to access the Amazon WorkSpaces Pools console or Amazon WorkSpaces Pools resources. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/wsp-pools-end-of-support.html">Amazon WorkSpaces Pools end of support</a>.</p>
27/// </note>
28/// <p>Updates the specified pool.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateWorkspacesPoolFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::update_workspaces_pool::builders::UpdateWorkspacesPoolInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::update_workspaces_pool::UpdateWorkspacesPoolOutput,
38        crate::operation::update_workspaces_pool::UpdateWorkspacesPoolError,
39    > for UpdateWorkspacesPoolFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::update_workspaces_pool::UpdateWorkspacesPoolOutput,
47            crate::operation::update_workspaces_pool::UpdateWorkspacesPoolError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl UpdateWorkspacesPoolFluentBuilder {
54    /// Creates a new `UpdateWorkspacesPoolFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the UpdateWorkspacesPool as a reference.
63    pub fn as_input(&self) -> &crate::operation::update_workspaces_pool::builders::UpdateWorkspacesPoolInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::update_workspaces_pool::UpdateWorkspacesPoolOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::update_workspaces_pool::UpdateWorkspacesPoolError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::update_workspaces_pool::UpdateWorkspacesPool::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::update_workspaces_pool::UpdateWorkspacesPool::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::update_workspaces_pool::UpdateWorkspacesPoolOutput,
100        crate::operation::update_workspaces_pool::UpdateWorkspacesPoolError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>The identifier of the specified pool to update.</p>
115    pub fn pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.inner = self.inner.pool_id(input.into());
117        self
118    }
119    /// <p>The identifier of the specified pool to update.</p>
120    pub fn set_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.inner = self.inner.set_pool_id(input);
122        self
123    }
124    /// <p>The identifier of the specified pool to update.</p>
125    pub fn get_pool_id(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_pool_id()
127    }
128    /// <p>Describes the specified pool to update.</p>
129    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.description(input.into());
131        self
132    }
133    /// <p>Describes the specified pool to update.</p>
134    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_description(input);
136        self
137    }
138    /// <p>Describes the specified pool to update.</p>
139    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_description()
141    }
142    /// <p>The identifier of the bundle.</p>
143    pub fn bundle_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.inner = self.inner.bundle_id(input.into());
145        self
146    }
147    /// <p>The identifier of the bundle.</p>
148    pub fn set_bundle_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.inner = self.inner.set_bundle_id(input);
150        self
151    }
152    /// <p>The identifier of the bundle.</p>
153    pub fn get_bundle_id(&self) -> &::std::option::Option<::std::string::String> {
154        self.inner.get_bundle_id()
155    }
156    /// <p>The identifier of the directory.</p>
157    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.inner = self.inner.directory_id(input.into());
159        self
160    }
161    /// <p>The identifier of the directory.</p>
162    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.inner = self.inner.set_directory_id(input);
164        self
165    }
166    /// <p>The identifier of the directory.</p>
167    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
168        self.inner.get_directory_id()
169    }
170    /// <p>The desired capacity for the pool.</p>
171    pub fn capacity(mut self, input: crate::types::Capacity) -> Self {
172        self.inner = self.inner.capacity(input);
173        self
174    }
175    /// <p>The desired capacity for the pool.</p>
176    pub fn set_capacity(mut self, input: ::std::option::Option<crate::types::Capacity>) -> Self {
177        self.inner = self.inner.set_capacity(input);
178        self
179    }
180    /// <p>The desired capacity for the pool.</p>
181    pub fn get_capacity(&self) -> &::std::option::Option<crate::types::Capacity> {
182        self.inner.get_capacity()
183    }
184    /// <p>The persistent application settings for users in the pool.</p>
185    pub fn application_settings(mut self, input: crate::types::ApplicationSettingsRequest) -> Self {
186        self.inner = self.inner.application_settings(input);
187        self
188    }
189    /// <p>The persistent application settings for users in the pool.</p>
190    pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettingsRequest>) -> Self {
191        self.inner = self.inner.set_application_settings(input);
192        self
193    }
194    /// <p>The persistent application settings for users in the pool.</p>
195    pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettingsRequest> {
196        self.inner.get_application_settings()
197    }
198    /// <p>Indicates the timeout settings of the specified pool.</p>
199    pub fn timeout_settings(mut self, input: crate::types::TimeoutSettings) -> Self {
200        self.inner = self.inner.timeout_settings(input);
201        self
202    }
203    /// <p>Indicates the timeout settings of the specified pool.</p>
204    pub fn set_timeout_settings(mut self, input: ::std::option::Option<crate::types::TimeoutSettings>) -> Self {
205        self.inner = self.inner.set_timeout_settings(input);
206        self
207    }
208    /// <p>Indicates the timeout settings of the specified pool.</p>
209    pub fn get_timeout_settings(&self) -> &::std::option::Option<crate::types::TimeoutSettings> {
210        self.inner.get_timeout_settings()
211    }
212    /// <p>The desired running mode for the pool. The running mode can only be updated when the pool is in a stopped state.</p>
213    pub fn running_mode(mut self, input: crate::types::PoolsRunningMode) -> Self {
214        self.inner = self.inner.running_mode(input);
215        self
216    }
217    /// <p>The desired running mode for the pool. The running mode can only be updated when the pool is in a stopped state.</p>
218    pub fn set_running_mode(mut self, input: ::std::option::Option<crate::types::PoolsRunningMode>) -> Self {
219        self.inner = self.inner.set_running_mode(input);
220        self
221    }
222    /// <p>The desired running mode for the pool. The running mode can only be updated when the pool is in a stopped state.</p>
223    pub fn get_running_mode(&self) -> &::std::option::Option<crate::types::PoolsRunningMode> {
224        self.inner.get_running_mode()
225    }
226}