/* * 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; public class DescribeAuditTaskResult implements Serializable { /** *
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
*
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*/
private String taskStatus;
/**
*
* The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
*
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*/
private String taskType;
/**
*
* The time the audit started. *
*/ private java.util.Date taskStartTime; /** ** Statistical information about the audit. *
*/ private TaskStatistics taskStatistics; /** ** The name of the scheduled audit (only if the audit was a scheduled * audit). *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*/
private String scheduledAuditName;
/**
*
* Detailed information about each check performed during this audit. *
*/ private java.util.Map* The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
*
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*
* @return
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", * "FAILED", or "CANCELED". *
* @see AuditTaskStatus */ public String getTaskStatus() { return taskStatus; } /** ** The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
*
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*
* @param taskStatus
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", * "FAILED", or "CANCELED". *
* @see AuditTaskStatus */ public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; } /** ** The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*
* @param taskStatus
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", * "FAILED", or "CANCELED". *
* @return A reference to this updated object so that method calls can be * chained together. * @see AuditTaskStatus */ public DescribeAuditTaskResult withTaskStatus(String taskStatus) { this.taskStatus = taskStatus; return this; } /** ** The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
*
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*
* @param taskStatus
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", * "FAILED", or "CANCELED". *
* @see AuditTaskStatus */ public void setTaskStatus(AuditTaskStatus taskStatus) { this.taskStatus = taskStatus.toString(); } /** ** The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or * "CANCELED". *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: IN_PROGRESS, COMPLETED, FAILED, CANCELED
*
* @param taskStatus
* The status of the audit: one of "IN_PROGRESS", "COMPLETED", * "FAILED", or "CANCELED". *
* @return A reference to this updated object so that method calls can be * chained together. * @see AuditTaskStatus */ public DescribeAuditTaskResult withTaskStatus(AuditTaskStatus taskStatus) { this.taskStatus = taskStatus.toString(); return this; } /** ** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
*
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*
* @return
* The type of audit: "ON_DEMAND_AUDIT_TASK" or * "SCHEDULED_AUDIT_TASK". *
* @see AuditTaskType */ public String getTaskType() { return taskType; } /** ** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
*
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*
* @param taskType
* The type of audit: "ON_DEMAND_AUDIT_TASK" or * "SCHEDULED_AUDIT_TASK". *
* @see AuditTaskType */ public void setTaskType(String taskType) { this.taskType = taskType; } /** ** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*
* @param taskType
* The type of audit: "ON_DEMAND_AUDIT_TASK" or * "SCHEDULED_AUDIT_TASK". *
* @return A reference to this updated object so that method calls can be * chained together. * @see AuditTaskType */ public DescribeAuditTaskResult withTaskType(String taskType) { this.taskType = taskType; return this; } /** ** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
*
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*
* @param taskType
* The type of audit: "ON_DEMAND_AUDIT_TASK" or * "SCHEDULED_AUDIT_TASK". *
* @see AuditTaskType */ public void setTaskType(AuditTaskType taskType) { this.taskType = taskType.toString(); } /** ** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ON_DEMAND_AUDIT_TASK, SCHEDULED_AUDIT_TASK
*
* @param taskType
* The type of audit: "ON_DEMAND_AUDIT_TASK" or * "SCHEDULED_AUDIT_TASK". *
* @return A reference to this updated object so that method calls can be * chained together. * @see AuditTaskType */ public DescribeAuditTaskResult withTaskType(AuditTaskType taskType) { this.taskType = taskType.toString(); return this; } /** ** The time the audit started. *
* * @return* The time the audit started. *
*/ public java.util.Date getTaskStartTime() { return taskStartTime; } /** ** The time the audit started. *
* * @param taskStartTime* The time the audit started. *
*/ public void setTaskStartTime(java.util.Date taskStartTime) { this.taskStartTime = taskStartTime; } /** ** The time the audit started. *
** Returns a reference to this object so that method calls can be chained * together. * * @param taskStartTime
* The time the audit started. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAuditTaskResult withTaskStartTime(java.util.Date taskStartTime) { this.taskStartTime = taskStartTime; return this; } /** ** Statistical information about the audit. *
* * @return* Statistical information about the audit. *
*/ public TaskStatistics getTaskStatistics() { return taskStatistics; } /** ** Statistical information about the audit. *
* * @param taskStatistics* Statistical information about the audit. *
*/ public void setTaskStatistics(TaskStatistics taskStatistics) { this.taskStatistics = taskStatistics; } /** ** Statistical information about the audit. *
** Returns a reference to this object so that method calls can be chained * together. * * @param taskStatistics
* Statistical information about the audit. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAuditTaskResult withTaskStatistics(TaskStatistics taskStatistics) { this.taskStatistics = taskStatistics; return this; } /** ** The name of the scheduled audit (only if the audit was a scheduled * audit). *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* The name of the scheduled audit (only if the audit was a * scheduled audit). *
*/ public String getScheduledAuditName() { return scheduledAuditName; } /** ** The name of the scheduled audit (only if the audit was a scheduled * audit). *
*
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @param scheduledAuditName
* The name of the scheduled audit (only if the audit was a * scheduled audit). *
*/ public void setScheduledAuditName(String scheduledAuditName) { this.scheduledAuditName = scheduledAuditName; } /** ** The name of the scheduled audit (only if the audit was a scheduled * audit). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @param scheduledAuditName
* The name of the scheduled audit (only if the audit was a * scheduled audit). *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAuditTaskResult withScheduledAuditName(String scheduledAuditName) { this.scheduledAuditName = scheduledAuditName; return this; } /** ** Detailed information about each check performed during this audit. *
* * @return* Detailed information about each check performed during this * audit. *
*/ public java.util.Map* Detailed information about each check performed during this audit. *
* * @param auditDetails* Detailed information about each check performed during this * audit. *
*/ public void setAuditDetails(java.util.Map* Detailed information about each check performed during this audit. *
** Returns a reference to this object so that method calls can be chained * together. * * @param auditDetails
* Detailed information about each check performed during this * audit. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAuditTaskResult withAuditDetails( java.util.Map* Detailed information about each check performed during this audit. *
*
* The method adds a new key-value pair into auditDetails parameter, and
* returns a reference to this object so that method calls can be chained
* together.
*
* @param key The key of the entry to be added into auditDetails.
* @param value The corresponding value of the entry to be added into
* auditDetails.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DescribeAuditTaskResult addauditDetailsEntry(String key, AuditCheckDetails value) {
if (null == this.auditDetails) {
this.auditDetails = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public DescribeAuditTaskResult clearauditDetailsEntries() {
this.auditDetails = null;
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 (getTaskStatus() != null)
sb.append("taskStatus: " + getTaskStatus() + ",");
if (getTaskType() != null)
sb.append("taskType: " + getTaskType() + ",");
if (getTaskStartTime() != null)
sb.append("taskStartTime: " + getTaskStartTime() + ",");
if (getTaskStatistics() != null)
sb.append("taskStatistics: " + getTaskStatistics() + ",");
if (getScheduledAuditName() != null)
sb.append("scheduledAuditName: " + getScheduledAuditName() + ",");
if (getAuditDetails() != null)
sb.append("auditDetails: " + getAuditDetails());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTaskStatus() == null) ? 0 : getTaskStatus().hashCode());
hashCode = prime * hashCode + ((getTaskType() == null) ? 0 : getTaskType().hashCode());
hashCode = prime * hashCode
+ ((getTaskStartTime() == null) ? 0 : getTaskStartTime().hashCode());
hashCode = prime * hashCode
+ ((getTaskStatistics() == null) ? 0 : getTaskStatistics().hashCode());
hashCode = prime * hashCode
+ ((getScheduledAuditName() == null) ? 0 : getScheduledAuditName().hashCode());
hashCode = prime * hashCode
+ ((getAuditDetails() == null) ? 0 : getAuditDetails().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeAuditTaskResult == false)
return false;
DescribeAuditTaskResult other = (DescribeAuditTaskResult) obj;
if (other.getTaskStatus() == null ^ this.getTaskStatus() == null)
return false;
if (other.getTaskStatus() != null
&& other.getTaskStatus().equals(this.getTaskStatus()) == false)
return false;
if (other.getTaskType() == null ^ this.getTaskType() == null)
return false;
if (other.getTaskType() != null && other.getTaskType().equals(this.getTaskType()) == false)
return false;
if (other.getTaskStartTime() == null ^ this.getTaskStartTime() == null)
return false;
if (other.getTaskStartTime() != null
&& other.getTaskStartTime().equals(this.getTaskStartTime()) == false)
return false;
if (other.getTaskStatistics() == null ^ this.getTaskStatistics() == null)
return false;
if (other.getTaskStatistics() != null
&& other.getTaskStatistics().equals(this.getTaskStatistics()) == false)
return false;
if (other.getScheduledAuditName() == null ^ this.getScheduledAuditName() == null)
return false;
if (other.getScheduledAuditName() != null
&& other.getScheduledAuditName().equals(this.getScheduledAuditName()) == false)
return false;
if (other.getAuditDetails() == null ^ this.getAuditDetails() == null)
return false;
if (other.getAuditDetails() != null
&& other.getAuditDetails().equals(this.getAuditDetails()) == false)
return false;
return true;
}
}