aws-sdk-s3files 1.1.0

AWS SDK for Amazon S3 Files
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 DeleteFileSystemInput {
    /// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to delete.</p>
    pub file_system_id: ::std::option::Option<::std::string::String>,
    /// <p>If true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.</p>
    pub force_delete: ::std::option::Option<bool>,
}
impl DeleteFileSystemInput {
    /// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to delete.</p>
    pub fn file_system_id(&self) -> ::std::option::Option<&str> {
        self.file_system_id.as_deref()
    }
    /// <p>If true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.</p>
    pub fn force_delete(&self) -> ::std::option::Option<bool> {
        self.force_delete
    }
}
impl DeleteFileSystemInput {
    /// Creates a new builder-style object to manufacture [`DeleteFileSystemInput`](crate::operation::delete_file_system::DeleteFileSystemInput).
    pub fn builder() -> crate::operation::delete_file_system::builders::DeleteFileSystemInputBuilder {
        crate::operation::delete_file_system::builders::DeleteFileSystemInputBuilder::default()
    }
}

/// A builder for [`DeleteFileSystemInput`](crate::operation::delete_file_system::DeleteFileSystemInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteFileSystemInputBuilder {
    pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
    pub(crate) force_delete: ::std::option::Option<bool>,
}
impl DeleteFileSystemInputBuilder {
    /// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to delete.</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 or Amazon Resource Name (ARN) of the S3 File System to delete.</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 or Amazon Resource Name (ARN) of the S3 File System to delete.</p>
    pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_system_id
    }
    /// <p>If true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.</p>
    pub fn force_delete(mut self, input: bool) -> Self {
        self.force_delete = ::std::option::Option::Some(input);
        self
    }
    /// <p>If true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.</p>
    pub fn set_force_delete(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force_delete = input;
        self
    }
    /// <p>If true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.</p>
    pub fn get_force_delete(&self) -> &::std::option::Option<bool> {
        &self.force_delete
    }
    /// Consumes the builder and constructs a [`DeleteFileSystemInput`](crate::operation::delete_file_system::DeleteFileSystemInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_file_system::DeleteFileSystemInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_file_system::DeleteFileSystemInput {
            file_system_id: self.file_system_id,
            force_delete: self.force_delete,
        })
    }
}