aws_sdk_storagegateway/operation/disassociate_file_system/_disassociate_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 DisassociateFileSystemInput {
6 /// <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
7 pub file_system_association_arn: ::std::option::Option<::std::string::String>,
8 /// <p>If this value is set to true, the operation disassociates an Amazon FSx file system immediately. It ends all data uploads to the file system, and the file system association enters the <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>
9 pub force_delete: ::std::option::Option<bool>,
10}
11impl DisassociateFileSystemInput {
12 /// <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
13 pub fn file_system_association_arn(&self) -> ::std::option::Option<&str> {
14 self.file_system_association_arn.as_deref()
15 }
16 /// <p>If this value is set to true, the operation disassociates an Amazon FSx file system immediately. It ends all data uploads to the file system, and the file system association enters the <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>
17 pub fn force_delete(&self) -> ::std::option::Option<bool> {
18 self.force_delete
19 }
20}
21impl DisassociateFileSystemInput {
22 /// Creates a new builder-style object to manufacture [`DisassociateFileSystemInput`](crate::operation::disassociate_file_system::DisassociateFileSystemInput).
23 pub fn builder() -> crate::operation::disassociate_file_system::builders::DisassociateFileSystemInputBuilder {
24 crate::operation::disassociate_file_system::builders::DisassociateFileSystemInputBuilder::default()
25 }
26}
27
28/// A builder for [`DisassociateFileSystemInput`](crate::operation::disassociate_file_system::DisassociateFileSystemInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DisassociateFileSystemInputBuilder {
32 pub(crate) file_system_association_arn: ::std::option::Option<::std::string::String>,
33 pub(crate) force_delete: ::std::option::Option<bool>,
34}
35impl DisassociateFileSystemInputBuilder {
36 /// <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
37 /// This field is required.
38 pub fn file_system_association_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.file_system_association_arn = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
43 pub fn set_file_system_association_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.file_system_association_arn = input;
45 self
46 }
47 /// <p>The Amazon Resource Name (ARN) of the file system association to be deleted.</p>
48 pub fn get_file_system_association_arn(&self) -> &::std::option::Option<::std::string::String> {
49 &self.file_system_association_arn
50 }
51 /// <p>If this value is set to true, the operation disassociates an Amazon FSx file system immediately. It ends all data uploads to the file system, and the file system association enters the <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>
52 pub fn force_delete(mut self, input: bool) -> Self {
53 self.force_delete = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>If this value is set to true, the operation disassociates an Amazon FSx file system immediately. It ends all data uploads to the file system, and the file system association enters the <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>
57 pub fn set_force_delete(mut self, input: ::std::option::Option<bool>) -> Self {
58 self.force_delete = input;
59 self
60 }
61 /// <p>If this value is set to true, the operation disassociates an Amazon FSx file system immediately. It ends all data uploads to the file system, and the file system association enters the <code>FORCE_DELETING</code> status. If this value is set to false, the Amazon FSx file system does not disassociate until all data is uploaded.</p>
62 pub fn get_force_delete(&self) -> &::std::option::Option<bool> {
63 &self.force_delete
64 }
65 /// Consumes the builder and constructs a [`DisassociateFileSystemInput`](crate::operation::disassociate_file_system::DisassociateFileSystemInput).
66 pub fn build(
67 self,
68 ) -> ::std::result::Result<
69 crate::operation::disassociate_file_system::DisassociateFileSystemInput,
70 ::aws_smithy_types::error::operation::BuildError,
71 > {
72 ::std::result::Result::Ok(crate::operation::disassociate_file_system::DisassociateFileSystemInput {
73 file_system_association_arn: self.file_system_association_arn,
74 force_delete: self.force_delete,
75 })
76 }
77}