/* * Copyright 2010-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.iot.model; import java.io.Serializable; /** *

* Statistics for the checks performed during the audit. *

*/ public class TaskStatistics implements Serializable { /** *

* The number of checks in this audit. *

*/ private Integer totalChecks; /** *

* The number of checks in progress. *

*/ private Integer inProgressChecks; /** *

* The number of checks waiting for data collection. *

*/ private Integer waitingForDataCollectionChecks; /** *

* The number of checks that found compliant resources. *

*/ private Integer compliantChecks; /** *

* The number of checks that found noncompliant resources. *

*/ private Integer nonCompliantChecks; /** *

* The number of checks. *

*/ private Integer failedChecks; /** *

* The number of checks that did not run because the audit was canceled. *

*/ private Integer canceledChecks; /** *

* The number of checks in this audit. *

* * @return

* The number of checks in this audit. *

*/ public Integer getTotalChecks() { return totalChecks; } /** *

* The number of checks in this audit. *

* * @param totalChecks

* The number of checks in this audit. *

*/ public void setTotalChecks(Integer totalChecks) { this.totalChecks = totalChecks; } /** *

* The number of checks in this audit. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param totalChecks

* The number of checks in this audit. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withTotalChecks(Integer totalChecks) { this.totalChecks = totalChecks; return this; } /** *

* The number of checks in progress. *

* * @return

* The number of checks in progress. *

*/ public Integer getInProgressChecks() { return inProgressChecks; } /** *

* The number of checks in progress. *

* * @param inProgressChecks

* The number of checks in progress. *

*/ public void setInProgressChecks(Integer inProgressChecks) { this.inProgressChecks = inProgressChecks; } /** *

* The number of checks in progress. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param inProgressChecks

* The number of checks in progress. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withInProgressChecks(Integer inProgressChecks) { this.inProgressChecks = inProgressChecks; return this; } /** *

* The number of checks waiting for data collection. *

* * @return

* The number of checks waiting for data collection. *

*/ public Integer getWaitingForDataCollectionChecks() { return waitingForDataCollectionChecks; } /** *

* The number of checks waiting for data collection. *

* * @param waitingForDataCollectionChecks

* The number of checks waiting for data collection. *

*/ public void setWaitingForDataCollectionChecks(Integer waitingForDataCollectionChecks) { this.waitingForDataCollectionChecks = waitingForDataCollectionChecks; } /** *

* The number of checks waiting for data collection. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param waitingForDataCollectionChecks

* The number of checks waiting for data collection. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withWaitingForDataCollectionChecks(Integer waitingForDataCollectionChecks) { this.waitingForDataCollectionChecks = waitingForDataCollectionChecks; return this; } /** *

* The number of checks that found compliant resources. *

* * @return

* The number of checks that found compliant resources. *

*/ public Integer getCompliantChecks() { return compliantChecks; } /** *

* The number of checks that found compliant resources. *

* * @param compliantChecks

* The number of checks that found compliant resources. *

*/ public void setCompliantChecks(Integer compliantChecks) { this.compliantChecks = compliantChecks; } /** *

* The number of checks that found compliant resources. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param compliantChecks

* The number of checks that found compliant resources. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withCompliantChecks(Integer compliantChecks) { this.compliantChecks = compliantChecks; return this; } /** *

* The number of checks that found noncompliant resources. *

* * @return

* The number of checks that found noncompliant resources. *

*/ public Integer getNonCompliantChecks() { return nonCompliantChecks; } /** *

* The number of checks that found noncompliant resources. *

* * @param nonCompliantChecks

* The number of checks that found noncompliant resources. *

*/ public void setNonCompliantChecks(Integer nonCompliantChecks) { this.nonCompliantChecks = nonCompliantChecks; } /** *

* The number of checks that found noncompliant resources. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param nonCompliantChecks

* The number of checks that found noncompliant resources. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withNonCompliantChecks(Integer nonCompliantChecks) { this.nonCompliantChecks = nonCompliantChecks; return this; } /** *

* The number of checks. *

* * @return

* The number of checks. *

*/ public Integer getFailedChecks() { return failedChecks; } /** *

* The number of checks. *

* * @param failedChecks

* The number of checks. *

*/ public void setFailedChecks(Integer failedChecks) { this.failedChecks = failedChecks; } /** *

* The number of checks. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param failedChecks

* The number of checks. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withFailedChecks(Integer failedChecks) { this.failedChecks = failedChecks; return this; } /** *

* The number of checks that did not run because the audit was canceled. *

* * @return

* The number of checks that did not run because the audit was * canceled. *

*/ public Integer getCanceledChecks() { return canceledChecks; } /** *

* The number of checks that did not run because the audit was canceled. *

* * @param canceledChecks

* The number of checks that did not run because the audit was * canceled. *

*/ public void setCanceledChecks(Integer canceledChecks) { this.canceledChecks = canceledChecks; } /** *

* The number of checks that did not run because the audit was canceled. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param canceledChecks

* The number of checks that did not run because the audit was * canceled. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatistics withCanceledChecks(Integer canceledChecks) { this.canceledChecks = canceledChecks; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTotalChecks() != null) sb.append("totalChecks: " + getTotalChecks() + ","); if (getInProgressChecks() != null) sb.append("inProgressChecks: " + getInProgressChecks() + ","); if (getWaitingForDataCollectionChecks() != null) sb.append("waitingForDataCollectionChecks: " + getWaitingForDataCollectionChecks() + ","); if (getCompliantChecks() != null) sb.append("compliantChecks: " + getCompliantChecks() + ","); if (getNonCompliantChecks() != null) sb.append("nonCompliantChecks: " + getNonCompliantChecks() + ","); if (getFailedChecks() != null) sb.append("failedChecks: " + getFailedChecks() + ","); if (getCanceledChecks() != null) sb.append("canceledChecks: " + getCanceledChecks()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTotalChecks() == null) ? 0 : getTotalChecks().hashCode()); hashCode = prime * hashCode + ((getInProgressChecks() == null) ? 0 : getInProgressChecks().hashCode()); hashCode = prime * hashCode + ((getWaitingForDataCollectionChecks() == null) ? 0 : getWaitingForDataCollectionChecks().hashCode()); hashCode = prime * hashCode + ((getCompliantChecks() == null) ? 0 : getCompliantChecks().hashCode()); hashCode = prime * hashCode + ((getNonCompliantChecks() == null) ? 0 : getNonCompliantChecks().hashCode()); hashCode = prime * hashCode + ((getFailedChecks() == null) ? 0 : getFailedChecks().hashCode()); hashCode = prime * hashCode + ((getCanceledChecks() == null) ? 0 : getCanceledChecks().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TaskStatistics == false) return false; TaskStatistics other = (TaskStatistics) obj; if (other.getTotalChecks() == null ^ this.getTotalChecks() == null) return false; if (other.getTotalChecks() != null && other.getTotalChecks().equals(this.getTotalChecks()) == false) return false; if (other.getInProgressChecks() == null ^ this.getInProgressChecks() == null) return false; if (other.getInProgressChecks() != null && other.getInProgressChecks().equals(this.getInProgressChecks()) == false) return false; if (other.getWaitingForDataCollectionChecks() == null ^ this.getWaitingForDataCollectionChecks() == null) return false; if (other.getWaitingForDataCollectionChecks() != null && other.getWaitingForDataCollectionChecks().equals( this.getWaitingForDataCollectionChecks()) == false) return false; if (other.getCompliantChecks() == null ^ this.getCompliantChecks() == null) return false; if (other.getCompliantChecks() != null && other.getCompliantChecks().equals(this.getCompliantChecks()) == false) return false; if (other.getNonCompliantChecks() == null ^ this.getNonCompliantChecks() == null) return false; if (other.getNonCompliantChecks() != null && other.getNonCompliantChecks().equals(this.getNonCompliantChecks()) == false) return false; if (other.getFailedChecks() == null ^ this.getFailedChecks() == null) return false; if (other.getFailedChecks() != null && other.getFailedChecks().equals(this.getFailedChecks()) == false) return false; if (other.getCanceledChecks() == null ^ this.getCanceledChecks() == null) return false; if (other.getCanceledChecks() != null && other.getCanceledChecks().equals(this.getCanceledChecks()) == false) return false; return true; } }