aws-sdk-auditmanager 1.102.0

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

/// <p>A summary of the latest analytics data for all your active assessments.</p>
/// <p>This summary is a snapshot of the data that your active assessments collected on the <code>lastUpdated</code> date. It’s important to understand that the following totals are daily counts based on this date — they aren’t a total sum to date.</p>
/// <p>The <code>Insights</code> data is eventually consistent. This means that, when you read data from <code>Insights</code>, the response might not instantly reflect the results of a recently completed write or update operation. If you repeat your read request after a few hours, the response should return the latest data.</p><note>
/// <p>If you delete an assessment or change its status to inactive, <code>InsightsByAssessment</code> includes data for that assessment as follows.</p>
/// <ul>
/// <li>
/// <p><b>Inactive assessments</b> - If Audit Manager collected evidence for your assessment before you changed it inactive, that evidence is included in the <code>InsightsByAssessment</code> counts for that day.</p></li>
/// <li>
/// <p><b>Deleted assessments</b> - If Audit Manager collected evidence for your assessment before you deleted it, that evidence isn't included in the <code>InsightsByAssessment</code> counts for that day.</p></li>
/// </ul>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Insights {
    /// <p>The number of active assessments in Audit Manager.</p>
    pub active_assessments_count: ::std::option::Option<i32>,
    /// <p>The number of compliance check evidence that Audit Manager classified as non-compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Fail</i> ruling, or collected from Config with a <i>Non-compliant</i> ruling.</p>
    pub noncompliant_evidence_count: ::std::option::Option<i32>,
    /// <p>The number of compliance check evidence that Audit Manager classified as compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Pass</i> ruling, or collected from Config with a <i>Compliant</i> ruling.</p>
    pub compliant_evidence_count: ::std::option::Option<i32>,
    /// <p>The number of evidence without a compliance check ruling. Evidence is inconclusive when the associated control uses Security Hub or Config as a data source but you didn't enable those services. This is also the case when a control uses a data source that doesn’t support compliance checks (for example: manual evidence, API calls, or CloudTrail).</p><note>
    /// <p>If evidence has a compliance check status of <i>not applicable</i>, it's classed as <i>inconclusive</i> in <code>Insights</code> data.</p>
    /// </note>
    pub inconclusive_evidence_count: ::std::option::Option<i32>,
    /// <p>The number of assessment controls that collected non-compliant evidence on the <code>lastUpdated</code> date.</p>
    pub assessment_controls_count_by_noncompliant_evidence: ::std::option::Option<i32>,
    /// <p>The total number of controls across all active assessments.</p>
    pub total_assessment_controls_count: ::std::option::Option<i32>,
    /// <p>The time when the cross-assessment insights were last updated.</p>
    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Insights {
    /// <p>The number of active assessments in Audit Manager.</p>
    pub fn active_assessments_count(&self) -> ::std::option::Option<i32> {
        self.active_assessments_count
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as non-compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Fail</i> ruling, or collected from Config with a <i>Non-compliant</i> ruling.</p>
    pub fn noncompliant_evidence_count(&self) -> ::std::option::Option<i32> {
        self.noncompliant_evidence_count
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Pass</i> ruling, or collected from Config with a <i>Compliant</i> ruling.</p>
    pub fn compliant_evidence_count(&self) -> ::std::option::Option<i32> {
        self.compliant_evidence_count
    }
    /// <p>The number of evidence without a compliance check ruling. Evidence is inconclusive when the associated control uses Security Hub or Config as a data source but you didn't enable those services. This is also the case when a control uses a data source that doesn’t support compliance checks (for example: manual evidence, API calls, or CloudTrail).</p><note>
    /// <p>If evidence has a compliance check status of <i>not applicable</i>, it's classed as <i>inconclusive</i> in <code>Insights</code> data.</p>
    /// </note>
    pub fn inconclusive_evidence_count(&self) -> ::std::option::Option<i32> {
        self.inconclusive_evidence_count
    }
    /// <p>The number of assessment controls that collected non-compliant evidence on the <code>lastUpdated</code> date.</p>
    pub fn assessment_controls_count_by_noncompliant_evidence(&self) -> ::std::option::Option<i32> {
        self.assessment_controls_count_by_noncompliant_evidence
    }
    /// <p>The total number of controls across all active assessments.</p>
    pub fn total_assessment_controls_count(&self) -> ::std::option::Option<i32> {
        self.total_assessment_controls_count
    }
    /// <p>The time when the cross-assessment insights were last updated.</p>
    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated.as_ref()
    }
}
impl Insights {
    /// Creates a new builder-style object to manufacture [`Insights`](crate::types::Insights).
    pub fn builder() -> crate::types::builders::InsightsBuilder {
        crate::types::builders::InsightsBuilder::default()
    }
}

/// A builder for [`Insights`](crate::types::Insights).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InsightsBuilder {
    pub(crate) active_assessments_count: ::std::option::Option<i32>,
    pub(crate) noncompliant_evidence_count: ::std::option::Option<i32>,
    pub(crate) compliant_evidence_count: ::std::option::Option<i32>,
    pub(crate) inconclusive_evidence_count: ::std::option::Option<i32>,
    pub(crate) assessment_controls_count_by_noncompliant_evidence: ::std::option::Option<i32>,
    pub(crate) total_assessment_controls_count: ::std::option::Option<i32>,
    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl InsightsBuilder {
    /// <p>The number of active assessments in Audit Manager.</p>
    pub fn active_assessments_count(mut self, input: i32) -> Self {
        self.active_assessments_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of active assessments in Audit Manager.</p>
    pub fn set_active_assessments_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.active_assessments_count = input;
        self
    }
    /// <p>The number of active assessments in Audit Manager.</p>
    pub fn get_active_assessments_count(&self) -> &::std::option::Option<i32> {
        &self.active_assessments_count
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as non-compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Fail</i> ruling, or collected from Config with a <i>Non-compliant</i> ruling.</p>
    pub fn noncompliant_evidence_count(mut self, input: i32) -> Self {
        self.noncompliant_evidence_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as non-compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Fail</i> ruling, or collected from Config with a <i>Non-compliant</i> ruling.</p>
    pub fn set_noncompliant_evidence_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.noncompliant_evidence_count = input;
        self
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as non-compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Fail</i> ruling, or collected from Config with a <i>Non-compliant</i> ruling.</p>
    pub fn get_noncompliant_evidence_count(&self) -> &::std::option::Option<i32> {
        &self.noncompliant_evidence_count
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Pass</i> ruling, or collected from Config with a <i>Compliant</i> ruling.</p>
    pub fn compliant_evidence_count(mut self, input: i32) -> Self {
        self.compliant_evidence_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Pass</i> ruling, or collected from Config with a <i>Compliant</i> ruling.</p>
    pub fn set_compliant_evidence_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.compliant_evidence_count = input;
        self
    }
    /// <p>The number of compliance check evidence that Audit Manager classified as compliant on the <code>lastUpdated</code> date. This includes evidence that was collected from Security Hub with a <i>Pass</i> ruling, or collected from Config with a <i>Compliant</i> ruling.</p>
    pub fn get_compliant_evidence_count(&self) -> &::std::option::Option<i32> {
        &self.compliant_evidence_count
    }
    /// <p>The number of evidence without a compliance check ruling. Evidence is inconclusive when the associated control uses Security Hub or Config as a data source but you didn't enable those services. This is also the case when a control uses a data source that doesn’t support compliance checks (for example: manual evidence, API calls, or CloudTrail).</p><note>
    /// <p>If evidence has a compliance check status of <i>not applicable</i>, it's classed as <i>inconclusive</i> in <code>Insights</code> data.</p>
    /// </note>
    pub fn inconclusive_evidence_count(mut self, input: i32) -> Self {
        self.inconclusive_evidence_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of evidence without a compliance check ruling. Evidence is inconclusive when the associated control uses Security Hub or Config as a data source but you didn't enable those services. This is also the case when a control uses a data source that doesn’t support compliance checks (for example: manual evidence, API calls, or CloudTrail).</p><note>
    /// <p>If evidence has a compliance check status of <i>not applicable</i>, it's classed as <i>inconclusive</i> in <code>Insights</code> data.</p>
    /// </note>
    pub fn set_inconclusive_evidence_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inconclusive_evidence_count = input;
        self
    }
    /// <p>The number of evidence without a compliance check ruling. Evidence is inconclusive when the associated control uses Security Hub or Config as a data source but you didn't enable those services. This is also the case when a control uses a data source that doesn’t support compliance checks (for example: manual evidence, API calls, or CloudTrail).</p><note>
    /// <p>If evidence has a compliance check status of <i>not applicable</i>, it's classed as <i>inconclusive</i> in <code>Insights</code> data.</p>
    /// </note>
    pub fn get_inconclusive_evidence_count(&self) -> &::std::option::Option<i32> {
        &self.inconclusive_evidence_count
    }
    /// <p>The number of assessment controls that collected non-compliant evidence on the <code>lastUpdated</code> date.</p>
    pub fn assessment_controls_count_by_noncompliant_evidence(mut self, input: i32) -> Self {
        self.assessment_controls_count_by_noncompliant_evidence = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of assessment controls that collected non-compliant evidence on the <code>lastUpdated</code> date.</p>
    pub fn set_assessment_controls_count_by_noncompliant_evidence(mut self, input: ::std::option::Option<i32>) -> Self {
        self.assessment_controls_count_by_noncompliant_evidence = input;
        self
    }
    /// <p>The number of assessment controls that collected non-compliant evidence on the <code>lastUpdated</code> date.</p>
    pub fn get_assessment_controls_count_by_noncompliant_evidence(&self) -> &::std::option::Option<i32> {
        &self.assessment_controls_count_by_noncompliant_evidence
    }
    /// <p>The total number of controls across all active assessments.</p>
    pub fn total_assessment_controls_count(mut self, input: i32) -> Self {
        self.total_assessment_controls_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of controls across all active assessments.</p>
    pub fn set_total_assessment_controls_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.total_assessment_controls_count = input;
        self
    }
    /// <p>The total number of controls across all active assessments.</p>
    pub fn get_total_assessment_controls_count(&self) -> &::std::option::Option<i32> {
        &self.total_assessment_controls_count
    }
    /// <p>The time when the cross-assessment insights were last updated.</p>
    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the cross-assessment insights were last updated.</p>
    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated = input;
        self
    }
    /// <p>The time when the cross-assessment insights were last updated.</p>
    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated
    }
    /// Consumes the builder and constructs a [`Insights`](crate::types::Insights).
    pub fn build(self) -> crate::types::Insights {
        crate::types::Insights {
            active_assessments_count: self.active_assessments_count,
            noncompliant_evidence_count: self.noncompliant_evidence_count,
            compliant_evidence_count: self.compliant_evidence_count,
            inconclusive_evidence_count: self.inconclusive_evidence_count,
            assessment_controls_count_by_noncompliant_evidence: self.assessment_controls_count_by_noncompliant_evidence,
            total_assessment_controls_count: self.total_assessment_controls_count,
            last_updated: self.last_updated,
        }
    }
}