Skip to main content

aws_sdk_securityagent/operation/update_finding/
_update_finding_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Input for updating an existing security finding.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateFindingInput {
7    /// <p>The unique identifier of the finding to update.</p>
8    pub finding_id: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the agent space that contains the finding.</p>
10    pub agent_space_id: ::std::option::Option<::std::string::String>,
11    /// <p>The updated name for the finding.</p>
12    pub name: ::std::option::Option<::std::string::String>,
13    /// <p>The updated description for the finding.</p>
14    pub description: ::std::option::Option<::std::string::String>,
15    /// <p>The updated risk type for the finding.</p>
16    pub risk_type: ::std::option::Option<::std::string::String>,
17    /// <p>The updated risk level for the finding.</p>
18    pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
19    /// <p>The updated numerical risk score for the finding.</p>
20    pub risk_score: ::std::option::Option<::std::string::String>,
21    /// <p>The updated attack script for the finding.</p>
22    pub attack_script: ::std::option::Option<::std::string::String>,
23    /// <p>The updated reasoning for the finding.</p>
24    pub reasoning: ::std::option::Option<::std::string::String>,
25    /// <p>The updated status for the finding.</p>
26    pub status: ::std::option::Option<crate::types::FindingStatus>,
27    /// <p>A customer-provided note on the finding.</p>
28    pub customer_note: ::std::option::Option<::std::string::String>,
29}
30impl UpdateFindingInput {
31    /// <p>The unique identifier of the finding to update.</p>
32    pub fn finding_id(&self) -> ::std::option::Option<&str> {
33        self.finding_id.as_deref()
34    }
35    /// <p>The unique identifier of the agent space that contains the finding.</p>
36    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
37        self.agent_space_id.as_deref()
38    }
39    /// <p>The updated name for the finding.</p>
40    pub fn name(&self) -> ::std::option::Option<&str> {
41        self.name.as_deref()
42    }
43    /// <p>The updated description for the finding.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>The updated risk type for the finding.</p>
48    pub fn risk_type(&self) -> ::std::option::Option<&str> {
49        self.risk_type.as_deref()
50    }
51    /// <p>The updated risk level for the finding.</p>
52    pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
53        self.risk_level.as_ref()
54    }
55    /// <p>The updated numerical risk score for the finding.</p>
56    pub fn risk_score(&self) -> ::std::option::Option<&str> {
57        self.risk_score.as_deref()
58    }
59    /// <p>The updated attack script for the finding.</p>
60    pub fn attack_script(&self) -> ::std::option::Option<&str> {
61        self.attack_script.as_deref()
62    }
63    /// <p>The updated reasoning for the finding.</p>
64    pub fn reasoning(&self) -> ::std::option::Option<&str> {
65        self.reasoning.as_deref()
66    }
67    /// <p>The updated status for the finding.</p>
68    pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
69        self.status.as_ref()
70    }
71    /// <p>A customer-provided note on the finding.</p>
72    pub fn customer_note(&self) -> ::std::option::Option<&str> {
73        self.customer_note.as_deref()
74    }
75}
76impl UpdateFindingInput {
77    /// Creates a new builder-style object to manufacture [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
78    pub fn builder() -> crate::operation::update_finding::builders::UpdateFindingInputBuilder {
79        crate::operation::update_finding::builders::UpdateFindingInputBuilder::default()
80    }
81}
82
83/// A builder for [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
84#[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    /// <p>The unique identifier of the finding to update.</p>
101    /// This field is required.
102    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    /// <p>The unique identifier of the finding to update.</p>
107    pub fn set_finding_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.finding_id = input;
109        self
110    }
111    /// <p>The unique identifier of the finding to update.</p>
112    pub fn get_finding_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.finding_id
114    }
115    /// <p>The unique identifier of the agent space that contains the finding.</p>
116    /// This field is required.
117    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    /// <p>The unique identifier of the agent space that contains the finding.</p>
122    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    /// <p>The unique identifier of the agent space that contains the finding.</p>
127    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.agent_space_id
129    }
130    /// <p>The updated name for the finding.</p>
131    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    /// <p>The updated name for the finding.</p>
136    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.name = input;
138        self
139    }
140    /// <p>The updated name for the finding.</p>
141    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142        &self.name
143    }
144    /// <p>The updated description for the finding.</p>
145    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    /// <p>The updated description for the finding.</p>
150    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.description = input;
152        self
153    }
154    /// <p>The updated description for the finding.</p>
155    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156        &self.description
157    }
158    /// <p>The updated risk type for the finding.</p>
159    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    /// <p>The updated risk type for the finding.</p>
164    pub fn set_risk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.risk_type = input;
166        self
167    }
168    /// <p>The updated risk type for the finding.</p>
169    pub fn get_risk_type(&self) -> &::std::option::Option<::std::string::String> {
170        &self.risk_type
171    }
172    /// <p>The updated risk level for the finding.</p>
173    pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
174        self.risk_level = ::std::option::Option::Some(input);
175        self
176    }
177    /// <p>The updated risk level for the finding.</p>
178    pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
179        self.risk_level = input;
180        self
181    }
182    /// <p>The updated risk level for the finding.</p>
183    pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
184        &self.risk_level
185    }
186    /// <p>The updated numerical risk score for the finding.</p>
187    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    /// <p>The updated numerical risk score for the finding.</p>
192    pub fn set_risk_score(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.risk_score = input;
194        self
195    }
196    /// <p>The updated numerical risk score for the finding.</p>
197    pub fn get_risk_score(&self) -> &::std::option::Option<::std::string::String> {
198        &self.risk_score
199    }
200    /// <p>The updated attack script for the finding.</p>
201    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    /// <p>The updated attack script for the finding.</p>
206    pub fn set_attack_script(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.attack_script = input;
208        self
209    }
210    /// <p>The updated attack script for the finding.</p>
211    pub fn get_attack_script(&self) -> &::std::option::Option<::std::string::String> {
212        &self.attack_script
213    }
214    /// <p>The updated reasoning for the finding.</p>
215    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    /// <p>The updated reasoning for the finding.</p>
220    pub fn set_reasoning(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.reasoning = input;
222        self
223    }
224    /// <p>The updated reasoning for the finding.</p>
225    pub fn get_reasoning(&self) -> &::std::option::Option<::std::string::String> {
226        &self.reasoning
227    }
228    /// <p>The updated status for the finding.</p>
229    pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
230        self.status = ::std::option::Option::Some(input);
231        self
232    }
233    /// <p>The updated status for the finding.</p>
234    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
235        self.status = input;
236        self
237    }
238    /// <p>The updated status for the finding.</p>
239    pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
240        &self.status
241    }
242    /// <p>A customer-provided note on the finding.</p>
243    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    /// <p>A customer-provided note on the finding.</p>
248    pub fn set_customer_note(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.customer_note = input;
250        self
251    }
252    /// <p>A customer-provided note on the finding.</p>
253    pub fn get_customer_note(&self) -> &::std::option::Option<::std::string::String> {
254        &self.customer_note
255    }
256    /// Consumes the builder and constructs a [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
257    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}