aws-sdk-macie2 1.95.0

AWS SDK for Amazon Macie 2
Documentation
// 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 ListFindingsInput {
    /// <p>The criteria to use to filter the results.</p>
    pub finding_criteria: ::std::option::Option<crate::types::FindingCriteria>,
    /// <p>The maximum number of items to include in each page of the response.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The criteria to use to sort the results.</p>
    pub sort_criteria: ::std::option::Option<crate::types::SortCriteria>,
}
impl ListFindingsInput {
    /// <p>The criteria to use to filter the results.</p>
    pub fn finding_criteria(&self) -> ::std::option::Option<&crate::types::FindingCriteria> {
        self.finding_criteria.as_ref()
    }
    /// <p>The maximum number of items to include in each page of the response.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The criteria to use to sort the results.</p>
    pub fn sort_criteria(&self) -> ::std::option::Option<&crate::types::SortCriteria> {
        self.sort_criteria.as_ref()
    }
}
impl ListFindingsInput {
    /// Creates a new builder-style object to manufacture [`ListFindingsInput`](crate::operation::list_findings::ListFindingsInput).
    pub fn builder() -> crate::operation::list_findings::builders::ListFindingsInputBuilder {
        crate::operation::list_findings::builders::ListFindingsInputBuilder::default()
    }
}

/// A builder for [`ListFindingsInput`](crate::operation::list_findings::ListFindingsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListFindingsInputBuilder {
    pub(crate) finding_criteria: ::std::option::Option<crate::types::FindingCriteria>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) sort_criteria: ::std::option::Option<crate::types::SortCriteria>,
}
impl ListFindingsInputBuilder {
    /// <p>The criteria to use to filter the results.</p>
    pub fn finding_criteria(mut self, input: crate::types::FindingCriteria) -> Self {
        self.finding_criteria = ::std::option::Option::Some(input);
        self
    }
    /// <p>The criteria to use to filter the results.</p>
    pub fn set_finding_criteria(mut self, input: ::std::option::Option<crate::types::FindingCriteria>) -> Self {
        self.finding_criteria = input;
        self
    }
    /// <p>The criteria to use to filter the results.</p>
    pub fn get_finding_criteria(&self) -> &::std::option::Option<crate::types::FindingCriteria> {
        &self.finding_criteria
    }
    /// <p>The maximum number of items to include in each page of the response.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of items to include in each page of the response.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of items to include in each page of the response.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
    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
    }
    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The nextToken string that specifies which page of results to return in a paginated response.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The criteria to use to sort the results.</p>
    pub fn sort_criteria(mut self, input: crate::types::SortCriteria) -> Self {
        self.sort_criteria = ::std::option::Option::Some(input);
        self
    }
    /// <p>The criteria to use to sort the results.</p>
    pub fn set_sort_criteria(mut self, input: ::std::option::Option<crate::types::SortCriteria>) -> Self {
        self.sort_criteria = input;
        self
    }
    /// <p>The criteria to use to sort the results.</p>
    pub fn get_sort_criteria(&self) -> &::std::option::Option<crate::types::SortCriteria> {
        &self.sort_criteria
    }
    /// Consumes the builder and constructs a [`ListFindingsInput`](crate::operation::list_findings::ListFindingsInput).
    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 {
            finding_criteria: self.finding_criteria,
            max_results: self.max_results,
            next_token: self.next_token,
            sort_criteria: self.sort_criteria,
        })
    }
}