aws_sdk_auditmanager/operation/update_control/
_update_control_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateControlInput {
6 pub control_id: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub testing_information: ::std::option::Option<::std::string::String>,
14 pub action_plan_title: ::std::option::Option<::std::string::String>,
16 pub action_plan_instructions: ::std::option::Option<::std::string::String>,
18 pub control_mapping_sources: ::std::option::Option<::std::vec::Vec<crate::types::ControlMappingSource>>,
20}
21impl UpdateControlInput {
22 pub fn control_id(&self) -> ::std::option::Option<&str> {
24 self.control_id.as_deref()
25 }
26 pub fn name(&self) -> ::std::option::Option<&str> {
28 self.name.as_deref()
29 }
30 pub fn description(&self) -> ::std::option::Option<&str> {
32 self.description.as_deref()
33 }
34 pub fn testing_information(&self) -> ::std::option::Option<&str> {
36 self.testing_information.as_deref()
37 }
38 pub fn action_plan_title(&self) -> ::std::option::Option<&str> {
40 self.action_plan_title.as_deref()
41 }
42 pub fn action_plan_instructions(&self) -> ::std::option::Option<&str> {
44 self.action_plan_instructions.as_deref()
45 }
46 pub fn control_mapping_sources(&self) -> &[crate::types::ControlMappingSource] {
50 self.control_mapping_sources.as_deref().unwrap_or_default()
51 }
52}
53impl ::std::fmt::Debug for UpdateControlInput {
54 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
55 let mut formatter = f.debug_struct("UpdateControlInput");
56 formatter.field("control_id", &self.control_id);
57 formatter.field("name", &self.name);
58 formatter.field("description", &"*** Sensitive Data Redacted ***");
59 formatter.field("testing_information", &"*** Sensitive Data Redacted ***");
60 formatter.field("action_plan_title", &"*** Sensitive Data Redacted ***");
61 formatter.field("action_plan_instructions", &"*** Sensitive Data Redacted ***");
62 formatter.field("control_mapping_sources", &self.control_mapping_sources);
63 formatter.finish()
64 }
65}
66impl UpdateControlInput {
67 pub fn builder() -> crate::operation::update_control::builders::UpdateControlInputBuilder {
69 crate::operation::update_control::builders::UpdateControlInputBuilder::default()
70 }
71}
72
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
75#[non_exhaustive]
76pub struct UpdateControlInputBuilder {
77 pub(crate) control_id: ::std::option::Option<::std::string::String>,
78 pub(crate) name: ::std::option::Option<::std::string::String>,
79 pub(crate) description: ::std::option::Option<::std::string::String>,
80 pub(crate) testing_information: ::std::option::Option<::std::string::String>,
81 pub(crate) action_plan_title: ::std::option::Option<::std::string::String>,
82 pub(crate) action_plan_instructions: ::std::option::Option<::std::string::String>,
83 pub(crate) control_mapping_sources: ::std::option::Option<::std::vec::Vec<crate::types::ControlMappingSource>>,
84}
85impl UpdateControlInputBuilder {
86 pub fn control_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.control_id = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_control_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.control_id = input;
95 self
96 }
97 pub fn get_control_id(&self) -> &::std::option::Option<::std::string::String> {
99 &self.control_id
100 }
101 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.name = ::std::option::Option::Some(input.into());
105 self
106 }
107 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.name = input;
110 self
111 }
112 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
114 &self.name
115 }
116 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.description = ::std::option::Option::Some(input.into());
119 self
120 }
121 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.description = input;
124 self
125 }
126 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
128 &self.description
129 }
130 pub fn testing_information(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.testing_information = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_testing_information(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.testing_information = input;
138 self
139 }
140 pub fn get_testing_information(&self) -> &::std::option::Option<::std::string::String> {
142 &self.testing_information
143 }
144 pub fn action_plan_title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.action_plan_title = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_action_plan_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.action_plan_title = input;
152 self
153 }
154 pub fn get_action_plan_title(&self) -> &::std::option::Option<::std::string::String> {
156 &self.action_plan_title
157 }
158 pub fn action_plan_instructions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.action_plan_instructions = ::std::option::Option::Some(input.into());
161 self
162 }
163 pub fn set_action_plan_instructions(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.action_plan_instructions = input;
166 self
167 }
168 pub fn get_action_plan_instructions(&self) -> &::std::option::Option<::std::string::String> {
170 &self.action_plan_instructions
171 }
172 pub fn control_mapping_sources(mut self, input: crate::types::ControlMappingSource) -> Self {
178 let mut v = self.control_mapping_sources.unwrap_or_default();
179 v.push(input);
180 self.control_mapping_sources = ::std::option::Option::Some(v);
181 self
182 }
183 pub fn set_control_mapping_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ControlMappingSource>>) -> Self {
185 self.control_mapping_sources = input;
186 self
187 }
188 pub fn get_control_mapping_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ControlMappingSource>> {
190 &self.control_mapping_sources
191 }
192 pub fn build(
194 self,
195 ) -> ::std::result::Result<crate::operation::update_control::UpdateControlInput, ::aws_smithy_types::error::operation::BuildError> {
196 ::std::result::Result::Ok(crate::operation::update_control::UpdateControlInput {
197 control_id: self.control_id,
198 name: self.name,
199 description: self.description,
200 testing_information: self.testing_information,
201 action_plan_title: self.action_plan_title,
202 action_plan_instructions: self.action_plan_instructions,
203 control_mapping_sources: self.control_mapping_sources,
204 })
205 }
206}
207impl ::std::fmt::Debug for UpdateControlInputBuilder {
208 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
209 let mut formatter = f.debug_struct("UpdateControlInputBuilder");
210 formatter.field("control_id", &self.control_id);
211 formatter.field("name", &self.name);
212 formatter.field("description", &"*** Sensitive Data Redacted ***");
213 formatter.field("testing_information", &"*** Sensitive Data Redacted ***");
214 formatter.field("action_plan_title", &"*** Sensitive Data Redacted ***");
215 formatter.field("action_plan_instructions", &"*** Sensitive Data Redacted ***");
216 formatter.field("control_mapping_sources", &self.control_mapping_sources);
217 formatter.finish()
218 }
219}