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

* Information about the audit check. *

*/ public class AuditCheckDetails implements Serializable { /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED */ private String checkRunStatus; /** *

* True if the check is complete and found all resources compliant. *

*/ private Boolean checkCompliant; /** *

* The number of resources on which the check was performed. *

*/ private Long totalResourcesCount; /** *

* The number of resources that were found noncompliant during the check. *

*/ private Long nonCompliantResourcesCount; /** *

* Describes how many of the non-compliant resources created during the * evaluation of an audit check were marked as suppressed. *

*/ private Long suppressedNonCompliantResourcesCount; /** *

* The code of any error encountered when this check is performed during * this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED". *

*/ private String errorCode; /** *

* The message associated with any error encountered when this check is * performed during this audit. *

*

* Constraints:
* Length: - 2048
*/ private String message; /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED * * @return

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

* @see AuditCheckRunStatus */ public String getCheckRunStatus() { return checkRunStatus; } /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED * * @param checkRunStatus

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", * "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". *

* @see AuditCheckRunStatus */ public void setCheckRunStatus(String checkRunStatus) { this.checkRunStatus = checkRunStatus; } /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

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

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED * * @param checkRunStatus

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", * "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". *

* @return A reference to this updated object so that method calls can be * chained together. * @see AuditCheckRunStatus */ public AuditCheckDetails withCheckRunStatus(String checkRunStatus) { this.checkRunStatus = checkRunStatus; return this; } /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED * * @param checkRunStatus

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", * "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". *

* @see AuditCheckRunStatus */ public void setCheckRunStatus(AuditCheckRunStatus checkRunStatus) { this.checkRunStatus = checkRunStatus.toString(); } /** *

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", * "COMPLETED_NON_COMPLIANT", or "FAILED". *

*

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

* Constraints:
* Allowed Values: IN_PROGRESS, WAITING_FOR_DATA_COLLECTION, * CANCELED, COMPLETED_COMPLIANT, COMPLETED_NON_COMPLIANT, FAILED * * @param checkRunStatus

* The completion status of this check. One of "IN_PROGRESS", * "WAITING_FOR_DATA_COLLECTION", "CANCELED", * "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED". *

* @return A reference to this updated object so that method calls can be * chained together. * @see AuditCheckRunStatus */ public AuditCheckDetails withCheckRunStatus(AuditCheckRunStatus checkRunStatus) { this.checkRunStatus = checkRunStatus.toString(); return this; } /** *

* True if the check is complete and found all resources compliant. *

* * @return

* True if the check is complete and found all resources compliant. *

*/ public Boolean isCheckCompliant() { return checkCompliant; } /** *

* True if the check is complete and found all resources compliant. *

* * @return

* True if the check is complete and found all resources compliant. *

*/ public Boolean getCheckCompliant() { return checkCompliant; } /** *

* True if the check is complete and found all resources compliant. *

* * @param checkCompliant

* True if the check is complete and found all resources * compliant. *

*/ public void setCheckCompliant(Boolean checkCompliant) { this.checkCompliant = checkCompliant; } /** *

* True if the check is complete and found all resources compliant. *

*

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

* True if the check is complete and found all resources * compliant. *

* @return A reference to this updated object so that method calls can be * chained together. */ public AuditCheckDetails withCheckCompliant(Boolean checkCompliant) { this.checkCompliant = checkCompliant; return this; } /** *

* The number of resources on which the check was performed. *

* * @return

* The number of resources on which the check was performed. *

*/ public Long getTotalResourcesCount() { return totalResourcesCount; } /** *

* The number of resources on which the check was performed. *

* * @param totalResourcesCount

* The number of resources on which the check was performed. *

*/ public void setTotalResourcesCount(Long totalResourcesCount) { this.totalResourcesCount = totalResourcesCount; } /** *

* The number of resources on which the check was performed. *

*

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

* The number of resources on which the check was performed. *

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

* The number of resources that were found noncompliant during the check. *

* * @return

* The number of resources that were found noncompliant during the * check. *

*/ public Long getNonCompliantResourcesCount() { return nonCompliantResourcesCount; } /** *

* The number of resources that were found noncompliant during the check. *

* * @param nonCompliantResourcesCount

* The number of resources that were found noncompliant during * the check. *

*/ public void setNonCompliantResourcesCount(Long nonCompliantResourcesCount) { this.nonCompliantResourcesCount = nonCompliantResourcesCount; } /** *

* The number of resources that were found noncompliant during the check. *

*

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

* The number of resources that were found noncompliant during * the check. *

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

* Describes how many of the non-compliant resources created during the * evaluation of an audit check were marked as suppressed. *

* * @return

* Describes how many of the non-compliant resources created during * the evaluation of an audit check were marked as suppressed. *

*/ public Long getSuppressedNonCompliantResourcesCount() { return suppressedNonCompliantResourcesCount; } /** *

* Describes how many of the non-compliant resources created during the * evaluation of an audit check were marked as suppressed. *

* * @param suppressedNonCompliantResourcesCount

* Describes how many of the non-compliant resources created * during the evaluation of an audit check were marked as * suppressed. *

*/ public void setSuppressedNonCompliantResourcesCount(Long suppressedNonCompliantResourcesCount) { this.suppressedNonCompliantResourcesCount = suppressedNonCompliantResourcesCount; } /** *

* Describes how many of the non-compliant resources created during the * evaluation of an audit check were marked as suppressed. *

*

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

* Describes how many of the non-compliant resources created * during the evaluation of an audit check were marked as * suppressed. *

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

* The code of any error encountered when this check is performed during * this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED". *

* * @return

* The code of any error encountered when this check is performed * during this audit. One of "INSUFFICIENT_PERMISSIONS" or * "AUDIT_CHECK_DISABLED". *

*/ public String getErrorCode() { return errorCode; } /** *

* The code of any error encountered when this check is performed during * this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED". *

* * @param errorCode

* The code of any error encountered when this check is performed * during this audit. One of "INSUFFICIENT_PERMISSIONS" or * "AUDIT_CHECK_DISABLED". *

*/ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

* The code of any error encountered when this check is performed during * this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED". *

*

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

* The code of any error encountered when this check is performed * during this audit. One of "INSUFFICIENT_PERMISSIONS" or * "AUDIT_CHECK_DISABLED". *

* @return A reference to this updated object so that method calls can be * chained together. */ public AuditCheckDetails withErrorCode(String errorCode) { this.errorCode = errorCode; return this; } /** *

* The message associated with any error encountered when this check is * performed during this audit. *

*

* Constraints:
* Length: - 2048
* * @return

* The message associated with any error encountered when this check * is performed during this audit. *

*/ public String getMessage() { return message; } /** *

* The message associated with any error encountered when this check is * performed during this audit. *

*

* Constraints:
* Length: - 2048
* * @param message

* The message associated with any error encountered when this * check is performed during this audit. *

*/ public void setMessage(String message) { this.message = message; } /** *

* The message associated with any error encountered when this check is * performed during this audit. *

*

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

* Constraints:
* Length: - 2048
* * @param message

* The message associated with any error encountered when this * check is performed during this audit. *

* @return A reference to this updated object so that method calls can be * chained together. */ public AuditCheckDetails withMessage(String message) { this.message = message; 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 (getCheckRunStatus() != null) sb.append("checkRunStatus: " + getCheckRunStatus() + ","); if (getCheckCompliant() != null) sb.append("checkCompliant: " + getCheckCompliant() + ","); if (getTotalResourcesCount() != null) sb.append("totalResourcesCount: " + getTotalResourcesCount() + ","); if (getNonCompliantResourcesCount() != null) sb.append("nonCompliantResourcesCount: " + getNonCompliantResourcesCount() + ","); if (getSuppressedNonCompliantResourcesCount() != null) sb.append("suppressedNonCompliantResourcesCount: " + getSuppressedNonCompliantResourcesCount() + ","); if (getErrorCode() != null) sb.append("errorCode: " + getErrorCode() + ","); if (getMessage() != null) sb.append("message: " + getMessage()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCheckRunStatus() == null) ? 0 : getCheckRunStatus().hashCode()); hashCode = prime * hashCode + ((getCheckCompliant() == null) ? 0 : getCheckCompliant().hashCode()); hashCode = prime * hashCode + ((getTotalResourcesCount() == null) ? 0 : getTotalResourcesCount().hashCode()); hashCode = prime * hashCode + ((getNonCompliantResourcesCount() == null) ? 0 : getNonCompliantResourcesCount() .hashCode()); hashCode = prime * hashCode + ((getSuppressedNonCompliantResourcesCount() == null) ? 0 : getSuppressedNonCompliantResourcesCount().hashCode()); hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AuditCheckDetails == false) return false; AuditCheckDetails other = (AuditCheckDetails) obj; if (other.getCheckRunStatus() == null ^ this.getCheckRunStatus() == null) return false; if (other.getCheckRunStatus() != null && other.getCheckRunStatus().equals(this.getCheckRunStatus()) == false) return false; if (other.getCheckCompliant() == null ^ this.getCheckCompliant() == null) return false; if (other.getCheckCompliant() != null && other.getCheckCompliant().equals(this.getCheckCompliant()) == false) return false; if (other.getTotalResourcesCount() == null ^ this.getTotalResourcesCount() == null) return false; if (other.getTotalResourcesCount() != null && other.getTotalResourcesCount().equals(this.getTotalResourcesCount()) == false) return false; if (other.getNonCompliantResourcesCount() == null ^ this.getNonCompliantResourcesCount() == null) return false; if (other.getNonCompliantResourcesCount() != null && other.getNonCompliantResourcesCount().equals( this.getNonCompliantResourcesCount()) == false) return false; if (other.getSuppressedNonCompliantResourcesCount() == null ^ this.getSuppressedNonCompliantResourcesCount() == null) return false; if (other.getSuppressedNonCompliantResourcesCount() != null && other.getSuppressedNonCompliantResourcesCount().equals( this.getSuppressedNonCompliantResourcesCount()) == false) return false; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; return true; } }