aws-sdk-securityagent 1.4.0

AWS SDK for AWS Security Agent
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a security finding discovered during a pentest job. A finding contains details about a vulnerability, including its risk level, confidence, and remediation status.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Finding {
    /// <p>The unique identifier of the finding.</p>
    pub finding_id: ::std::string::String,
    /// <p>The unique identifier of the agent space associated with the finding.</p>
    pub agent_space_id: ::std::string::String,
    /// <p>The unique identifier of the pentest associated with the finding.</p>
    pub pentest_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the pentest job that produced the finding.</p>
    pub pentest_job_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the code review associated with the finding.</p>
    pub code_review_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the code review job that produced the finding.</p>
    pub code_review_job_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the task that produced the finding.</p>
    pub task_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the finding.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the finding.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the finding. Valid values include ACTIVE, RESOLVED, ACCEPTED, and FALSE_POSITIVE.</p>
    pub status: ::std::option::Option<crate::types::FindingStatus>,
    /// <p>The type of security risk identified by the finding.</p>
    pub risk_type: ::std::option::Option<::std::string::String>,
    /// <p>The risk level of the finding. Valid values include UNKNOWN, INFORMATIONAL, LOW, MEDIUM, HIGH, and CRITICAL.</p>
    pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
    /// <p>The numerical risk score of the finding.</p>
    pub risk_score: ::std::option::Option<::std::string::String>,
    /// <p>The reasoning behind the finding, explaining why it was identified as a vulnerability.</p>
    pub reasoning: ::std::option::Option<::std::string::String>,
    /// <p>The confidence level of the finding. Valid values include FALSE_POSITIVE, UNCONFIRMED, LOW, MEDIUM, and HIGH.</p>
    pub confidence: ::std::option::Option<crate::types::ConfidenceLevel>,
    /// <p>The attack script used to reproduce the finding.</p>
    pub attack_script: ::std::option::Option<::std::string::String>,
    /// <p>The code remediation task associated with the finding, if code remediation was initiated.</p>
    pub code_remediation_task: ::std::option::Option<crate::types::CodeRemediationTask>,
    /// <p>The identifier of the entity that last updated the finding.</p>
    pub last_updated_by: ::std::option::Option<::std::string::String>,
    /// <p>The file locations involved in the vulnerability, as reported by the code scanner.</p>
    pub code_locations: ::std::option::Option<::std::vec::Vec<crate::types::CodeLocation>>,
    /// <p>The date and time the finding was created, in UTC format.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the finding was last updated, in UTC format.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Finding {
    /// <p>The unique identifier of the finding.</p>
    pub fn finding_id(&self) -> &str {
        use std::ops::Deref;
        self.finding_id.deref()
    }
    /// <p>The unique identifier of the agent space associated with the finding.</p>
    pub fn agent_space_id(&self) -> &str {
        use std::ops::Deref;
        self.agent_space_id.deref()
    }
    /// <p>The unique identifier of the pentest associated with the finding.</p>
    pub fn pentest_id(&self) -> ::std::option::Option<&str> {
        self.pentest_id.as_deref()
    }
    /// <p>The unique identifier of the pentest job that produced the finding.</p>
    pub fn pentest_job_id(&self) -> ::std::option::Option<&str> {
        self.pentest_job_id.as_deref()
    }
    /// <p>The unique identifier of the code review associated with the finding.</p>
    pub fn code_review_id(&self) -> ::std::option::Option<&str> {
        self.code_review_id.as_deref()
    }
    /// <p>The unique identifier of the code review job that produced the finding.</p>
    pub fn code_review_job_id(&self) -> ::std::option::Option<&str> {
        self.code_review_job_id.as_deref()
    }
    /// <p>The unique identifier of the task that produced the finding.</p>
    pub fn task_id(&self) -> ::std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The name of the finding.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the finding.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The current status of the finding. Valid values include ACTIVE, RESOLVED, ACCEPTED, and FALSE_POSITIVE.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
        self.status.as_ref()
    }
    /// <p>The type of security risk identified by the finding.</p>
    pub fn risk_type(&self) -> ::std::option::Option<&str> {
        self.risk_type.as_deref()
    }
    /// <p>The risk level of the finding. Valid values include UNKNOWN, INFORMATIONAL, LOW, MEDIUM, HIGH, and CRITICAL.</p>
    pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
        self.risk_level.as_ref()
    }
    /// <p>The numerical risk score of the finding.</p>
    pub fn risk_score(&self) -> ::std::option::Option<&str> {
        self.risk_score.as_deref()
    }
    /// <p>The reasoning behind the finding, explaining why it was identified as a vulnerability.</p>
    pub fn reasoning(&self) -> ::std::option::Option<&str> {
        self.reasoning.as_deref()
    }
    /// <p>The confidence level of the finding. Valid values include FALSE_POSITIVE, UNCONFIRMED, LOW, MEDIUM, and HIGH.</p>
    pub fn confidence(&self) -> ::std::option::Option<&crate::types::ConfidenceLevel> {
        self.confidence.as_ref()
    }
    /// <p>The attack script used to reproduce the finding.</p>
    pub fn attack_script(&self) -> ::std::option::Option<&str> {
        self.attack_script.as_deref()
    }
    /// <p>The code remediation task associated with the finding, if code remediation was initiated.</p>
    pub fn code_remediation_task(&self) -> ::std::option::Option<&crate::types::CodeRemediationTask> {
        self.code_remediation_task.as_ref()
    }
    /// <p>The identifier of the entity that last updated the finding.</p>
    pub fn last_updated_by(&self) -> ::std::option::Option<&str> {
        self.last_updated_by.as_deref()
    }
    /// <p>The file locations involved in the vulnerability, as reported by the code scanner.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.code_locations.is_none()`.
    pub fn code_locations(&self) -> &[crate::types::CodeLocation] {
        self.code_locations.as_deref().unwrap_or_default()
    }
    /// <p>The date and time the finding was created, in UTC format.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The date and time the finding was last updated, in UTC format.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
