#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListFindingsInput {
pub analyzer_arn: ::std::option::Option<::std::string::String>,
pub filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>,
pub sort: ::std::option::Option<crate::types::SortCriteria>,
pub next_token: ::std::option::Option<::std::string::String>,
pub max_results: ::std::option::Option<i32>,
}
impl ListFindingsInput {
pub fn analyzer_arn(&self) -> ::std::option::Option<&str> {
self.analyzer_arn.as_deref()
}
pub fn filter(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Criterion>> {
self.filter.as_ref()
}
pub fn sort(&self) -> ::std::option::Option<&crate::types::SortCriteria> {
self.sort.as_ref()
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
}
impl ListFindingsInput {
pub fn builder() -> crate::operation::list_findings::builders::ListFindingsInputBuilder {
crate::operation::list_findings::builders::ListFindingsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListFindingsInputBuilder {
pub(crate) analyzer_arn: ::std::option::Option<::std::string::String>,
pub(crate) filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>,
pub(crate) sort: ::std::option::Option<crate::types::SortCriteria>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListFindingsInputBuilder {
pub fn analyzer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.analyzer_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_analyzer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.analyzer_arn = input;
self
}
pub fn get_analyzer_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.analyzer_arn
}
pub fn filter(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Criterion) -> Self {
let mut hash_map = self.filter.unwrap_or_default();
hash_map.insert(k.into(), v);
self.filter = ::std::option::Option::Some(hash_map);
self
}
pub fn set_filter(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>) -> Self {
self.filter = input;
self
}
pub fn get_filter(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>> {
&self.filter
}
pub fn sort(mut self, input: crate::types::SortCriteria) -> Self {
self.sort = ::std::option::Option::Some(input);
self
}
pub fn set_sort(mut self, input: ::std::option::Option<crate::types::SortCriteria>) -> Self {
self.sort = input;
self
}
pub fn get_sort(&self) -> &::std::option::Option<crate::types::SortCriteria> {
&self.sort
}
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_findings::ListFindingsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_findings::ListFindingsInput {
analyzer_arn: self.analyzer_arn,
filter: self.filter,
sort: self.sort,
next_token: self.next_token,
max_results: self.max_results,
})
}
}