aws_sdk_codegurusecurity/operation/get_findings/
_get_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 GetFindingsInput {
6    /// <p>The name of the scan you want to retrieve findings from.</p>
7    pub scan_name: ::std::option::Option<::std::string::String>,
8    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the <code>nextToken</code> element is returned in the response. Use <code>nextToken</code> in a subsequent request to retrieve additional results. If not specified, returns 1000 results.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>The status of the findings you want to get. Pass either <code>Open</code>, <code>Closed</code>, or <code>All</code>.</p>
13    pub status: ::std::option::Option<crate::types::Status>,
14}
15impl GetFindingsInput {
16    /// <p>The name of the scan you want to retrieve findings from.</p>
17    pub fn scan_name(&self) -> ::std::option::Option<&str> {
18        self.scan_name.as_deref()
19    }
20    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
21    pub fn next_token(&self) -> ::std::option::Option<&str> {
22        self.next_token.as_deref()
23    }
24    /// <p>The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the <code>nextToken</code> element is returned in the response. Use <code>nextToken</code> in a subsequent request to retrieve additional results. If not specified, returns 1000 results.</p>
25    pub fn max_results(&self) -> ::std::option::Option<i32> {
26        self.max_results
27    }
28    /// <p>The status of the findings you want to get. Pass either <code>Open</code>, <code>Closed</code>, or <code>All</code>.</p>
29    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
30        self.status.as_ref()
31    }
32}
33impl GetFindingsInput {
34    /// Creates a new builder-style object to manufacture [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
35    pub fn builder() -> crate::operation::get_findings::builders::GetFindingsInputBuilder {
36        crate::operation::get_findings::builders::GetFindingsInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetFindingsInputBuilder {
44    pub(crate) scan_name: ::std::option::Option<::std::string::String>,
45    pub(crate) next_token: ::std::option::Option<::std::string::String>,
46    pub(crate) max_results: ::std::option::Option<i32>,
47    pub(crate) status: ::std::option::Option<crate::types::Status>,
48}
49impl GetFindingsInputBuilder {
50    /// <p>The name of the scan you want to retrieve findings from.</p>
51    /// This field is required.
52    pub fn scan_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.scan_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the scan you want to retrieve findings from.</p>
57    pub fn set_scan_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.scan_name = input;
59        self
60    }
61    /// <p>The name of the scan you want to retrieve findings from.</p>
62    pub fn get_scan_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.scan_name
64    }
65    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
66    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.next_token = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
71    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.next_token = input;
73        self
74    }
75    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
76    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
77        &self.next_token
78    }
79    /// <p>The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the <code>nextToken</code> element is returned in the response. Use <code>nextToken</code> in a subsequent request to retrieve additional results. If not specified, returns 1000 results.</p>
80    pub fn max_results(mut self, input: i32) -> Self {
81        self.max_results = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the <code>nextToken</code> element is returned in the response. Use <code>nextToken</code> in a subsequent request to retrieve additional results. If not specified, returns 1000 results.</p>
85    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
86        self.max_results = input;
87        self
88    }
89    /// <p>The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the <code>nextToken</code> element is returned in the response. Use <code>nextToken</code> in a subsequent request to retrieve additional results. If not specified, returns 1000 results.</p>
90    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
91        &self.max_results
92    }
93    /// <p>The status of the findings you want to get. Pass either <code>Open</code>, <code>Closed</code>, or <code>All</code>.</p>
94    pub fn status(mut self, input: crate::types::Status) -> Self {
95        self.status = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The status of the findings you want to get. Pass either <code>Open</code>, <code>Closed</code>, or <code>All</code>.</p>
99    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
100        self.status = input;
101        self
102    }
103    /// <p>The status of the findings you want to get. Pass either <code>Open</code>, <code>Closed</code>, or <code>All</code>.</p>
104    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
105        &self.status
106    }
107    /// Consumes the builder and constructs a [`GetFindingsInput`](crate::operation::get_findings::GetFindingsInput).
108    pub fn build(self) -> ::std::result::Result<crate::operation::get_findings::GetFindingsInput, ::aws_smithy_types::error::operation::BuildError> {
109        ::std::result::Result::Ok(crate::operation::get_findings::GetFindingsInput {
110            scan_name: self.scan_name,
111            next_token: self.next_token,
112            max_results: self.max_results,
113            status: self.status,
114        })
115    }
116}