aws_sdk_storagegateway/operation/update_file_system_association/
_update_file_system_association_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)]
5pub struct UpdateFileSystemAssociationInput {
6    /// <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
7    pub file_system_association_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
9    pub user_name: ::std::option::Option<::std::string::String>,
10    /// <p>The password of the user credential.</p>
11    pub password: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>
13    pub audit_destination_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The refresh cache information for the file share or FSx file systems.</p>
15    pub cache_attributes: ::std::option::Option<crate::types::CacheAttributes>,
16}
17impl UpdateFileSystemAssociationInput {
18    /// <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
19    pub fn file_system_association_arn(&self) -> ::std::option::Option<&str> {
20        self.file_system_association_arn.as_deref()
21    }
22    /// <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
23    pub fn user_name(&self) -> ::std::option::Option<&str> {
24        self.user_name.as_deref()
25    }
26    /// <p>The password of the user credential.</p>
27    pub fn password(&self) -> ::std::option::Option<&str> {
28        self.password.as_deref()
29    }
30    /// <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>
31    pub fn audit_destination_arn(&self) -> ::std::option::Option<&str> {
32        self.audit_destination_arn.as_deref()
33    }
34    /// <p>The refresh cache information for the file share or FSx file systems.</p>
35    pub fn cache_attributes(&self) -> ::std::option::Option<&crate::types::CacheAttributes> {
36        self.cache_attributes.as_ref()
37    }
38}
39impl ::std::fmt::Debug for UpdateFileSystemAssociationInput {
40    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41        let mut formatter = f.debug_struct("UpdateFileSystemAssociationInput");
42        formatter.field("file_system_association_arn", &self.file_system_association_arn);
43        formatter.field("user_name", &self.user_name);
44        formatter.field("password", &"*** Sensitive Data Redacted ***");
45        formatter.field("audit_destination_arn", &self.audit_destination_arn);
46        formatter.field("cache_attributes", &self.cache_attributes);
47        formatter.finish()
48    }
49}
50impl UpdateFileSystemAssociationInput {
51    /// Creates a new builder-style object to manufacture [`UpdateFileSystemAssociationInput`](crate::operation::update_file_system_association::UpdateFileSystemAssociationInput).
52    pub fn builder() -> crate::operation::update_file_system_association::builders::UpdateFileSystemAssociationInputBuilder {
53        crate::operation::update_file_system_association::builders::UpdateFileSystemAssociationInputBuilder::default()
54    }
55}
56
57/// A builder for [`UpdateFileSystemAssociationInput`](crate::operation::update_file_system_association::UpdateFileSystemAssociationInput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct UpdateFileSystemAssociationInputBuilder {
61    pub(crate) file_system_association_arn: ::std::option::Option<::std::string::String>,
62    pub(crate) user_name: ::std::option::Option<::std::string::String>,
63    pub(crate) password: ::std::option::Option<::std::string::String>,
64    pub(crate) audit_destination_arn: ::std::option::Option<::std::string::String>,
65    pub(crate) cache_attributes: ::std::option::Option<crate::types::CacheAttributes>,
66}
67impl UpdateFileSystemAssociationInputBuilder {
68    /// <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
69    /// This field is required.
70    pub fn file_system_association_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.file_system_association_arn = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
75    pub fn set_file_system_association_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.file_system_association_arn = input;
77        self
78    }
79    /// <p>The Amazon Resource Name (ARN) of the file system association that you want to update.</p>
80    pub fn get_file_system_association_arn(&self) -> &::std::option::Option<::std::string::String> {
81        &self.file_system_association_arn
82    }
83    /// <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
84    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.user_name = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
89    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.user_name = input;
91        self
92    }
93    /// <p>The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.</p>
94    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
95        &self.user_name
96    }
97    /// <p>The password of the user credential.</p>
98    pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.password = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The password of the user credential.</p>
103    pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.password = input;
105        self
106    }
107    /// <p>The password of the user credential.</p>
108    pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
109        &self.password
110    }
111    /// <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>
112    pub fn audit_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.audit_destination_arn = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>
117    pub fn set_audit_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.audit_destination_arn = input;
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the storage used for the audit logs.</p>
122    pub fn get_audit_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
123        &self.audit_destination_arn
124    }
125    /// <p>The refresh cache information for the file share or FSx file systems.</p>
126    pub fn cache_attributes(mut self, input: crate::types::CacheAttributes) -> Self {
127        self.cache_attributes = ::std::option::Option::Some(input);
128        self
129    }
130    /// <p>The refresh cache information for the file share or FSx file systems.</p>
131    pub fn set_cache_attributes(mut self, input: ::std::option::Option<crate::types::CacheAttributes>) -> Self {
132        self.cache_attributes = input;
133        self
134    }
135    /// <p>The refresh cache information for the file share or FSx file systems.</p>
136    pub fn get_cache_attributes(&self) -> &::std::option::Option<crate::types::CacheAttributes> {
137        &self.cache_attributes
138    }
139    /// Consumes the builder and constructs a [`UpdateFileSystemAssociationInput`](crate::operation::update_file_system_association::UpdateFileSystemAssociationInput).
140    pub fn build(
141        self,
142    ) -> ::std::result::Result<
143        crate::operation::update_file_system_association::UpdateFileSystemAssociationInput,
144        ::aws_smithy_types::error::operation::BuildError,
145    > {
146        ::std::result::Result::Ok(crate::operation::update_file_system_association::UpdateFileSystemAssociationInput {
147            file_system_association_arn: self.file_system_association_arn,
148            user_name: self.user_name,
149            password: self.password,
150            audit_destination_arn: self.audit_destination_arn,
151            cache_attributes: self.cache_attributes,
152        })
153    }
154}
155impl ::std::fmt::Debug for UpdateFileSystemAssociationInputBuilder {
156    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
157        let mut formatter = f.debug_struct("UpdateFileSystemAssociationInputBuilder");
158        formatter.field("file_system_association_arn", &self.file_system_association_arn);
159        formatter.field("user_name", &self.user_name);
160        formatter.field("password", &"*** Sensitive Data Redacted ***");
161        formatter.field("audit_destination_arn", &self.audit_destination_arn);
162        formatter.field("cache_attributes", &self.cache_attributes);
163        formatter.finish()
164    }
165}