aws_sdk_storagegateway/operation/update_file_system_association/
_update_file_system_association_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateFileSystemAssociationInput {
6 pub file_system_association_arn: ::std::option::Option<::std::string::String>,
8 pub user_name: ::std::option::Option<::std::string::String>,
10 pub password: ::std::option::Option<::std::string::String>,
12 pub audit_destination_arn: ::std::option::Option<::std::string::String>,
14 pub cache_attributes: ::std::option::Option<crate::types::CacheAttributes>,
16}
17impl UpdateFileSystemAssociationInput {
18 pub fn file_system_association_arn(&self) -> ::std::option::Option<&str> {
20 self.file_system_association_arn.as_deref()
21 }
22 pub fn user_name(&self) -> ::std::option::Option<&str> {
24 self.user_name.as_deref()
25 }
26 pub fn password(&self) -> ::std::option::Option<&str> {
28 self.password.as_deref()
29 }
30 pub fn audit_destination_arn(&self) -> ::std::option::Option<&str> {
32 self.audit_destination_arn.as_deref()
33 }
34 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 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#[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 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 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 pub fn get_file_system_association_arn(&self) -> &::std::option::Option<::std::string::String> {
81 &self.file_system_association_arn
82 }
83 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 pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.user_name = input;
91 self
92 }
93 pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
95 &self.user_name
96 }
97 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 pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.password = input;
105 self
106 }
107 pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
109 &self.password
110 }
111 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 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 pub fn get_audit_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
123 &self.audit_destination_arn
124 }
125 pub fn cache_attributes(mut self, input: crate::types::CacheAttributes) -> Self {
127 self.cache_attributes = ::std::option::Option::Some(input);
128 self
129 }
130 pub fn set_cache_attributes(mut self, input: ::std::option::Option<crate::types::CacheAttributes>) -> Self {
132 self.cache_attributes = input;
133 self
134 }
135 pub fn get_cache_attributes(&self) -> &::std::option::Option<crate::types::CacheAttributes> {
137 &self.cache_attributes
138 }
139 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}