Skip to main content

aws_sdk_securityagent/operation/create_threat/
_create_threat_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Output for the CreateThreat operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateThreatOutput {
7    /// <p>The unique identifier of the created threat.</p>
8    pub threat_id: ::std::string::String,
9    /// <p>The unique identifier of the threat model job the threat belongs to.</p>
10    pub threat_job_id: ::std::string::String,
11    /// <p>A short title summarizing the threat.</p>
12    pub title: ::std::option::Option<::std::string::String>,
13    /// <p>The natural-language threat statement.</p>
14    pub statement: ::std::option::Option<::std::string::String>,
15    /// <p>The severity level of the threat.</p>
16    pub severity: ::std::option::Option<crate::types::ThreatSeverity>,
17    /// <p>The current status of the threat.</p>
18    pub status: ::std::option::Option<crate::types::ThreatStatus>,
19    /// <p>Optional customer comment on the threat.</p>
20    pub comments: ::std::option::Option<::std::string::String>,
21    /// <p>The STRIDE categories applicable to this threat.</p>
22    pub stride: ::std::option::Option<::std::vec::Vec<crate::types::StrideCategory>>,
23    /// <p>The actor or origin of the threat.</p>
24    pub threat_source: ::std::option::Option<::std::string::String>,
25    /// <p>The conditions required for the threat to be exploitable.</p>
26    pub prerequisites: ::std::option::Option<::std::string::String>,
27    /// <p>What the threat source can do.</p>
28    pub threat_action: ::std::option::Option<::std::string::String>,
29    /// <p>The direct consequence of the threat action.</p>
30    pub threat_impact: ::std::option::Option<::std::string::String>,
31    /// <p>The security goals affected by the threat.</p>
32    pub impacted_goal: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
33    /// <p>The specific assets affected by the threat.</p>
34    pub impacted_assets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
35    /// <p>The DFD element this threat is anchored to.</p>
36    pub anchor: ::std::option::Option<crate::types::ThreatAnchorShape>,
37    /// <p>The source code files supporting the threat.</p>
38    pub evidence: ::std::option::Option<::std::vec::Vec<crate::types::ThreatEvidenceShape>>,
39    /// <p>The recommended mitigation guidance for this threat.</p>
40    pub recommendation: ::std::option::Option<::std::string::String>,
41    /// <p>Who created this threat.</p>
42    pub created_by: ::std::option::Option<crate::types::ThreatActor>,
43    /// <p>Who last updated this threat.</p>
44    pub updated_by: ::std::option::Option<crate::types::ThreatActor>,
45    /// <p>The date and time the threat was created, in UTC format.</p>
46    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
47    /// <p>The date and time the threat was last updated, in UTC format.</p>
48    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
49    _request_id: Option<String>,
50}
51impl CreateThreatOutput {
52    /// <p>The unique identifier of the created threat.</p>
53    pub fn threat_id(&self) -> &str {
54        use std::ops::Deref;
55        self.threat_id.deref()
56    }
57    /// <p>The unique identifier of the threat model job the threat belongs to.</p>
58    pub fn threat_job_id(&self) -> &str {
59        use std::ops::Deref;
60        self.threat_job_id.deref()
61    }
62    /// <p>A short title summarizing the threat.</p>
63    pub fn title(&self) -> ::std::option::Option<&str> {
64        self.title.as_deref()
65    }
66    /// <p>The natural-language threat statement.</p>
67    pub fn statement(&self) -> ::std::option::Option<&str> {
68        self.statement.as_deref()
69    }
70    /// <p>The severity level of the threat.</p>
71    pub fn severity(&self) -> ::std::option::Option<&crate::types::ThreatSeverity> {
72        self.severity.as_ref()
73    }
74    /// <p>The current status of the threat.</p>
75    pub fn status(&self) -> ::std::option::Option<&crate::types::ThreatStatus> {
76        self.status.as_ref()
77    }
78    /// <p>Optional customer comment on the threat.</p>
79    pub fn comments(&self) -> ::std::option::Option<&str> {
80        self.comments.as_deref()
81    }
82    /// <p>The STRIDE categories applicable to this threat.</p>
83    ///
84    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.stride.is_none()`.
85    pub fn stride(&self) -> &[crate::types::StrideCategory] {
86        self.stride.as_deref().unwrap_or_default()
87    }
88    /// <p>The actor or origin of the threat.</p>
89    pub fn threat_source(&self) -> ::std::option::Option<&str> {
90        self.threat_source.as_deref()
91    }
92    /// <p>The conditions required for the threat to be exploitable.</p>
93    pub fn prerequisites(&self) -> ::std::option::Option<&str> {
94        self.prerequisites.as_deref()
95    }
96    /// <p>What the threat source can do.</p>
97    pub fn threat_action(&self) -> ::std::option::Option<&str> {
98        self.threat_action.as_deref()
99    }
100    /// <p>The direct consequence of the threat action.</p>
101    pub fn threat_impact(&self) -> ::std::option::Option<&str> {
102        self.threat_impact.as_deref()
103    }
104    /// <p>The security goals affected by the threat.</p>
105    ///
106    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.impacted_goal.is_none()`.
107    pub fn impacted_goal(&self) -> &[::std::string::String] {
108        self.impacted_goal.as_deref().unwrap_or_default()
109    }
110    /// <p>The specific assets affected by the threat.</p>
111    ///
112    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.impacted_assets.is_none()`.
113    pub fn impacted_assets(&self) -> &[::std::string::String] {
114        self.impacted_assets.as_deref().unwrap_or_default()
115    }
116    /// <p>The DFD element this threat is anchored to.</p>
117    pub fn anchor(&self) -> ::std::option::Option<&crate::types::ThreatAnchorShape> {
118        self.anchor.as_ref()
119    }
120    /// <p>The source code files supporting the threat.</p>
121    ///
122    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.evidence.is_none()`.
123    pub fn evidence(&self) -> &[crate::types::ThreatEvidenceShape] {
124        self.evidence.as_deref().unwrap_or_default()
125    }
126    /// <p>The recommended mitigation guidance for this threat.</p>
127    pub fn recommendation(&self) -> ::std::option::Option<&str> {
128        self.recommendation.as_deref()
129    }
130    /// <p>Who created this threat.</p>
131    pub fn created_by(&self) -> ::std::option::Option<&crate::types::ThreatActor> {
132        self.created_by.as_ref()
133    }
134    /// <p>Who last updated this threat.</p>
135    pub fn updated_by(&self) -> ::std::option::Option<&crate::types::ThreatActor> {
136        self.updated_by.as_ref()
137    }
138    /// <p>The date and time the threat was created, in UTC format.</p>
139    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
140        self.created_at.as_ref()
141    }
142    /// <p>The date and time the threat was last updated, in UTC format.</p>
143    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
144        self.updated_at.as_ref()
145    }
146}
147impl ::aws_types::request_id::RequestId for CreateThreatOutput {
148    fn request_id(&self) -> Option<&str> {
149        self._request_id.as_deref()
150    }
151}
152impl CreateThreatOutput {
153    /// Creates a new builder-style object to manufacture [`CreateThreatOutput`](crate::operation::create_threat::CreateThreatOutput).
154    pub fn builder() -> crate::operation::create_threat::builders::CreateThreatOutputBuilder {
155        crate::operation::create_threat::builders::CreateThreatOutputBuilder::default()
156    }
157}
158
159/// A builder for [`CreateThreatOutput`](crate::operation::create_threat::CreateThreatOutput).
160#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
161#[non_exhaustive]
162pub struct CreateThreatOutputBuilder {
163    pub(crate) threat_id: ::std::option::Option<::std::string::String>,
164    pub(crate) threat_job_id: ::std::option::Option<::std::string::String>,
165    pub(crate) title: ::std::option::Option<::std::string::String>,
166    pub(crate) statement: ::std::option::Option<::std::string::String>,
167    pub(crate) severity: ::std::option::Option<crate::types::ThreatSeverity>,
168    pub(crate) status: ::std::option::Option<crate::types::ThreatStatus>,
169    pub(crate) comments: ::std::option::Option<::std::string::String>,
170    pub(crate) stride: ::std::option::Option<::std::vec::Vec<crate::types::StrideCategory>>,
171    pub(crate) threat_source: ::std::option::Option<::std::string::String>,
172    pub(crate) prerequisites: ::std::option::Option<::std::string::String>,
173    pub(crate) threat_action: ::std::option::Option<::std::string::String>,
174    pub(crate) threat_impact: ::std::option::Option<::std::string::String>,
175    pub(crate) impacted_goal: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
176    pub(crate) impacted_assets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
177    pub(crate) anchor: ::std::option::Option<crate::types::ThreatAnchorShape>,
178    pub(crate) evidence: ::std::option::Option<::std::vec::Vec<crate::types::ThreatEvidenceShape>>,
179    pub(crate) recommendation: ::std::option::Option<::std::string::String>,
180    pub(crate) created_by: ::std::option::Option<crate::types::ThreatActor>,
181    pub(crate) updated_by: ::std::option::Option<crate::types::ThreatActor>,
182    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
183    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
184    _request_id: Option<String>,
185}
186impl CreateThreatOutputBuilder {
187    /// <p>The unique identifier of the created threat.</p>
188    /// This field is required.
189    pub fn threat_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190        self.threat_id = ::std::option::Option::Some(input.into());
191        self
192    }
193    /// <p>The unique identifier of the created threat.</p>
194    pub fn set_threat_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195        self.threat_id = input;
196        self
197    }
198    /// <p>The unique identifier of the created threat.</p>
199    pub fn get_threat_id(&self) -> &::std::option::Option<::std::string::String> {
200        &self.threat_id
201    }
202    /// <p>The unique identifier of the threat model job the threat belongs to.</p>
203    /// This field is required.
204    pub fn threat_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.threat_job_id = ::std::option::Option::Some(input.into());
206        self
207    }
208    /// <p>The unique identifier of the threat model job the threat belongs to.</p>
209    pub fn set_threat_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.threat_job_id = input;
211        self
212    }
213    /// <p>The unique identifier of the threat model job the threat belongs to.</p>
214    pub fn get_threat_job_id(&self) -> &::std::option::Option<::std::string::String> {
215        &self.threat_job_id
216    }
217    /// <p>A short title summarizing the threat.</p>
218    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219        self.title = ::std::option::Option::Some(input.into());
220        self
221    }
222    /// <p>A short title summarizing the threat.</p>
223    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224        self.title = input;
225        self
226    }
227    /// <p>A short title summarizing the threat.</p>
228    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
229        &self.title
230    }
231    /// <p>The natural-language threat statement.</p>
232    pub fn statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233        self.statement = ::std::option::Option::Some(input.into());
234        self
235    }
236    /// <p>The natural-language threat statement.</p>
237    pub fn set_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238        self.statement = input;
239        self
240    }
241    /// <p>The natural-language threat statement.</p>
242    pub fn get_statement(&self) -> &::std::option::Option<::std::string::String> {
243        &self.statement
244    }
245    /// <p>The severity level of the threat.</p>
246    pub fn severity(mut self, input: crate::types::ThreatSeverity) -> Self {
247        self.severity = ::std::option::Option::Some(input);
248        self
249    }
250    /// <p>The severity level of the threat.</p>
251    pub fn set_severity(mut self, input: ::std::option::Option<crate::types::ThreatSeverity>) -> Self {
252        self.severity = input;
253        self
254    }
255    /// <p>The severity level of the threat.</p>
256    pub fn get_severity(&self) -> &::std::option::Option<crate::types::ThreatSeverity> {
257        &self.severity
258    }
259    /// <p>The current status of the threat.</p>
260    pub fn status(mut self, input: crate::types::ThreatStatus) -> Self {
261        self.status = ::std::option::Option::Some(input);
262        self
263    }
264    /// <p>The current status of the threat.</p>
265    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ThreatStatus>) -> Self {
266        self.status = input;
267        self
268    }
269    /// <p>The current status of the threat.</p>
270    pub fn get_status(&self) -> &::std::option::Option<crate::types::ThreatStatus> {
271        &self.status
272    }
273    /// <p>Optional customer comment on the threat.</p>
274    pub fn comments(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.comments = ::std::option::Option::Some(input.into());
276        self
277    }
278    /// <p>Optional customer comment on the threat.</p>
279    pub fn set_comments(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
280        self.comments = input;
281        self
282    }
283    /// <p>Optional customer comment on the threat.</p>
284    pub fn get_comments(&self) -> &::std::option::Option<::std::string::String> {
285        &self.comments
286    }
287    /// Appends an item to `stride`.
288    ///
289    /// To override the contents of this collection use [`set_stride`](Self::set_stride).
290    ///
291    /// <p>The STRIDE categories applicable to this threat.</p>
292    pub fn stride(mut self, input: crate::types::StrideCategory) -> Self {
293        let mut v = self.stride.unwrap_or_default();
294        v.push(input);
295        self.stride = ::std::option::Option::Some(v);
296        self
297    }
298    /// <p>The STRIDE categories applicable to this threat.</p>
299    pub fn set_stride(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StrideCategory>>) -> Self {
300        self.stride = input;
301        self
302    }
303    /// <p>The STRIDE categories applicable to this threat.</p>
304    pub fn get_stride(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StrideCategory>> {
305        &self.stride
306    }
307    /// <p>The actor or origin of the threat.</p>
308    pub fn threat_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
309        self.threat_source = ::std::option::Option::Some(input.into());
310        self
311    }
312    /// <p>The actor or origin of the threat.</p>
313    pub fn set_threat_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
314        self.threat_source = input;
315        self
316    }
317    /// <p>The actor or origin of the threat.</p>
318    pub fn get_threat_source(&self) -> &::std::option::Option<::std::string::String> {
319        &self.threat_source
320    }
321    /// <p>The conditions required for the threat to be exploitable.</p>
322    pub fn prerequisites(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323        self.prerequisites = ::std::option::Option::Some(input.into());
324        self
325    }
326    /// <p>The conditions required for the threat to be exploitable.</p>
327    pub fn set_prerequisites(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
328        self.prerequisites = input;
329        self
330    }
331    /// <p>The conditions required for the threat to be exploitable.</p>
332    pub fn get_prerequisites(&self) -> &::std::option::Option<::std::string::String> {
333        &self.prerequisites
334    }
335    /// <p>What the threat source can do.</p>
336    pub fn threat_action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337        self.threat_action = ::std::option::Option::Some(input.into());
338        self
339    }
340    /// <p>What the threat source can do.</p>
341    pub fn set_threat_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
342        self.threat_action = input;
343        self
344    }
345    /// <p>What the threat source can do.</p>
346    pub fn get_threat_action(&self) -> &::std::option::Option<::std::string::String> {
347        &self.threat_action
348    }
349    /// <p>The direct consequence of the threat action.</p>
350    pub fn threat_impact(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.threat_impact = ::std::option::Option::Some(input.into());
352        self
353    }
354    /// <p>The direct consequence of the threat action.</p>
355    pub fn set_threat_impact(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356        self.threat_impact = input;
357        self
358    }
359    /// <p>The direct consequence of the threat action.</p>
360    pub fn get_threat_impact(&self) -> &::std::option::Option<::std::string::String> {
361        &self.threat_impact
362    }
363    /// Appends an item to `impacted_goal`.
364    ///
365    /// To override the contents of this collection use [`set_impacted_goal`](Self::set_impacted_goal).
366    ///
367    /// <p>The security goals affected by the threat.</p>
368    pub fn impacted_goal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369        let mut v = self.impacted_goal.unwrap_or_default();
370        v.push(input.into());
371        self.impacted_goal = ::std::option::Option::Some(v);
372        self
373    }
374    /// <p>The security goals affected by the threat.</p>
375    pub fn set_impacted_goal(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
376        self.impacted_goal = input;
377        self
378    }
379    /// <p>The security goals affected by the threat.</p>
380    pub fn get_impacted_goal(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
381        &self.impacted_goal
382    }
383    /// Appends an item to `impacted_assets`.
384    ///
385    /// To override the contents of this collection use [`set_impacted_assets`](Self::set_impacted_assets).
386    ///
387    /// <p>The specific assets affected by the threat.</p>
388    pub fn impacted_assets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389        let mut v = self.impacted_assets.unwrap_or_default();
390        v.push(input.into());
391        self.impacted_assets = ::std::option::Option::Some(v);
392        self
393    }
394    /// <p>The specific assets affected by the threat.</p>
395    pub fn set_impacted_assets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
396        self.impacted_assets = input;
397        self
398    }
399    /// <p>The specific assets affected by the threat.</p>
400    pub fn get_impacted_assets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
401        &self.impacted_assets
402    }
403    /// <p>The DFD element this threat is anchored to.</p>
404    pub fn anchor(mut self, input: crate::types::ThreatAnchorShape) -> Self {
405        self.anchor = ::std::option::Option::Some(input);
406        self
407    }
408    /// <p>The DFD element this threat is anchored to.</p>
409    pub fn set_anchor(mut self, input: ::std::option::Option<crate::types::ThreatAnchorShape>) -> Self {
410        self.anchor = input;
411        self
412    }
413    /// <p>The DFD element this threat is anchored to.</p>
414    pub fn get_anchor(&self) -> &::std::option::Option<crate::types::ThreatAnchorShape> {
415        &self.anchor
416    }
417    /// Appends an item to `evidence`.
418    ///
419    /// To override the contents of this collection use [`set_evidence`](Self::set_evidence).
420    ///
421    /// <p>The source code files supporting the threat.</p>
422    pub fn evidence(mut self, input: crate::types::ThreatEvidenceShape) -> Self {
423        let mut v = self.evidence.unwrap_or_default();
424        v.push(input);
425        self.evidence = ::std::option::Option::Some(v);
426        self
427    }
428    /// <p>The source code files supporting the threat.</p>
429    pub fn set_evidence(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatEvidenceShape>>) -> Self {
430        self.evidence = input;
431        self
432    }
433    /// <p>The source code files supporting the threat.</p>
434    pub fn get_evidence(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatEvidenceShape>> {
435        &self.evidence
436    }
437    /// <p>The recommended mitigation guidance for this threat.</p>
438    pub fn recommendation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
439        self.recommendation = ::std::option::Option::Some(input.into());
440        self
441    }
442    /// <p>The recommended mitigation guidance for this threat.</p>
443    pub fn set_recommendation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
444        self.recommendation = input;
445        self
446    }
447    /// <p>The recommended mitigation guidance for this threat.</p>
448    pub fn get_recommendation(&self) -> &::std::option::Option<::std::string::String> {
449        &self.recommendation
450    }
451    /// <p>Who created this threat.</p>
452    pub fn created_by(mut self, input: crate::types::ThreatActor) -> Self {
453        self.created_by = ::std::option::Option::Some(input);
454        self
455    }
456    /// <p>Who created this threat.</p>
457    pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::ThreatActor>) -> Self {
458        self.created_by = input;
459        self
460    }
461    /// <p>Who created this threat.</p>
462    pub fn get_created_by(&self) -> &::std::option::Option<crate::types::ThreatActor> {
463        &self.created_by
464    }
465    /// <p>Who last updated this threat.</p>
466    pub fn updated_by(mut self, input: crate::types::ThreatActor) -> Self {
467        self.updated_by = ::std::option::Option::Some(input);
468        self
469    }
470    /// <p>Who last updated this threat.</p>
471    pub fn set_updated_by(mut self, input: ::std::option::Option<crate::types::ThreatActor>) -> Self {
472        self.updated_by = input;
473        self
474    }
475    /// <p>Who last updated this threat.</p>
476    pub fn get_updated_by(&self) -> &::std::option::Option<crate::types::ThreatActor> {
477        &self.updated_by
478    }
479    /// <p>The date and time the threat was created, in UTC format.</p>
480    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
481        self.created_at = ::std::option::Option::Some(input);
482        self
483    }
484    /// <p>The date and time the threat was created, in UTC format.</p>
485    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
486        self.created_at = input;
487        self
488    }
489    /// <p>The date and time the threat was created, in UTC format.</p>
490    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
491        &self.created_at
492    }
493    /// <p>The date and time the threat was last updated, in UTC format.</p>
494    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
495        self.updated_at = ::std::option::Option::Some(input);
496        self
497    }
498    /// <p>The date and time the threat was last updated, in UTC format.</p>
499    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
500        self.updated_at = input;
501        self
502    }
503    /// <p>The date and time the threat was last updated, in UTC format.</p>
504    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
505        &self.updated_at
506    }
507    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
508        self._request_id = Some(request_id.into());
509        self
510    }
511
512    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
513        self._request_id = request_id;
514        self
515    }
516    /// Consumes the builder and constructs a [`CreateThreatOutput`](crate::operation::create_threat::CreateThreatOutput).
517    /// This method will fail if any of the following fields are not set:
518    /// - [`threat_id`](crate::operation::create_threat::builders::CreateThreatOutputBuilder::threat_id)
519    /// - [`threat_job_id`](crate::operation::create_threat::builders::CreateThreatOutputBuilder::threat_job_id)
520    pub fn build(
521        self,
522    ) -> ::std::result::Result<crate::operation::create_threat::CreateThreatOutput, ::aws_smithy_types::error::operation::BuildError> {
523        ::std::result::Result::Ok(crate::operation::create_threat::CreateThreatOutput {
524            threat_id: self.threat_id.ok_or_else(|| {
525                ::aws_smithy_types::error::operation::BuildError::missing_field(
526                    "threat_id",
527                    "threat_id was not specified but it is required when building CreateThreatOutput",
528                )
529            })?,
530            threat_job_id: self.threat_job_id.ok_or_else(|| {
531                ::aws_smithy_types::error::operation::BuildError::missing_field(
532                    "threat_job_id",
533                    "threat_job_id was not specified but it is required when building CreateThreatOutput",
534                )
535            })?,
536            title: self.title,
537            statement: self.statement,
538            severity: self.severity,
539            status: self.status,
540            comments: self.comments,
541            stride: self.stride,
542            threat_source: self.threat_source,
543            prerequisites: self.prerequisites,
544            threat_action: self.threat_action,
545            threat_impact: self.threat_impact,
546            impacted_goal: self.impacted_goal,
547            impacted_assets: self.impacted_assets,
548            anchor: self.anchor,
549            evidence: self.evidence,
550            recommendation: self.recommendation,
551            created_by: self.created_by,
552            updated_by: self.updated_by,
553            created_at: self.created_at,
554            updated_at: self.updated_at,
555            _request_id: self._request_id,
556        })
557    }
558}