// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_file_system::_update_file_system_input::UpdateFileSystemInputBuilder;
pub use crate::operation::update_file_system::_update_file_system_output::UpdateFileSystemOutputBuilder;
impl crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::update_file_system::UpdateFileSystemOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_file_system::UpdateFileSystemError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.update_file_system();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `UpdateFileSystem`.
///
/// <p>Updates the throughput mode or the amount of provisioned throughput of an existing file system.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateFileSystemFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::update_file_system::UpdateFileSystemOutput,
crate::operation::update_file_system::UpdateFileSystemError,
> for UpdateFileSystemFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::update_file_system::UpdateFileSystemOutput,
crate::operation::update_file_system::UpdateFileSystemError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl UpdateFileSystemFluentBuilder {
/// Creates a new `UpdateFileSystemFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the UpdateFileSystem as a reference.
pub fn as_input(&self) -> &crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::update_file_system::UpdateFileSystemOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_file_system::UpdateFileSystemError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::update_file_system::UpdateFileSystem::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::update_file_system::UpdateFileSystem::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::update_file_system::UpdateFileSystemOutput,
crate::operation::update_file_system::UpdateFileSystemError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The ID of the file system that you want to update.</p>
pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.file_system_id(input.into());
self
}
/// <p>The ID of the file system that you want to update.</p>
pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_file_system_id(input);
self
}
/// <p>The ID of the file system that you want to update.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_file_system_id()
}
/// <p>(Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>.</p>
pub fn throughput_mode(mut self, input: crate::types::ThroughputMode) -> Self {
self.inner = self.inner.throughput_mode(input);
self
}
/// <p>(Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>.</p>
pub fn set_throughput_mode(mut self, input: ::std::option::Option<crate::types::ThroughputMode>) -> Self {
self.inner = self.inner.set_throughput_mode(input);
self
}
/// <p>(Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>.</p>
pub fn get_throughput_mode(&self) -> &::std::option::Option<crate::types::ThroughputMode> {
self.inner.get_throughput_mode()
}
/// <p>(Optional) The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web ServicesSupport. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn provisioned_throughput_in_mibps(mut self, input: f64) -> Self {
self.inner = self.inner.provisioned_throughput_in_mibps(input);
self
}
/// <p>(Optional) The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web ServicesSupport. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn set_provisioned_throughput_in_mibps(mut self, input: ::std::option::Option<f64>) -> Self {
self.inner = self.inner.set_provisioned_throughput_in_mibps(input);
self
}
/// <p>(Optional) The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web ServicesSupport. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn get_provisioned_throughput_in_mibps(&self) -> &::std::option::Option<f64> {
self.inner.get_provisioned_throughput_in_mibps()
}
}