impl Finding {
    /// Creates a new builder-style object to manufacture [`Finding`](crate::types::Finding).
    pub fn builder() -> crate::types::builders::FindingBuilder {
        crate::types::builders::FindingBuilder::default()
    }
}

/// A builder for [`Finding`](crate::types::Finding).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FindingBuilder {
    pub(crate) finding_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) pentest_id: ::std::option::Option<::std::string::String>,
    pub(crate) pentest_job_id: ::std::option::Option<::std::string::String>,
    pub(crate) code_review_id: ::std::option::Option<::std::string::String>,
    pub(crate) code_review_job_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::FindingStatus>,
    pub(crate) risk_type: ::std::option::Option<::std::string::String>,
    pub(crate) risk_level: ::std::option::Option<crate::types::RiskLevel>,
    pub(crate) risk_score: ::std::option::Option<::std::string::String>,
    pub(crate) reasoning: ::std::option::Option<::std::string::String>,
    pub(crate) confidence: ::std::option::Option<crate::types::ConfidenceLevel>,
    pub(crate) attack_script: ::std::option::Option<::std::string::String>,
    pub(crate) code_remediation_task: ::std::option::Option<crate::types::CodeRemediationTask>,
    pub(crate) last_updated_by: ::std::option::Option<::std::string::String>,
    pub(crate) code_locations: ::std::option::Option<::std::vec::Vec<crate::types::CodeLocation>>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl FindingBuilder {
    /// <p>The unique identifier of the finding.</p>
    /// This field is required.
    pub fn finding_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.finding_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the finding.</p>
    pub fn set_finding_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.finding_id = input;
        self
    }
    /// <p>The unique identifier of the finding.</p>
    pub fn get_finding_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.finding_id
    }
    /// <p>The unique identifier of the agent space associated with the finding.</p>
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the agent space associated with the finding.</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier of the agent space associated with the finding.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <p>The unique identifier of the pentest associated with the finding.</p>
    pub fn pentest_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pentest_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the pentest associated with the finding.</p>
    pub fn set_pentest_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pentest_id = input;
        self
    }
    /// <p>The unique identifier of the pentest associated with the finding.</p>
    pub fn get_pentest_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pentest_id
    }
    /// <p>The unique identifier of the pentest job that produced the finding.</p>
    pub fn pentest_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pentest_job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the pentest job that produced the finding.</p>
    pub fn set_pentest_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pentest_job_id = input;
        self
    }
    /// <p>The unique identifier of the pentest job that produced the finding.</p>
    pub fn get_pentest_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pentest_job_id
    }
    /// <p>The unique identifier of the code review associated with the finding.</p>
    pub fn code_review_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.code_review_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the code review associated with the finding.</p>
    pub fn set_code_review_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.code_review_id = input;
        self
    }
    /// <p>The unique identifier of the code review associated with the finding.</p>
    pub fn get_code_review_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.code_review_id
    }
    /// <p>The unique identifier of the code review job that produced the finding.</p>
    pub fn code_review_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.code_review_job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the code review job that produced the finding.</p>
    pub fn set_code_review_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.code_review_job_id = input;
        self
    }
    /// <p>The unique identifier of the code review job that produced the finding.</p>
    pub fn get_code_review_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.code_review_job_id
    }
    /// <p>The unique identifier of the task that produced the finding.</p>
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the task that produced the finding.</p>
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// <p>The unique identifier of the task that produced the finding.</p>
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// <p>The name of the finding.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the finding.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the finding.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the finding.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the finding.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the finding.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The current status of the finding. Valid values include ACTIVE, RESOLVED, ACCEPTED, and FALSE_POSITIVE.</p>
    pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the finding. Valid values include ACTIVE, RESOLVED, ACCEPTED, and FALSE_POSITIVE.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the finding. Valid values include ACTIVE, RESOLVED, ACCEPTED, and FALSE_POSITIVE.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
        &self.status
    }
    /// <p>The type of security risk identified by the finding.</p>
    pub fn risk_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.risk_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of security risk identified by the finding.</p>
    pub fn set_risk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.risk_type = input;
        self
    }
    /// <p>The type of security risk identified by the finding.</p>
    pub fn get_risk_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.risk_type
    }
    /// <p>The risk level of the finding. Valid values include UNKNOWN, INFORMATIONAL, LOW, MEDIUM, HIGH, and CRITICAL.</p>
    pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
        self.risk_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>The risk level of the finding. Valid values include UNKNOWN, INFORMATIONAL, LOW, MEDIUM, HIGH, and CRITICAL.</p>
    pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
        self.risk_level = input;
        self
    }
    /// <p>The risk level of the finding. Valid values include UNKNOWN, INFORMATIONAL, LOW, MEDIUM, HIGH, and CRITICAL.</p>
    pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
        &self.risk_level
    }
    /// <p>The numerical risk score of the finding.</p>
    pub fn risk_score(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.risk_score = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The numerical risk score of the finding.</p>
    pub fn set_risk_score(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.risk_score = input;
        self
    }
    /// <p>The numerical risk score of the finding.</p>
    pub fn get_risk_score(&self) -> &::std::option::Option<::std::string::String> {
        &self.risk_score
    }
    /// <p>The reasoning behind the finding, explaining why it was identified as a vulnerability.</p>
    pub fn reasoning(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reasoning = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reasoning behind the finding, explaining why it was identified as a vulnerability.</p>
    pub fn set_reasoning(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reasoning = input;
        self
    }
    /// <p>The reasoning behind the finding, explaining why it was identified as a vulnerability.</p>
    pub fn get_reasoning(&self) -> &::std::option::Option<::std::string::String> {
        &self.reasoning
    }
    /// <p>The confidence level of the finding. Valid values include FALSE_POSITIVE, UNCONFIRMED, LOW, MEDIUM, and HIGH.</p>
    pub fn confidence(mut self, input: crate::types::ConfidenceLevel) -> Self {
        self.confidence = ::std::option::Option::Some(input);
        self
    }
    /// <p>The confidence level of the finding. Valid values include FALSE_POSITIVE, UNCONFIRMED, LOW, MEDIUM, and HIGH.</p>
    pub fn set_confidence(mut self, input: ::std::option::Option<crate::types::ConfidenceLevel>) -> Self {
        self.confidence = input;
        self
    }
    /// <p>The confidence level of the finding. Valid values include FALSE_POSITIVE, UNCONFIRMED, LOW, MEDIUM, and HIGH.</p>
    pub fn get_confidence(&self) -> &::std::option::Option<crate::types::ConfidenceLevel> {
        &self.confidence
    }
    /// <p>The attack script used to reproduce the finding.</p>
    pub fn attack_script(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attack_script = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The attack script used to reproduce the finding.</p>
    pub fn set_attack_script(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attack_script = input;
        self
    }
    /// <p>The attack script used to reproduce the finding.</p>
    pub fn get_attack_script(&self) -> &::std::option::Option<::std::string::String> {
        &self.attack_script
    }
    /// <p>The code remediation task associated with the finding, if code remediation was initiated.</p>
    pub fn code_remediation_task(mut self, input: crate::types::CodeRemediationTask) -> Self {
        self.code_remediation_task = ::std::option::Option::Some(input);
        self
    }
    /// <p>The code remediation task associated with the finding, if code remediation was initiated.</p>
    pub fn set_code_remediation_task(mut self, input: ::std::option::Option<crate::types::CodeRemediationTask>) -> Self {
        self.code_remediation_task = input;
        self
    }
    /// <p>The code remediation task associated with the finding, if code remediation was initiated.</p>
    pub fn get_code_remediation_task(&self) -> &::std::option::Option<crate::types::CodeRemediationTask> {
        &self.code_remediation_task
    }
    /// <p>The identifier of the entity that last updated the finding.</p>
    pub fn last_updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_updated_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the entity that last updated the finding.</p>
    pub fn set_last_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_updated_by = input;
        self
    }
    /// <p>The identifier of the entity that last updated the finding.</p>
    pub fn get_last_updated_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_updated_by
    }
    /// Appends an item to `code_locations`.
    ///
    /// To override the contents of this collection use [`set_code_locations`](Self::set_code_locations).
    ///
    /// <p>The file locations involved in the vulnerability, as reported by the code scanner.</p>
    pub fn code_locations(mut self, input: crate::types::CodeLocation) -> Self {
        let mut v = self.code_locations.unwrap_or_default();
        v.push(input);
        self.code_locations = ::std::option::Option::Some(v);
        self
    }
    /// <p>The file locations involved in the vulnerability, as reported by the code scanner.</p>
    pub fn set_code_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeLocation>>) -> Self {
        self.code_locations = input;
        self
    }
    /// <p>The file locations involved in the vulnerability, as reported by the code scanner.</p>
    pub fn get_code_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeLocation>> {
        &self.code_locations
    }
    /// <p>The date and time the finding was created, in UTC format.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the finding was created, in UTC format.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the finding was created, in UTC format.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time the finding was last updated, in UTC format.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the finding was last updated, in UTC format.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The date and time the finding was last updated, in UTC format.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// Consumes the builder and constructs a [`Finding`](crate::types::Finding).
    /// This method will fail if any of the following fields are not set:
    /// - [`finding_id`](crate::types::builders::FindingBuilder::finding_id)
    /// - [`agent_space_id`](crate::types::builders::FindingBuilder::agent_space_id)
    pub fn build(self) -> ::std::result::Result<crate::types::Finding, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Finding {
            finding_id: self.finding_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "finding_id",
                    "finding_id was not specified but it is required when building Finding",
                )
            })?,
            agent_space_id: self.agent_space_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_space_id",
                    "agent_space_id was not specified but it is required when building Finding",
                )
            })?,
            pentest_id: self.pentest_id,
            pentest_job_id: self.pentest_job_id,
            code_review_id: self.code_review_id,
            code_review_job_id: self.code_review_job_id,
            task_id: self.task_id,
            name: self.name,
            description: self.description,
            status: self.status,
            risk_type: self.risk_type,
            risk_level: self.risk_level,
            risk_score: self.risk_score,
            reasoning: self.reasoning,
            confidence: self.confidence,
            attack_script: self.attack_script,
            code_remediation_task: self.code_remediation_task,
            last_updated_by: self.last_updated_by,
            code_locations: self.code_locations,
            created_at: self.created_at,
            updated_at: self.updated_at,
        })
    }
}