aws_sdk_macie2/operation/get_findings/
_get_findings_input.rs

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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetFindingsInput {
    /// <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</p>
    pub finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The criteria for sorting the results of the request.</p>
    pub sort_criteria: ::std::option::Option<crate::types::SortCriteria>,
}
impl GetFindingsInput {
    /// <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</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 `.finding_ids.is_none()`.
    pub fn finding_ids(&self) -> &[::std::string::String] {
        self.finding_ids.as_deref().unwrap_or_default()
    }
    /// <p>The criteria for sorting the results of the request.</p>
    pub fn sort_criteria(&self) -> ::std::option::Option<&crate::types::SortCriteria> {
        self.sort_criteria.as_ref()
    }
}
impl GetFindingsInput {
    /// Creates a new builder-style object to manufacture [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
    pub fn builder() -> crate::operation::get_findings::builders::GetFindingsInputBuilder {
        crate::operation::get_findings::builders::GetFindingsInputBuilder::default()
    }
}

/// A builder for [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFindingsInputBuilder {
    pub(crate) finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) sort_criteria: ::std::option::Option<crate::types::SortCriteria>,
}
impl GetFindingsInputBuilder {
    /// Appends an item to `finding_ids`.
    ///
    /// To override the contents of this collection use [`set_finding_ids`](Self::set_finding_ids).
    ///
    /// <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</p>
    pub fn finding_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.finding_ids.unwrap_or_default();
        v.push(input.into());
        self.finding_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</p>
    pub fn set_finding_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.finding_ids = input;
        self
    }
    /// <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</p>
    pub fn get_finding_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.finding_ids
    }
    /// <p>The criteria for sorting the results of the request.</p>
    pub fn sort_criteria(mut self, input: crate::types::SortCriteria) -> Self {
        self.sort_criteria = ::std::option::Option::Some(input);
        self
    }
    /// <p>The criteria for sorting the results of the request.</p>
    pub fn set_sort_criteria(mut self, input: ::std::option::Option<crate::types::SortCriteria>) -> Self {
        self.sort_criteria = input;
        self
    }
    /// <p>The criteria for sorting the results of the request.</p>
    pub fn get_sort_criteria(&self) -> &::std::option::Option<crate::types::SortCriteria> {
        &self.sort_criteria
    }
    /// Consumes the builder and constructs a [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_findings::GetFindingsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_findings::GetFindingsInput {
            finding_ids: self.finding_ids,
            sort_criteria: self.sort_criteria,
        })
    }
}