aws-sdk-securityagent 1.2.0

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

/// <p>Input for ListFindings operation with filtering support.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListFindingsInput {
    /// <p>The maximum number of results to return in a single call.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The unique identifier of the pentest job to list findings for.</p>
    pub pentest_job_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the agent space.</p>
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// <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 nextToken value returned from the previous request.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Filter findings by risk type.</p>
    pub risk_type: ::std::option::Option<::std::string::String>,
    /// <p>Filter findings by risk level.</p>
    pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
    /// <p>Filter findings by status.</p>
    pub status: ::std::option::Option<crate::types::FindingStatus>,
    /// <p>Filter findings by confidence level.</p>
    pub confidence: ::std::option::Option<crate::types::ConfidenceLevel>,
    /// <p>Filter findings by name.</p>
    pub name: ::std::option::Option<::std::string::String>,
}
impl ListFindingsInput {
    /// <p>The maximum number of results to return in a single call.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The unique identifier of the pentest job to list findings for.</p>
    pub fn pentest_job_id(&self) -> ::std::option::Option<&str> {
        self.pentest_job_id.as_deref()
    }
    /// <p>The unique identifier of the agent space.</p>
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// <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 nextToken value returned from the previous request.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Filter findings by risk type.</p>
    pub fn risk_type(&self) -> ::std::option::Option<&str> {
        self.risk_type.as_deref()
    }
    /// <p>Filter findings by risk level.</p>
    pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
        self.risk_level.as_ref()
    }
    /// <p>Filter findings by status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
        self.status.as_ref()
    }
    /// <p>Filter findings by confidence level.</p>
    pub fn confidence(&self) -> ::std::option::Option<&crate::types::ConfidenceLevel> {
        self.confidence.as_ref()
    }
    /// <p>Filter findings by name.</p>
    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 {
    /// <p>The maximum number of results to return in a single call.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return in a single call.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return in a single call.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The unique identifier of the pentest job to list findings for.</p>
    /// 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
    }
    /// <p>The unique identifier of the pentest job to list findings for.</p>
    pub fn set_pentest_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pentest_job_id = input;
        self
    }
    /// <p>The unique identifier of the pentest job to list findings for.</p>
    pub fn get_pentest_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pentest_job_id
    }
    /// <p>The unique identifier of the agent space.</p>
    /// 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
    }
    /// <p>The unique identifier of the agent space.</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier of the agent space.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <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 nextToken value returned from the previous request.</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>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 nextToken value returned from the previous request.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <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 nextToken value returned from the previous request.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Filter findings by risk type.</p>
    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
    }
    /// <p>Filter findings by risk type.</p>
    pub fn set_risk_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.risk_type = input;
        self
    }
    /// <p>Filter findings by risk type.</p>
    pub fn get_risk_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.risk_type
    }
    /// <p>Filter findings by risk level.</p>
    pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
        self.risk_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter findings by risk level.</p>
    pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
        self.risk_level = input;
        self
    }
    /// <p>Filter findings by risk level.</p>
    pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
        &self.risk_level
    }
    /// <p>Filter findings by status.</p>
    pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter findings by status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Filter findings by status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
        &self.status
    }
    /// <p>Filter findings by confidence level.</p>
    pub fn confidence(mut self, input: crate::types::ConfidenceLevel) -> Self {
        self.confidence = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter findings by confidence level.</p>
    pub fn set_confidence(mut self, input: ::std::option::Option<crate::types::ConfidenceLevel>) -> Self {
        self.confidence = input;
        self
    }
    /// <p>Filter findings by confidence level.</p>
    pub fn get_confidence(&self) -> &::std::option::Option<crate::types::ConfidenceLevel> {
        &self.confidence
    }
    /// <p>Filter findings by name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filter findings by name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Filter findings by name.</p>
    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,
        })
    }
}