// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A description of the file system.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateFileSystemOutput {
/// <p>The Amazon Web Services account that created the file system.</p>
pub owner_id: ::std::string::String,
/// <p>The opaque string specified in the request.</p>
pub creation_token: ::std::string::String,
/// <p>The ID of the file system, assigned by Amazon EFS.</p>
pub file_system_id: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
pub file_system_arn: ::std::option::Option<::std::string::String>,
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
pub creation_time: ::aws_smithy_types::DateTime,
/// <p>The lifecycle phase of the file system.</p>
pub life_cycle_state: crate::types::LifeCycleState,
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
pub number_of_mount_targets: i32,
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
pub size_in_bytes: ::std::option::Option<crate::types::FileSystemSize>,
/// <p>The performance mode of the file system.</p>
pub performance_mode: crate::types::PerformanceMode,
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
pub encrypted: ::std::option::Option<bool>,
/// <p>The ID of an KMS key used to protect the encrypted file system.</p>
pub kms_key_id: ::std::option::Option<::std::string::String>,
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub throughput_mode: ::std::option::Option<crate::types::ThroughputMode>,
/// <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
pub provisioned_throughput_in_mibps: ::std::option::Option<f64>,
/// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub availability_zone_name: ::std::option::Option<::std::string::String>,
/// <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
pub availability_zone_id: ::std::option::Option<::std::string::String>,
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
pub tags: ::std::vec::Vec<crate::types::Tag>,
/// <p>Describes the protection on the file system.</p>
pub file_system_protection: ::std::option::Option<crate::types::FileSystemProtectionDescription>,
_request_id: Option<String>,
}
impl CreateFileSystemOutput {
/// <p>The Amazon Web Services account that created the file system.</p>
pub fn owner_id(&self) -> &str {
use std::ops::Deref;
self.owner_id.deref()
}
/// <p>The opaque string specified in the request.</p>
pub fn creation_token(&self) -> &str {
use std::ops::Deref;
self.creation_token.deref()
}
/// <p>The ID of the file system, assigned by Amazon EFS.</p>
pub fn file_system_id(&self) -> &str {
use std::ops::Deref;
self.file_system_id.deref()
}
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
pub fn file_system_arn(&self) -> ::std::option::Option<&str> {
self.file_system_arn.as_deref()
}
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
/// <p>The lifecycle phase of the file system.</p>
pub fn life_cycle_state(&self) -> &crate::types::LifeCycleState {
&self.life_cycle_state
}
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
pub fn number_of_mount_targets(&self) -> i32 {
self.number_of_mount_targets
}
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
pub fn size_in_bytes(&self) -> ::std::option::Option<&crate::types::FileSystemSize> {
self.size_in_bytes.as_ref()
}
/// <p>The performance mode of the file system.</p>
pub fn performance_mode(&self) -> &crate::types::PerformanceMode {
&self.performance_mode
}
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
pub fn encrypted(&self) -> ::std::option::Option<bool> {
self.encrypted
}
/// <p>The ID of an KMS key used to protect the encrypted file system.</p>
pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
self.kms_key_id.as_deref()
}
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn throughput_mode(&self) -> ::std::option::Option<&crate::types::ThroughputMode> {
self.throughput_mode.as_ref()
}
/// <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
pub fn provisioned_throughput_in_mibps(&self) -> ::std::option::Option<f64> {
self.provisioned_throughput_in_mibps
}
/// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn availability_zone_name(&self) -> ::std::option::Option<&str> {
self.availability_zone_name.as_deref()
}
/// <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
self.availability_zone_id.as_deref()
}
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
pub fn tags(&self) -> &[crate::types::Tag] {
use std::ops::Deref;
self.tags.deref()
}
/// <p>Describes the protection on the file system.</p>
pub fn file_system_protection(&self) -> ::std::option::Option<&crate::types::FileSystemProtectionDescription> {
self.file_system_protection.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateFileSystemOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateFileSystemOutput {
/// Creates a new builder-style object to manufacture [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
pub fn builder() -> crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder {
crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::default()
}
}
/// A builder for [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateFileSystemOutputBuilder {
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) creation_token: ::std::option::Option<::std::string::String>,
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) file_system_arn: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) life_cycle_state: ::std::option::Option<crate::types::LifeCycleState>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) number_of_mount_targets: ::std::option::Option<i32>,
pub(crate) size_in_bytes: ::std::option::Option<crate::types::FileSystemSize>,
pub(crate) performance_mode: ::std::option::Option<crate::types::PerformanceMode>,
pub(crate) encrypted: ::std::option::Option<bool>,
pub(crate) kms_key_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>,
pub(crate) availability_zone_name: ::std::option::Option<::std::string::String>,
pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) file_system_protection: ::std::option::Option<crate::types::FileSystemProtectionDescription>,
_request_id: Option<String>,
}
impl CreateFileSystemOutputBuilder {
/// <p>The Amazon Web Services account that created the file system.</p>
/// This field is required.
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services account that created the file system.</p>
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
/// <p>The Amazon Web Services account that created the file system.</p>
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
/// <p>The opaque string specified in the request.</p>
/// This field is required.
pub fn creation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The opaque string specified in the request.</p>
pub fn set_creation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_token = input;
self
}
/// <p>The opaque string specified in the request.</p>
pub fn get_creation_token(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_token
}
/// <p>The ID of the file system, assigned by Amazon EFS.</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, assigned by Amazon EFS.</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, assigned by Amazon EFS.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
pub fn file_system_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_system_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
pub fn set_file_system_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_system_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code></p>
pub fn get_file_system_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_arn
}
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
/// This field is required.
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
/// <p>The lifecycle phase of the file system.</p>
/// This field is required.
pub fn life_cycle_state(mut self, input: crate::types::LifeCycleState) -> Self {
self.life_cycle_state = ::std::option::Option::Some(input);
self
}
/// <p>The lifecycle phase of the file system.</p>
pub fn set_life_cycle_state(mut self, input: ::std::option::Option<crate::types::LifeCycleState>) -> Self {
self.life_cycle_state = input;
self
}
/// <p>The lifecycle phase of the file system.</p>
pub fn get_life_cycle_state(&self) -> &::std::option::Option<crate::types::LifeCycleState> {
&self.life_cycle_state
}
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <code>CreateFileSystem</code>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
/// This field is required.
pub fn number_of_mount_targets(mut self, input: i32) -> Self {
self.number_of_mount_targets = ::std::option::Option::Some(input);
self
}
/// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
pub fn set_number_of_mount_targets(mut self, input: ::std::option::Option<i32>) -> Self {
self.number_of_mount_targets = input;
self
}
/// <p>The current number of mount targets that the file system has. For more information, see <code>CreateMountTarget</code>.</p>
pub fn get_number_of_mount_targets(&self) -> &::std::option::Option<i32> {
&self.number_of_mount_targets
}
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
/// This field is required.
pub fn size_in_bytes(mut self, input: crate::types::FileSystemSize) -> Self {
self.size_in_bytes = ::std::option::Option::Some(input);
self
}
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
pub fn set_size_in_bytes(mut self, input: ::std::option::Option<crate::types::FileSystemSize>) -> Self {
self.size_in_bytes = input;
self
}
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.</p>
pub fn get_size_in_bytes(&self) -> &::std::option::Option<crate::types::FileSystemSize> {
&self.size_in_bytes
}
/// <p>The performance mode of the file system.</p>
/// This field is required.
pub fn performance_mode(mut self, input: crate::types::PerformanceMode) -> Self {
self.performance_mode = ::std::option::Option::Some(input);
self
}
/// <p>The performance mode of the file system.</p>
pub fn set_performance_mode(mut self, input: ::std::option::Option<crate::types::PerformanceMode>) -> Self {
self.performance_mode = input;
self
}
/// <p>The performance mode of the file system.</p>
pub fn get_performance_mode(&self) -> &::std::option::Option<crate::types::PerformanceMode> {
&self.performance_mode
}
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
pub fn encrypted(mut self, input: bool) -> Self {
self.encrypted = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
self.encrypted = input;
self
}
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
&self.encrypted
}
/// <p>The ID of an KMS key used to protect the encrypted file system.</p>
pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of an KMS key used to protect the encrypted file system.</p>
pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// <p>The ID of an KMS key used to protect the encrypted file system.</p>
pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_id
}
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn throughput_mode(mut self, input: crate::types::ThroughputMode) -> Self {
self.throughput_mode = ::std::option::Option::Some(input);
self
}
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn set_throughput_mode(mut self, input: ::std::option::Option<crate::types::ThroughputMode>) -> Self {
self.throughput_mode = input;
self
}
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn get_throughput_mode(&self) -> &::std::option::Option<crate::types::ThroughputMode> {
&self.throughput_mode
}
/// <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
pub fn provisioned_throughput_in_mibps(mut self, input: f64) -> Self {
self.provisioned_throughput_in_mibps = ::std::option::Option::Some(input);
self
}
/// <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
pub fn set_provisioned_throughput_in_mibps(mut self, input: ::std::option::Option<f64>) -> Self {
self.provisioned_throughput_in_mibps = input;
self
}
/// <p>The amount of provisioned throughput, measured in MiBps, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
pub fn get_provisioned_throughput_in_mibps(&self) -> &::std::option::Option<f64> {
&self.provisioned_throughput_in_mibps
}
/// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn availability_zone_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone_name = ::std::option::Option::Some(input.into());
self
}
/// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn set_availability_zone_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.availability_zone_name = input;
self
}
/// <p>Describes the Amazon Web Services Availability Zone in which the file system is located, and is valid only for One Zone file systems. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn get_availability_zone_name(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone_name
}
/// <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.availability_zone_id = input;
self
}
/// <p>The unique and consistent identifier of the Availability Zone in which the file system is located, and is valid only for One Zone file systems. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 Amazon Web Services Region, and it has the same location in every Amazon Web Services account.</p>
pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone_id
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>Describes the protection on the file system.</p>
pub fn file_system_protection(mut self, input: crate::types::FileSystemProtectionDescription) -> Self {
self.file_system_protection = ::std::option::Option::Some(input);
self
}
/// <p>Describes the protection on the file system.</p>
pub fn set_file_system_protection(mut self, input: ::std::option::Option<crate::types::FileSystemProtectionDescription>) -> Self {
self.file_system_protection = input;
self
}
/// <p>Describes the protection on the file system.</p>
pub fn get_file_system_protection(&self) -> &::std::option::Option<crate::types::FileSystemProtectionDescription> {
&self.file_system_protection
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateFileSystemOutput`](crate::operation::create_file_system::CreateFileSystemOutput).
/// This method will fail if any of the following fields are not set:
/// - [`owner_id`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::owner_id)
/// - [`creation_token`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::creation_token)
/// - [`file_system_id`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::file_system_id)
/// - [`creation_time`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::creation_time)
/// - [`life_cycle_state`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::life_cycle_state)
/// - [`performance_mode`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::performance_mode)
/// - [`tags`](crate::operation::create_file_system::builders::CreateFileSystemOutputBuilder::tags)
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_file_system::CreateFileSystemOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_file_system::CreateFileSystemOutput {
owner_id: self.owner_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"owner_id",
"owner_id was not specified but it is required when building CreateFileSystemOutput",
)
})?,
creation_token: self.creation_token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_token",
"creation_token was not specified but it is required when building CreateFileSystemOutput",
)
})?,
file_system_id: self.file_system_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_system_id",
"file_system_id was not specified but it is required when building CreateFileSystemOutput",
)
})?,
file_system_arn: self.file_system_arn,
creation_time: self.creation_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_time",
"creation_time was not specified but it is required when building CreateFileSystemOutput",
)
})?,
life_cycle_state: self.life_cycle_state.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"life_cycle_state",
"life_cycle_state was not specified but it is required when building CreateFileSystemOutput",
)
})?,
name: self.name,
number_of_mount_targets: self.number_of_mount_targets.unwrap_or_default(),
size_in_bytes: self.size_in_bytes,
performance_mode: self.performance_mode.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"performance_mode",
"performance_mode was not specified but it is required when building CreateFileSystemOutput",
)
})?,
encrypted: self.encrypted,
kms_key_id: self.kms_key_id,
throughput_mode: self.throughput_mode,
provisioned_throughput_in_mibps: self.provisioned_throughput_in_mibps,
availability_zone_name: self.availability_zone_name,
availability_zone_id: self.availability_zone_id,
tags: self.tags.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"tags",
"tags was not specified but it is required when building CreateFileSystemOutput",
)
})?,
file_system_protection: self.file_system_protection,
_request_id: self._request_id,
})
}
}