aws_sdk_securityagent/operation/update_finding/
_update_finding_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateFindingInput {
7 pub finding_id: ::std::option::Option<::std::string::String>,
9 pub agent_space_id: ::std::option::Option<::std::string::String>,
11 pub name: ::std::option::Option<::std::string::String>,
13 pub description: ::std::option::Option<::std::string::String>,
15 pub risk_type: ::std::option::Option<::std::string::String>,
17 pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
19 pub risk_score: ::std::option::Option<::std::string::String>,
21 pub attack_script: ::std::option::Option<::std::string::String>,
23 pub reasoning: ::std::option::Option<::std::string::String>,
25 pub status: ::std::option::Option<crate::types::FindingStatus>,
27 pub customer_note: ::std::option::Option<::std::string::String>,
29}
30impl UpdateFindingInput {
31 pub fn finding_id(&self) -> ::std::option::Option<&str> {
33 self.finding_id.as_deref()
34 }
35 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
37 self.agent_space_id.as_deref()
38 }
39 pub fn name(&self) -> ::std::option::Option<&str> {
41 self.name.as_deref()
42 }
43 pub fn description(&self) -> ::std::option::Option<&str> {
45 self.description.as_deref()
46 }
47 pub fn risk_type(&self) -> ::std::option::Option<&str> {
49 self.risk_type.as_deref()
50 }
51 pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
53 self.risk_level.as_ref()
54 }
55 pub fn risk_score(&self) -> ::std::option::Option<&str> {
57 self.risk_score.as_deref()
58 }
59 pub fn attack_script(&self) -> ::std::option::Option<&str> {
61 self.attack_script.as_deref()
62 }
63 pub fn reasoning(&self) -> ::std::option::Option<&str> {
65 self.reasoning.as_deref()
66 }
67 pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
69 self.status.as_ref()
70 }
71 pub fn customer_note(&self) -> ::std::option::Option<&str> {
73 self.customer_note.as_deref()
74 }
75}
76impl UpdateFindingInput {
77 pub fn builder() -> crate::operation::update_finding::builders::UpdateFindingInputBuilder {
79 crate::operation::update_finding::builders::UpdateFindingInputBuilder::default()
80 }
81}
82
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
85#[non_exhaustive]
86pub struct UpdateFindingInputBuilder {
87 pub(crate) finding_id: ::std::option::Option<::std::string::String>,
88 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
89 pub(crate) name: ::std::option::Option<::std::string::String>,
90 pub(crate) description: ::std::option::Option<::std::string::String>,
91 pub(crate) risk_type: ::std::option::Option<::std::string::String>,
92 pub(crate) risk_level: ::std::option::Option<crate::types::RiskLevel>,
93 pub(crate) risk_score: ::std::option::Option<::std::string::String>,
94 pub(crate) attack_script: ::std::option::Option<::std::string::String>,
95 pub(crate) reasoning: ::std::option::Option<::std::string::String>,
96 pub(crate) status: ::std::option::Option<crate::types::FindingStatus>,
97 pub(crate) customer_note: ::std::option::Option<::std::string::String>,
98}
99impl UpdateFindingInputBuilder {
100 pub fn finding_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.finding_id = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_finding_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.finding_id = input;
109 self
110 }
111 pub fn get_finding_id(&self) -> &::std::option::Option<::std::string::String> {
113 &self.finding_id
114 }
115 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.agent_space_id = ::std::option::Option::Some(input.into());
119 self
120 }
121 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.agent_space_id = input;
124 self
125 }
126 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
128 &self.agent_space_id
129 }
130 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.name = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.name = input;
138 self
139 }
140 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142 &self.name
143 }
144 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.description = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.description = input;
152 self
153 }
154 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156 &self.description
157 }
158 pub fn risk_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.risk_type = ::std::option::Option::Some(input.into());
161 self
162 }
163 pub fn set_risk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.risk_type = input;
166 self
167 }
168 pub fn get_risk_type(&self) -> &::std::option::Option<::std::string::String> {
170 &self.risk_type
171 }
172 pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
174 self.risk_level = ::std::option::Option::Some(input);
175 self
176 }
177 pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
179 self.risk_level = input;
180 self
181 }
182 pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
184 &self.risk_level
185 }
186 pub fn risk_score(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.risk_score = ::std::option::Option::Some(input.into());
189 self
190 }
191 pub fn set_risk_score(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.risk_score = input;
194 self
195 }
196 pub fn get_risk_score(&self) -> &::std::option::Option<::std::string::String> {
198 &self.risk_score
199 }
200 pub fn attack_script(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.attack_script = ::std::option::Option::Some(input.into());
203 self
204 }
205 pub fn set_attack_script(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.attack_script = input;
208 self
209 }
210 pub fn get_attack_script(&self) -> &::std::option::Option<::std::string::String> {
212 &self.attack_script
213 }
214 pub fn reasoning(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.reasoning = ::std::option::Option::Some(input.into());
217 self
218 }
219 pub fn set_reasoning(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.reasoning = input;
222 self
223 }
224 pub fn get_reasoning(&self) -> &::std::option::Option<::std::string::String> {
226 &self.reasoning
227 }
228 pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
230 self.status = ::std::option::Option::Some(input);
231 self
232 }
233 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
235 self.status = input;
236 self
237 }
238 pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
240 &self.status
241 }
242 pub fn customer_note(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244 self.customer_note = ::std::option::Option::Some(input.into());
245 self
246 }
247 pub fn set_customer_note(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249 self.customer_note = input;
250 self
251 }
252 pub fn get_customer_note(&self) -> &::std::option::Option<::std::string::String> {
254 &self.customer_note
255 }
256 pub fn build(
258 self,
259 ) -> ::std::result::Result<crate::operation::update_finding::UpdateFindingInput, ::aws_smithy_types::error::operation::BuildError> {
260 ::std::result::Result::Ok(crate::operation::update_finding::UpdateFindingInput {
261 finding_id: self.finding_id,
262 agent_space_id: self.agent_space_id,
263 name: self.name,
264 description: self.description,
265 risk_type: self.risk_type,
266 risk_level: self.risk_level,
267 risk_score: self.risk_score,
268 attack_script: self.attack_script,
269 reasoning: self.reasoning,
270 status: self.status,
271 customer_note: self.customer_note,
272 })
273 }
274}