aws-sdk-securityagent 1.1.0

AWS SDK for AWS Security Agent
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Input for ListFindings operation with filtering support
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListFindingsInput {
    /// Maximum number of findings to return in a single request (default: 50)
    pub max_results: ::std::option::Option<i32>,
    /// Identifier of the pentest job for which to retrieve associated findings
    pub pentest_job_id: ::std::option::Option<::std::string::String>,
    /// ID of the agent space where the pentest job exists
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// Token for pagination
    pub next_token: ::std::option::Option<::std::string::String>,
    /// Filter findings by risk type
    pub risk_type: ::std::option::Option<::std::string::String>,
    /// Filter findings by risk level
    pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
    /// Filter findings by status
    pub status: ::std::option::Option<crate::types::FindingStatus>,
    /// Filter findings by confidence level
    pub confidence: ::std::option::Option<crate::types::ConfidenceLevel>,
    /// Filter findings by name (case-insensitive substring search)
    pub name: ::std::option::Option<::std::string::String>,
}
impl ListFindingsInput {
    /// Maximum number of findings to return in a single request (default: 50)
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// Identifier of the pentest job for which to retrieve associated findings
    pub fn pentest_job_id(&self) -> ::std::option::Option<&str> {
        self.pentest_job_id.as_deref()
    }
    /// ID of the agent space where the pentest job exists
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// Token for pagination
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// Filter findings by risk type
    pub fn risk_type(&self) -> ::std::option::Option<&str> {
        self.risk_type.as_deref()
    }
    /// Filter findings by risk level
    pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
        self.risk_level.as_ref()
    }
    /// Filter findings by status
    pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
        self.status.as_ref()
    }
    /// Filter findings by confidence level
    pub fn confidence(&self) -> ::std::option::Option<&crate::types::ConfidenceLevel> {
        self.confidence.as_ref()
    }
    /// Filter findings by name (case-insensitive substring search)
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
}
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) max_results: ::std::option::Option<i32>,
    pub(crate) pentest_job_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) risk_type: ::std::option::Option<::std::string::String>,
    pub(crate) risk_level: ::std::option::Option<crate::types::RiskLevel>,
    pub(crate) status: ::std::option::Option<crate::types::FindingStatus>,
    pub(crate) confidence: ::std::option::Option<crate::types::ConfidenceLevel>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
}
impl ListFindingsInputBuilder {
    /// Maximum number of findings to return in a single request (default: 50)
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of findings to return in a single request (default: 50)
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Maximum number of findings to return in a single request (default: 50)
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Identifier of the pentest job for which to retrieve associated findings
    /// This field is required.
    pub fn pentest_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pentest_job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Identifier of the pentest job for which to retrieve associated findings
    pub fn set_pentest_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pentest_job_id = input;
        self
    }
    /// Identifier of the pentest job for which to retrieve associated findings
    pub fn get_pentest_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pentest_job_id
    }
    /// ID of the agent space where the pentest job exists
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// ID of the agent space where the pentest job exists
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// ID of the agent space where the pentest job exists
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Token for pagination
    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
    }
    /// Token for pagination
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Token for pagination
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Filter findings by risk type
    pub fn risk_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.risk_type = ::std::option::Option::Some(input.into());
        self
    }
    /// Filter findings by risk type
    pub fn set_risk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.risk_type = input;
        self
    }
    /// Filter findings by risk type
    pub fn get_risk_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.risk_type
    }
    /// Filter findings by risk level
    pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
        self.risk_level = ::std::option::Option::Some(input);
        self
    }
    /// Filter findings by risk level
    pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
        self.risk_level = input;
        self
    }
    /// Filter findings by risk level
    pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
        &self.risk_level
    }
    /// Filter findings by status
    pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Filter findings by status
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
        self.status = input;
        self
    }
    /// Filter findings by status
    pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
        &self.status
    }
    /// Filter findings by confidence level
    pub fn confidence(mut self, input: crate::types::ConfidenceLevel) -> Self {
        self.confidence = ::std::option::Option::Some(input);
        self
    }
    /// Filter findings by confidence level
    pub fn set_confidence(mut self, input: ::std::option::Option<crate::types::ConfidenceLevel>) -> Self {
        self.confidence = input;
        self
    }
    /// Filter findings by confidence level
    pub fn get_confidence(&self) -> &::std::option::Option<crate::types::ConfidenceLevel> {
        &self.confidence
    }
    /// Filter findings by name (case-insensitive substring search)
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// Filter findings by name (case-insensitive substring search)
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Filter findings by name (case-insensitive substring search)
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// 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 {
            max_results: self.max_results,
            pentest_job_id: self.pentest_job_id,
            agent_space_id: self.agent_space_id,
            next_token: self.next_token,
            risk_type: self.risk_type,
            risk_level: self.risk_level,
            status: self.status,
            confidence: self.confidence,
            name: self.name,
        })
    }
}