aws_sdk_efs/operation/update_file_system/_update_file_system_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateFileSystemInput {
6 /// <p>The ID of the file system that you want to update.</p>
7 pub file_system_id: ::std::option::Option<::std::string::String>,
8 /// <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>
9 pub throughput_mode: ::std::option::Option<crate::types::ThroughputMode>,
10 /// <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>
11 pub provisioned_throughput_in_mibps: ::std::option::Option<f64>,
12}
13impl UpdateFileSystemInput {
14 /// <p>The ID of the file system that you want to update.</p>
15 pub fn file_system_id(&self) -> ::std::option::Option<&str> {
16 self.file_system_id.as_deref()
17 }
18 /// <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>
19 pub fn throughput_mode(&self) -> ::std::option::Option<&crate::types::ThroughputMode> {
20 self.throughput_mode.as_ref()
21 }
22 /// <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>
23 pub fn provisioned_throughput_in_mibps(&self) -> ::std::option::Option<f64> {
24 self.provisioned_throughput_in_mibps
25 }
26}
27impl UpdateFileSystemInput {
28 /// Creates a new builder-style object to manufacture [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
29 pub fn builder() -> crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
30 crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder::default()
31 }
32}
33
34/// A builder for [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateFileSystemInputBuilder {
38 pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
39 pub(crate) throughput_mode: ::std::option::Option<crate::types::ThroughputMode>,
40 pub(crate) provisioned_throughput_in_mibps: ::std::option::Option<f64>,
41}
42impl UpdateFileSystemInputBuilder {
43 /// <p>The ID of the file system that you want to update.</p>
44 /// This field is required.
45 pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.file_system_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The ID of the file system that you want to update.</p>
50 pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.file_system_id = input;
52 self
53 }
54 /// <p>The ID of the file system that you want to update.</p>
55 pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.file_system_id
57 }
58 /// <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>
59 pub fn throughput_mode(mut self, input: crate::types::ThroughputMode) -> Self {
60 self.throughput_mode = ::std::option::Option::Some(input);
61 self
62 }
63 /// <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>
64 pub fn set_throughput_mode(mut self, input: ::std::option::Option<crate::types::ThroughputMode>) -> Self {
65 self.throughput_mode = input;
66 self
67 }
68 /// <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>
69 pub fn get_throughput_mode(&self) -> &::std::option::Option<crate::types::ThroughputMode> {
70 &self.throughput_mode
71 }
72 /// <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>
73 pub fn provisioned_throughput_in_mibps(mut self, input: f64) -> Self {
74 self.provisioned_throughput_in_mibps = ::std::option::Option::Some(input);
75 self
76 }
77 /// <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>
78 pub fn set_provisioned_throughput_in_mibps(mut self, input: ::std::option::Option<f64>) -> Self {
79 self.provisioned_throughput_in_mibps = input;
80 self
81 }
82 /// <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>
83 pub fn get_provisioned_throughput_in_mibps(&self) -> &::std::option::Option<f64> {
84 &self.provisioned_throughput_in_mibps
85 }
86 /// Consumes the builder and constructs a [`UpdateFileSystemInput`](crate::operation::update_file_system::UpdateFileSystemInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::update_file_system::UpdateFileSystemInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_file_system::UpdateFileSystemInput {
91 file_system_id: self.file_system_id,
92 throughput_mode: self.throughput_mode,
93 provisioned_throughput_in_mibps: self.provisioned_throughput_in_mibps,
94 })
95 }
96}