All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.simplesystemsmanagement.model.ComplianceItem Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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.simplesystemsmanagement.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about the compliance as defined by the resource type. For example, for a patch resource type, * Items includes information about the PatchSeverity, Classification, and so on. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ComplianceItem implements Serializable, Cloneable, StructuredPojo { /** *

* The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. *

*/ private String complianceType; /** *

* The type of resource. ManagedInstance is currently the only supported resource type. *

*/ private String resourceType; /** *

* An ID for the resource. For a managed node, this is the node ID. *

*/ private String resourceId; /** *

* An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number * of the KB article; for example: KB4010320. *

*/ private String id; /** *

* A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the * title of the KB article for the patch; for example: Security Update for Active Directory Federation Services. *

*/ private String title; /** *

* The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows * patches that aren't applicable). *

*/ private String status; /** *

* The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. *

*/ private String severity; /** *

* A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. *

*/ private ComplianceExecutionSummary executionSummary; /** *

* A "Key": "Value" tag combination for the compliance item. *

*/ private java.util.Map details; /** *

* The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. *

* * @param complianceType * The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. */ public void setComplianceType(String complianceType) { this.complianceType = complianceType; } /** *

* The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. *

* * @return The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. */ public String getComplianceType() { return this.complianceType; } /** *

* The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. *

* * @param complianceType * The compliance type. For example, Association (for a State Manager association), Patch, or Custom: * string are all valid compliance types. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withComplianceType(String complianceType) { setComplianceType(complianceType); return this; } /** *

* The type of resource. ManagedInstance is currently the only supported resource type. *

* * @param resourceType * The type of resource. ManagedInstance is currently the only supported resource type. */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The type of resource. ManagedInstance is currently the only supported resource type. *

* * @return The type of resource. ManagedInstance is currently the only supported resource type. */ public String getResourceType() { return this.resourceType; } /** *

* The type of resource. ManagedInstance is currently the only supported resource type. *

* * @param resourceType * The type of resource. ManagedInstance is currently the only supported resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* An ID for the resource. For a managed node, this is the node ID. *

* * @param resourceId * An ID for the resource. For a managed node, this is the node ID. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } /** *

* An ID for the resource. For a managed node, this is the node ID. *

* * @return An ID for the resource. For a managed node, this is the node ID. */ public String getResourceId() { return this.resourceId; } /** *

* An ID for the resource. For a managed node, this is the node ID. *

* * @param resourceId * An ID for the resource. For a managed node, this is the node ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withResourceId(String resourceId) { setResourceId(resourceId); return this; } /** *

* An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number * of the KB article; for example: KB4010320. *

* * @param id * An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the * number of the KB article; for example: KB4010320. */ public void setId(String id) { this.id = id; } /** *

* An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number * of the KB article; for example: KB4010320. *

* * @return An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be * the number of the KB article; for example: KB4010320. */ public String getId() { return this.id; } /** *

* An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number * of the KB article; for example: KB4010320. *

* * @param id * An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the * number of the KB article; for example: KB4010320. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withId(String id) { setId(id); return this; } /** *

* A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the * title of the KB article for the patch; for example: Security Update for Active Directory Federation Services. *

* * @param title * A title for the compliance item. For example, if the compliance item is a Windows patch, the title could * be the title of the KB article for the patch; for example: Security Update for Active Directory Federation * Services. */ public void setTitle(String title) { this.title = title; } /** *

* A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the * title of the KB article for the patch; for example: Security Update for Active Directory Federation Services. *

* * @return A title for the compliance item. For example, if the compliance item is a Windows patch, the title could * be the title of the KB article for the patch; for example: Security Update for Active Directory * Federation Services. */ public String getTitle() { return this.title; } /** *

* A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the * title of the KB article for the patch; for example: Security Update for Active Directory Federation Services. *

* * @param title * A title for the compliance item. For example, if the compliance item is a Windows patch, the title could * be the title of the KB article for the patch; for example: Security Update for Active Directory Federation * Services. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withTitle(String title) { setTitle(title); return this; } /** *

* The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows * patches that aren't applicable). *

* * @param status * The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for * Windows patches that aren't applicable). * @see ComplianceStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows * patches that aren't applicable). *

* * @return The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for * Windows patches that aren't applicable). * @see ComplianceStatus */ public String getStatus() { return this.status; } /** *

* The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows * patches that aren't applicable). *

* * @param status * The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for * Windows patches that aren't applicable). * @return Returns a reference to this object so that method calls can be chained together. * @see ComplianceStatus */ public ComplianceItem withStatus(String status) { setStatus(status); return this; } /** *

* The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows * patches that aren't applicable). *

* * @param status * The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for * Windows patches that aren't applicable). * @return Returns a reference to this object so that method calls can be chained together. * @see ComplianceStatus */ public ComplianceItem withStatus(ComplianceStatus status) { this.status = status.toString(); return this; } /** *

* The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. *

* * @param severity * The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. * @see ComplianceSeverity */ public void setSeverity(String severity) { this.severity = severity; } /** *

* The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. *

* * @return The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. * @see ComplianceSeverity */ public String getSeverity() { return this.severity; } /** *

* The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. *

* * @param severity * The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. * @return Returns a reference to this object so that method calls can be chained together. * @see ComplianceSeverity */ public ComplianceItem withSeverity(String severity) { setSeverity(severity); return this; } /** *

* The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. *

* * @param severity * The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, * Informational, Unspecified. * @return Returns a reference to this object so that method calls can be chained together. * @see ComplianceSeverity */ public ComplianceItem withSeverity(ComplianceSeverity severity) { this.severity = severity.toString(); return this; } /** *

* A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. *

* * @param executionSummary * A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. */ public void setExecutionSummary(ComplianceExecutionSummary executionSummary) { this.executionSummary = executionSummary; } /** *

* A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. *

* * @return A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. */ public ComplianceExecutionSummary getExecutionSummary() { return this.executionSummary; } /** *

* A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. *

* * @param executionSummary * A summary for the compliance item. The summary includes an execution ID, the execution type (for example, * command), and the execution time. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withExecutionSummary(ComplianceExecutionSummary executionSummary) { setExecutionSummary(executionSummary); return this; } /** *

* A "Key": "Value" tag combination for the compliance item. *

* * @return A "Key": "Value" tag combination for the compliance item. */ public java.util.Map getDetails() { return details; } /** *

* A "Key": "Value" tag combination for the compliance item. *

* * @param details * A "Key": "Value" tag combination for the compliance item. */ public void setDetails(java.util.Map details) { this.details = details; } /** *

* A "Key": "Value" tag combination for the compliance item. *

* * @param details * A "Key": "Value" tag combination for the compliance item. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem withDetails(java.util.Map details) { setDetails(details); return this; } /** * Add a single Details entry * * @see ComplianceItem#withDetails * @returns a reference to this object so that method calls can be chained together. */ public ComplianceItem addDetailsEntry(String key, String value) { if (null == this.details) { this.details = new java.util.HashMap(); } if (this.details.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.details.put(key, value); return this; } /** * Removes all the entries added into Details. * * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceItem clearDetailsEntries() { this.details = null; 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 (getComplianceType() != null) sb.append("ComplianceType: ").append(getComplianceType()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getExecutionSummary() != null) sb.append("ExecutionSummary: ").append(getExecutionSummary()).append(","); if (getDetails() != null) sb.append("Details: ").append(getDetails()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComplianceItem == false) return false; ComplianceItem other = (ComplianceItem) obj; if (other.getComplianceType() == null ^ this.getComplianceType() == null) return false; if (other.getComplianceType() != null && other.getComplianceType().equals(this.getComplianceType()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSeverity() == null ^ this.getSeverity() == null) return false; if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == false) return false; if (other.getExecutionSummary() == null ^ this.getExecutionSummary() == null) return false; if (other.getExecutionSummary() != null && other.getExecutionSummary().equals(this.getExecutionSummary()) == false) return false; if (other.getDetails() == null ^ this.getDetails() == null) return false; if (other.getDetails() != null && other.getDetails().equals(this.getDetails()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getComplianceType() == null) ? 0 : getComplianceType().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getExecutionSummary() == null) ? 0 : getExecutionSummary().hashCode()); hashCode = prime * hashCode + ((getDetails() == null) ? 0 : getDetails().hashCode()); return hashCode; } @Override public ComplianceItem clone() { try { return (ComplianceItem) 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.simplesystemsmanagement.model.transform.ComplianceItemMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy