/* * 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; /** *

* Provides summary counts of how many tasks for findings are in a particular * state. This information is included in the response from * DescribeAuditMitigationActionsTask. *

*/ public class TaskStatisticsForAuditCheck implements Serializable { /** *

* The total number of findings to which a task is being applied. *

*/ private Long totalFindingsCount; /** *

* The number of findings for which at least one of the actions failed when * applied. *

*/ private Long failedFindingsCount; /** *

* The number of findings for which all mitigation actions succeeded when * applied. *

*/ private Long succeededFindingsCount; /** *

* The number of findings skipped because of filter conditions provided in * the parameters to the command. *

*/ private Long skippedFindingsCount; /** *

* The number of findings to which the mitigation action task was canceled * when applied. *

*/ private Long canceledFindingsCount; /** *

* The total number of findings to which a task is being applied. *

* * @return

* The total number of findings to which a task is being applied. *

*/ public Long getTotalFindingsCount() { return totalFindingsCount; } /** *

* The total number of findings to which a task is being applied. *

* * @param totalFindingsCount

* The total number of findings to which a task is being applied. *

*/ public void setTotalFindingsCount(Long totalFindingsCount) { this.totalFindingsCount = totalFindingsCount; } /** *

* The total number of findings to which a task is being applied. *

*

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

* The total number of findings to which a task is being applied. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatisticsForAuditCheck withTotalFindingsCount(Long totalFindingsCount) { this.totalFindingsCount = totalFindingsCount; return this; } /** *

* The number of findings for which at least one of the actions failed when * applied. *

* * @return

* The number of findings for which at least one of the actions * failed when applied. *

*/ public Long getFailedFindingsCount() { return failedFindingsCount; } /** *

* The number of findings for which at least one of the actions failed when * applied. *

* * @param failedFindingsCount

* The number of findings for which at least one of the actions * failed when applied. *

*/ public void setFailedFindingsCount(Long failedFindingsCount) { this.failedFindingsCount = failedFindingsCount; } /** *

* The number of findings for which at least one of the actions failed when * applied. *

*

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

* The number of findings for which at least one of the actions * failed when applied. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatisticsForAuditCheck withFailedFindingsCount(Long failedFindingsCount) { this.failedFindingsCount = failedFindingsCount; return this; } /** *

* The number of findings for which all mitigation actions succeeded when * applied. *

* * @return

* The number of findings for which all mitigation actions succeeded * when applied. *

*/ public Long getSucceededFindingsCount() { return succeededFindingsCount; } /** *

* The number of findings for which all mitigation actions succeeded when * applied. *

* * @param succeededFindingsCount

* The number of findings for which all mitigation actions * succeeded when applied. *

*/ public void setSucceededFindingsCount(Long succeededFindingsCount) { this.succeededFindingsCount = succeededFindingsCount; } /** *

* The number of findings for which all mitigation actions succeeded when * applied. *

*

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

* The number of findings for which all mitigation actions * succeeded when applied. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatisticsForAuditCheck withSucceededFindingsCount(Long succeededFindingsCount) { this.succeededFindingsCount = succeededFindingsCount; return this; } /** *

* The number of findings skipped because of filter conditions provided in * the parameters to the command. *

* * @return

* The number of findings skipped because of filter conditions * provided in the parameters to the command. *

*/ public Long getSkippedFindingsCount() { return skippedFindingsCount; } /** *

* The number of findings skipped because of filter conditions provided in * the parameters to the command. *

* * @param skippedFindingsCount

* The number of findings skipped because of filter conditions * provided in the parameters to the command. *

*/ public void setSkippedFindingsCount(Long skippedFindingsCount) { this.skippedFindingsCount = skippedFindingsCount; } /** *

* The number of findings skipped because of filter conditions provided in * the parameters to the command. *

*

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

* The number of findings skipped because of filter conditions * provided in the parameters to the command. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatisticsForAuditCheck withSkippedFindingsCount(Long skippedFindingsCount) { this.skippedFindingsCount = skippedFindingsCount; return this; } /** *

* The number of findings to which the mitigation action task was canceled * when applied. *

* * @return

* The number of findings to which the mitigation action task was * canceled when applied. *

*/ public Long getCanceledFindingsCount() { return canceledFindingsCount; } /** *

* The number of findings to which the mitigation action task was canceled * when applied. *

* * @param canceledFindingsCount

* The number of findings to which the mitigation action task was * canceled when applied. *

*/ public void setCanceledFindingsCount(Long canceledFindingsCount) { this.canceledFindingsCount = canceledFindingsCount; } /** *

* The number of findings to which the mitigation action task was canceled * when applied. *

*

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

* The number of findings to which the mitigation action task was * canceled when applied. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TaskStatisticsForAuditCheck withCanceledFindingsCount(Long canceledFindingsCount) { this.canceledFindingsCount = canceledFindingsCount; 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 (getTotalFindingsCount() != null) sb.append("totalFindingsCount: " + getTotalFindingsCount() + ","); if (getFailedFindingsCount() != null) sb.append("failedFindingsCount: " + getFailedFindingsCount() + ","); if (getSucceededFindingsCount() != null) sb.append("succeededFindingsCount: " + getSucceededFindingsCount() + ","); if (getSkippedFindingsCount() != null) sb.append("skippedFindingsCount: " + getSkippedFindingsCount() + ","); if (getCanceledFindingsCount() != null) sb.append("canceledFindingsCount: " + getCanceledFindingsCount()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTotalFindingsCount() == null) ? 0 : getTotalFindingsCount().hashCode()); hashCode = prime * hashCode + ((getFailedFindingsCount() == null) ? 0 : getFailedFindingsCount().hashCode()); hashCode = prime * hashCode + ((getSucceededFindingsCount() == null) ? 0 : getSucceededFindingsCount() .hashCode()); hashCode = prime * hashCode + ((getSkippedFindingsCount() == null) ? 0 : getSkippedFindingsCount().hashCode()); hashCode = prime * hashCode + ((getCanceledFindingsCount() == null) ? 0 : getCanceledFindingsCount().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TaskStatisticsForAuditCheck == false) return false; TaskStatisticsForAuditCheck other = (TaskStatisticsForAuditCheck) obj; if (other.getTotalFindingsCount() == null ^ this.getTotalFindingsCount() == null) return false; if (other.getTotalFindingsCount() != null && other.getTotalFindingsCount().equals(this.getTotalFindingsCount()) == false) return false; if (other.getFailedFindingsCount() == null ^ this.getFailedFindingsCount() == null) return false; if (other.getFailedFindingsCount() != null && other.getFailedFindingsCount().equals(this.getFailedFindingsCount()) == false) return false; if (other.getSucceededFindingsCount() == null ^ this.getSucceededFindingsCount() == null) return false; if (other.getSucceededFindingsCount() != null && other.getSucceededFindingsCount().equals(this.getSucceededFindingsCount()) == false) return false; if (other.getSkippedFindingsCount() == null ^ this.getSkippedFindingsCount() == null) return false; if (other.getSkippedFindingsCount() != null && other.getSkippedFindingsCount().equals(this.getSkippedFindingsCount()) == false) return false; if (other.getCanceledFindingsCount() == null ^ this.getCanceledFindingsCount() == null) return false; if (other.getCanceledFindingsCount() != null && other.getCanceledFindingsCount().equals(this.getCanceledFindingsCount()) == false) return false; return true; } }