/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.auditmanager.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A summary of the latest analytics data for a specific active assessment. *
*
* This summary is a snapshot of the data that was collected on the lastUpdated
date. It’s important to
* understand that the totals in InsightsByAssessment
are daily counts based on this date — they aren’t a
* total sum to date.
*
* The InsightsByAssessment
data is eventually consistent. This means that when you read data from
* InsightsByAssessment
, 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 returns the latest data.
*
* If you delete an assessment or change its status to inactive, InsightsByAssessment
includes data for
* that assessment as follows.
*
* Inactive assessments - If Audit Manager collected evidence for your assessment before you changed it inactive,
* that evidence is included in the InsightsByAssessment
counts for that day.
*
* Deleted assessments - If Audit Manager collected evidence for your assessment before you deleted it, that
* evidence isn't included in the InsightsByAssessment
counts for that day.
*
* The number of compliance check evidence that Audit Manager classified as non-compliant. This includes evidence * that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. *
*/ private Integer noncompliantEvidenceCount; /** ** The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence that * was collected from Security Hub with a Pass ruling, or collected from Config with a Compliant * ruling. *
*/ private Integer compliantEvidenceCount; /** ** The amount of evidence without a compliance check ruling. Evidence is inconclusive if the associated control uses * Security Hub or Config as a data source and you didn't enable those services. This is also the case if a control * uses a data source that doesn’t support compliance checks (for example, manual evidence, API calls, or * CloudTrail). *
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive in
* InsightsByAssessment
data.
*
* The number of assessment controls that collected non-compliant evidence on the lastUpdated
date.
*
* The total number of controls in the assessment. *
*/ private Integer totalAssessmentControlsCount; /** ** The time when the assessment insights were last updated. *
*/ private java.util.Date lastUpdated; /** ** The number of compliance check evidence that Audit Manager classified as non-compliant. This includes evidence * that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. *
* * @param noncompliantEvidenceCount * The number of compliance check evidence that Audit Manager classified as non-compliant. This includes * evidence that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. */ public void setNoncompliantEvidenceCount(Integer noncompliantEvidenceCount) { this.noncompliantEvidenceCount = noncompliantEvidenceCount; } /** ** The number of compliance check evidence that Audit Manager classified as non-compliant. This includes evidence * that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. *
* * @return The number of compliance check evidence that Audit Manager classified as non-compliant. This includes * evidence that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. */ public Integer getNoncompliantEvidenceCount() { return this.noncompliantEvidenceCount; } /** ** The number of compliance check evidence that Audit Manager classified as non-compliant. This includes evidence * that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. *
* * @param noncompliantEvidenceCount * The number of compliance check evidence that Audit Manager classified as non-compliant. This includes * evidence that was collected from Security Hub with a Fail ruling, or collected from Config with a * Non-compliant ruling. * @return Returns a reference to this object so that method calls can be chained together. */ public InsightsByAssessment withNoncompliantEvidenceCount(Integer noncompliantEvidenceCount) { setNoncompliantEvidenceCount(noncompliantEvidenceCount); return this; } /** ** The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence that * was collected from Security Hub with a Pass ruling, or collected from Config with a Compliant * ruling. *
* * @param compliantEvidenceCount * The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence * that was collected from Security Hub with a Pass ruling, or collected from Config with a * Compliant ruling. */ public void setCompliantEvidenceCount(Integer compliantEvidenceCount) { this.compliantEvidenceCount = compliantEvidenceCount; } /** ** The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence that * was collected from Security Hub with a Pass ruling, or collected from Config with a Compliant * ruling. *
* * @return The number of compliance check evidence that Audit Manager classified as compliant. This includes * evidence that was collected from Security Hub with a Pass ruling, or collected from Config with a * Compliant ruling. */ public Integer getCompliantEvidenceCount() { return this.compliantEvidenceCount; } /** ** The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence that * was collected from Security Hub with a Pass ruling, or collected from Config with a Compliant * ruling. *
* * @param compliantEvidenceCount * The number of compliance check evidence that Audit Manager classified as compliant. This includes evidence * that was collected from Security Hub with a Pass ruling, or collected from Config with a * Compliant ruling. * @return Returns a reference to this object so that method calls can be chained together. */ public InsightsByAssessment withCompliantEvidenceCount(Integer compliantEvidenceCount) { setCompliantEvidenceCount(compliantEvidenceCount); return this; } /** ** The amount of evidence without a compliance check ruling. Evidence is inconclusive if the associated control uses * Security Hub or Config as a data source and you didn't enable those services. This is also the case if a control * uses a data source that doesn’t support compliance checks (for example, manual evidence, API calls, or * CloudTrail). *
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive in
* InsightsByAssessment
data.
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive
* in InsightsByAssessment
data.
*
* The amount of evidence without a compliance check ruling. Evidence is inconclusive if the associated control uses * Security Hub or Config as a data source and you didn't enable those services. This is also the case if a control * uses a data source that doesn’t support compliance checks (for example, manual evidence, API calls, or * CloudTrail). *
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive in
* InsightsByAssessment
data.
*
* If evidence has a compliance check status of not applicable, it's classified as
* inconclusive in InsightsByAssessment
data.
*
* The amount of evidence without a compliance check ruling. Evidence is inconclusive if the associated control uses * Security Hub or Config as a data source and you didn't enable those services. This is also the case if a control * uses a data source that doesn’t support compliance checks (for example, manual evidence, API calls, or * CloudTrail). *
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive in
* InsightsByAssessment
data.
*
* If evidence has a compliance check status of not applicable, it's classified as inconclusive
* in InsightsByAssessment
data.
*
* The number of assessment controls that collected non-compliant evidence on the lastUpdated
date.
*
lastUpdated
* date.
*/
public void setAssessmentControlsCountByNoncompliantEvidence(Integer assessmentControlsCountByNoncompliantEvidence) {
this.assessmentControlsCountByNoncompliantEvidence = assessmentControlsCountByNoncompliantEvidence;
}
/**
*
* The number of assessment controls that collected non-compliant evidence on the lastUpdated
date.
*
lastUpdated
* date.
*/
public Integer getAssessmentControlsCountByNoncompliantEvidence() {
return this.assessmentControlsCountByNoncompliantEvidence;
}
/**
*
* The number of assessment controls that collected non-compliant evidence on the lastUpdated
date.
*
lastUpdated
* date.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightsByAssessment withAssessmentControlsCountByNoncompliantEvidence(Integer assessmentControlsCountByNoncompliantEvidence) {
setAssessmentControlsCountByNoncompliantEvidence(assessmentControlsCountByNoncompliantEvidence);
return this;
}
/**
* * The total number of controls in the assessment. *
* * @param totalAssessmentControlsCount * The total number of controls in the assessment. */ public void setTotalAssessmentControlsCount(Integer totalAssessmentControlsCount) { this.totalAssessmentControlsCount = totalAssessmentControlsCount; } /** ** The total number of controls in the assessment. *
* * @return The total number of controls in the assessment. */ public Integer getTotalAssessmentControlsCount() { return this.totalAssessmentControlsCount; } /** ** The total number of controls in the assessment. *
* * @param totalAssessmentControlsCount * The total number of controls in the assessment. * @return Returns a reference to this object so that method calls can be chained together. */ public InsightsByAssessment withTotalAssessmentControlsCount(Integer totalAssessmentControlsCount) { setTotalAssessmentControlsCount(totalAssessmentControlsCount); return this; } /** ** The time when the assessment insights were last updated. *
* * @param lastUpdated * The time when the assessment insights were last updated. */ public void setLastUpdated(java.util.Date lastUpdated) { this.lastUpdated = lastUpdated; } /** ** The time when the assessment insights were last updated. *
* * @return The time when the assessment insights were last updated. */ public java.util.Date getLastUpdated() { return this.lastUpdated; } /** ** The time when the assessment insights were last updated. *
* * @param lastUpdated * The time when the assessment insights were last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public InsightsByAssessment withLastUpdated(java.util.Date lastUpdated) { setLastUpdated(lastUpdated); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getNoncompliantEvidenceCount() != null) sb.append("NoncompliantEvidenceCount: ").append(getNoncompliantEvidenceCount()).append(","); if (getCompliantEvidenceCount() != null) sb.append("CompliantEvidenceCount: ").append(getCompliantEvidenceCount()).append(","); if (getInconclusiveEvidenceCount() != null) sb.append("InconclusiveEvidenceCount: ").append(getInconclusiveEvidenceCount()).append(","); if (getAssessmentControlsCountByNoncompliantEvidence() != null) sb.append("AssessmentControlsCountByNoncompliantEvidence: ").append(getAssessmentControlsCountByNoncompliantEvidence()).append(","); if (getTotalAssessmentControlsCount() != null) sb.append("TotalAssessmentControlsCount: ").append(getTotalAssessmentControlsCount()).append(","); if (getLastUpdated() != null) sb.append("LastUpdated: ").append(getLastUpdated()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InsightsByAssessment == false) return false; InsightsByAssessment other = (InsightsByAssessment) obj; if (other.getNoncompliantEvidenceCount() == null ^ this.getNoncompliantEvidenceCount() == null) return false; if (other.getNoncompliantEvidenceCount() != null && other.getNoncompliantEvidenceCount().equals(this.getNoncompliantEvidenceCount()) == false) return false; if (other.getCompliantEvidenceCount() == null ^ this.getCompliantEvidenceCount() == null) return false; if (other.getCompliantEvidenceCount() != null && other.getCompliantEvidenceCount().equals(this.getCompliantEvidenceCount()) == false) return false; if (other.getInconclusiveEvidenceCount() == null ^ this.getInconclusiveEvidenceCount() == null) return false; if (other.getInconclusiveEvidenceCount() != null && other.getInconclusiveEvidenceCount().equals(this.getInconclusiveEvidenceCount()) == false) return false; if (other.getAssessmentControlsCountByNoncompliantEvidence() == null ^ this.getAssessmentControlsCountByNoncompliantEvidence() == null) return false; if (other.getAssessmentControlsCountByNoncompliantEvidence() != null && other.getAssessmentControlsCountByNoncompliantEvidence().equals(this.getAssessmentControlsCountByNoncompliantEvidence()) == false) return false; if (other.getTotalAssessmentControlsCount() == null ^ this.getTotalAssessmentControlsCount() == null) return false; if (other.getTotalAssessmentControlsCount() != null && other.getTotalAssessmentControlsCount().equals(this.getTotalAssessmentControlsCount()) == false) return false; if (other.getLastUpdated() == null ^ this.getLastUpdated() == null) return false; if (other.getLastUpdated() != null && other.getLastUpdated().equals(this.getLastUpdated()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNoncompliantEvidenceCount() == null) ? 0 : getNoncompliantEvidenceCount().hashCode()); hashCode = prime * hashCode + ((getCompliantEvidenceCount() == null) ? 0 : getCompliantEvidenceCount().hashCode()); hashCode = prime * hashCode + ((getInconclusiveEvidenceCount() == null) ? 0 : getInconclusiveEvidenceCount().hashCode()); hashCode = prime * hashCode + ((getAssessmentControlsCountByNoncompliantEvidence() == null) ? 0 : getAssessmentControlsCountByNoncompliantEvidence().hashCode()); hashCode = prime * hashCode + ((getTotalAssessmentControlsCount() == null) ? 0 : getTotalAssessmentControlsCount().hashCode()); hashCode = prime * hashCode + ((getLastUpdated() == null) ? 0 : getLastUpdated().hashCode()); return hashCode; } @Override public InsightsByAssessment clone() { try { return (InsightsByAssessment) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.auditmanager.model.transform.InsightsByAssessmentMarshaller.getInstance().marshall(this, protocolMarshaller); } }