aws_sdk_securityhub/operation/update_findings/
_update_findings_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateFindingsInput {
6    /// <p>A collection of attributes that specify which findings you want to update.</p>
7    pub filters: ::std::option::Option<crate::types::AwsSecurityFindingFilters>,
8    /// <p>The updated note for the finding.</p>
9    pub note: ::std::option::Option<crate::types::NoteUpdate>,
10    /// <p>The updated record state for the finding.</p>
11    pub record_state: ::std::option::Option<crate::types::RecordState>,
12}
13impl UpdateFindingsInput {
14    /// <p>A collection of attributes that specify which findings you want to update.</p>
15    pub fn filters(&self) -> ::std::option::Option<&crate::types::AwsSecurityFindingFilters> {
16        self.filters.as_ref()
17    }
18    /// <p>The updated note for the finding.</p>
19    pub fn note(&self) -> ::std::option::Option<&crate::types::NoteUpdate> {
20        self.note.as_ref()
21    }
22    /// <p>The updated record state for the finding.</p>
23    pub fn record_state(&self) -> ::std::option::Option<&crate::types::RecordState> {
24        self.record_state.as_ref()
25    }
26}
27impl UpdateFindingsInput {
28    /// Creates a new builder-style object to manufacture [`UpdateFindingsInput`](crate::operation::update_findings::UpdateFindingsInput).
29    pub fn builder() -> crate::operation::update_findings::builders::UpdateFindingsInputBuilder {
30        crate::operation::update_findings::builders::UpdateFindingsInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateFindingsInput`](crate::operation::update_findings::UpdateFindingsInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateFindingsInputBuilder {
38    pub(crate) filters: ::std::option::Option<crate::types::AwsSecurityFindingFilters>,
39    pub(crate) note: ::std::option::Option<crate::types::NoteUpdate>,
40    pub(crate) record_state: ::std::option::Option<crate::types::RecordState>,
41}
42impl UpdateFindingsInputBuilder {
43    /// <p>A collection of attributes that specify which findings you want to update.</p>
44    /// This field is required.
45    pub fn filters(mut self, input: crate::types::AwsSecurityFindingFilters) -> Self {
46        self.filters = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>A collection of attributes that specify which findings you want to update.</p>
50    pub fn set_filters(mut self, input: ::std::option::Option<crate::types::AwsSecurityFindingFilters>) -> Self {
51        self.filters = input;
52        self
53    }
54    /// <p>A collection of attributes that specify which findings you want to update.</p>
55    pub fn get_filters(&self) -> &::std::option::Option<crate::types::AwsSecurityFindingFilters> {
56        &self.filters
57    }
58    /// <p>The updated note for the finding.</p>
59    pub fn note(mut self, input: crate::types::NoteUpdate) -> Self {
60        self.note = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The updated note for the finding.</p>
64    pub fn set_note(mut self, input: ::std::option::Option<crate::types::NoteUpdate>) -> Self {
65        self.note = input;
66        self
67    }
68    /// <p>The updated note for the finding.</p>
69    pub fn get_note(&self) -> &::std::option::Option<crate::types::NoteUpdate> {
70        &self.note
71    }
72    /// <p>The updated record state for the finding.</p>
73    pub fn record_state(mut self, input: crate::types::RecordState) -> Self {
74        self.record_state = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The updated record state for the finding.</p>
78    pub fn set_record_state(mut self, input: ::std::option::Option<crate::types::RecordState>) -> Self {
79        self.record_state = input;
80        self
81    }
82    /// <p>The updated record state for the finding.</p>
83    pub fn get_record_state(&self) -> &::std::option::Option<crate::types::RecordState> {
84        &self.record_state
85    }
86    /// Consumes the builder and constructs a [`UpdateFindingsInput`](crate::operation::update_findings::UpdateFindingsInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::update_findings::UpdateFindingsInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_findings::UpdateFindingsInput {
91            filters: self.filters,
92            note: self.note,
93            record_state: self.record_state,
94        })
95    }
96}