aws-sdk-efs 1.85.0

AWS SDK for Amazon Elastic File System
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFileSystemInput {
    /// <p>The ID of the file system that you want to update.</p>
    pub file_system_id: ::std::option::Option<::std::string::String>,
    /// <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 throughput_mode: ::std::option::Option<crate::types::ThroughputMode>,
    /// <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 provisioned_throughput_in_mibps: ::std::option::Option<f64>,
}
impl UpdateFileSystemInput {
    /// <p>The ID of the file system that you want to update.</p>
    pub fn file_system_id(&self) -> ::std::option::Option<&str> {
        self.file_system_id.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&crate::types::ThroughputMode> {
        self.throughput_mode.as_ref()
    }
    /// <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(&self) -> ::std::option::Option<f64> {
        self.provisioned_throughput_in_mibps
    }
}
impl UpdateFileSystemInput {
    /// Creates a new builder-style object to manufacture [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
    pub fn builder() -> crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
        crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder::default()
    }
}

/// A builder for [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFileSystemInputBuilder {
    pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
    pub(crate) throughput_mode: ::std::option::Option<crate::types::ThroughputMode>,
    pub(crate) provisioned_throughput_in_mibps: ::std::option::Option<f64>,
}
impl UpdateFileSystemInputBuilder {
    /// <p>The ID of the file system that you want to update.</p>
    /// This field is required.
    pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_system_id = ::std::option::Option::Some(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.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.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.throughput_mode = ::std::option::Option::Some(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.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.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.provisioned_throughput_in_mibps = ::std::option::Option::Some(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.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.provisioned_throughput_in_mibps
    }
    /// Consumes the builder and constructs a [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_file_system::UpdateFileSystemInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_file_system::UpdateFileSystemInput {
            file_system_id: self.file_system_id,
            throughput_mode: self.throughput_mode,
            provisioned_throughput_in_mibps: self.provisioned_throughput_in_mibps,
        })
    }
}