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

com.amazonaws.services.securityhub.model.SecurityControl Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2018-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.securityhub.model;

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

/**
 * 

* A security control in Security Hub describes a security best practice related to a specific resource. *

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

* The unique identifier of a security control across standards. Values for this field typically consist of an * Amazon Web Service name and a number, such as APIGateway.3. *

*/ private String securityControlId; /** *

* The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't mention * a specific standard. *

*/ private String securityControlArn; /** *

* The title of a security control. *

*/ private String title; /** *

* The description of a security control across standards. This typically summarizes how Security Hub evaluates the * control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific * standard. *

*/ private String description; /** *

* A link to Security Hub documentation that explains how to remediate a failed finding for a security control. *

*/ private String remediationUrl; /** *

* The severity of a security control. For more information about how Security Hub determines control severity, see * Assigning severity to control findings in the Security Hub User Guide. *

*/ private String severityRating; /** *

* The status of a security control based on the compliance status of its findings. For more information about how * control status is determined, see Determining the * overall status of a control from its findings in the Security Hub User Guide. *

*/ private String securityControlStatus; /** *

* The unique identifier of a security control across standards. Values for this field typically consist of an * Amazon Web Service name and a number, such as APIGateway.3. *

* * @param securityControlId * The unique identifier of a security control across standards. Values for this field typically consist of * an Amazon Web Service name and a number, such as APIGateway.3. */ public void setSecurityControlId(String securityControlId) { this.securityControlId = securityControlId; } /** *

* The unique identifier of a security control across standards. Values for this field typically consist of an * Amazon Web Service name and a number, such as APIGateway.3. *

* * @return The unique identifier of a security control across standards. Values for this field typically consist of * an Amazon Web Service name and a number, such as APIGateway.3. */ public String getSecurityControlId() { return this.securityControlId; } /** *

* The unique identifier of a security control across standards. Values for this field typically consist of an * Amazon Web Service name and a number, such as APIGateway.3. *

* * @param securityControlId * The unique identifier of a security control across standards. Values for this field typically consist of * an Amazon Web Service name and a number, such as APIGateway.3. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityControl withSecurityControlId(String securityControlId) { setSecurityControlId(securityControlId); return this; } /** *

* The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't mention * a specific standard. *

* * @param securityControlArn * The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't * mention a specific standard. */ public void setSecurityControlArn(String securityControlArn) { this.securityControlArn = securityControlArn; } /** *

* The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't mention * a specific standard. *

* * @return The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't * mention a specific standard. */ public String getSecurityControlArn() { return this.securityControlArn; } /** *

* The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't mention * a specific standard. *

* * @param securityControlArn * The Amazon Resource Name (ARN) for a security control across standards, such as * arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1. This parameter doesn't * mention a specific standard. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityControl withSecurityControlArn(String securityControlArn) { setSecurityControlArn(securityControlArn); return this; } /** *

* The title of a security control. *

* * @param title * The title of a security control. */ public void setTitle(String title) { this.title = title; } /** *

* The title of a security control. *

* * @return The title of a security control. */ public String getTitle() { return this.title; } /** *

* The title of a security control. *

* * @param title * The title of a security control. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityControl withTitle(String title) { setTitle(title); return this; } /** *

* The description of a security control across standards. This typically summarizes how Security Hub evaluates the * control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific * standard. *

* * @param description * The description of a security control across standards. This typically summarizes how Security Hub * evaluates the control and the conditions under which it produces a failed finding. This parameter doesn't * reference a specific standard. */ public void setDescription(String description) { this.description = description; } /** *

* The description of a security control across standards. This typically summarizes how Security Hub evaluates the * control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific * standard. *

* * @return The description of a security control across standards. This typically summarizes how Security Hub * evaluates the control and the conditions under which it produces a failed finding. This parameter doesn't * reference a specific standard. */ public String getDescription() { return this.description; } /** *

* The description of a security control across standards. This typically summarizes how Security Hub evaluates the * control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific * standard. *

* * @param description * The description of a security control across standards. This typically summarizes how Security Hub * evaluates the control and the conditions under which it produces a failed finding. This parameter doesn't * reference a specific standard. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityControl withDescription(String description) { setDescription(description); return this; } /** *

* A link to Security Hub documentation that explains how to remediate a failed finding for a security control. *

* * @param remediationUrl * A link to Security Hub documentation that explains how to remediate a failed finding for a security * control. */ public void setRemediationUrl(String remediationUrl) { this.remediationUrl = remediationUrl; } /** *

* A link to Security Hub documentation that explains how to remediate a failed finding for a security control. *

* * @return A link to Security Hub documentation that explains how to remediate a failed finding for a security * control. */ public String getRemediationUrl() { return this.remediationUrl; } /** *

* A link to Security Hub documentation that explains how to remediate a failed finding for a security control. *

* * @param remediationUrl * A link to Security Hub documentation that explains how to remediate a failed finding for a security * control. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityControl withRemediationUrl(String remediationUrl) { setRemediationUrl(remediationUrl); return this; } /** *

* The severity of a security control. For more information about how Security Hub determines control severity, see * Assigning severity to control findings in the Security Hub User Guide. *

* * @param severityRating * The severity of a security control. For more information about how Security Hub determines control * severity, see Assigning severity to control findings in the Security Hub User Guide. * @see SeverityRating */ public void setSeverityRating(String severityRating) { this.severityRating = severityRating; } /** *

* The severity of a security control. For more information about how Security Hub determines control severity, see * Assigning severity to control findings in the Security Hub User Guide. *

* * @return The severity of a security control. For more information about how Security Hub determines control * severity, see Assigning severity to control findings in the Security Hub User Guide. * @see SeverityRating */ public String getSeverityRating() { return this.severityRating; } /** *

* The severity of a security control. For more information about how Security Hub determines control severity, see * Assigning severity to control findings in the Security Hub User Guide. *

* * @param severityRating * The severity of a security control. For more information about how Security Hub determines control * severity, see Assigning severity to control findings in the Security Hub User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see SeverityRating */ public SecurityControl withSeverityRating(String severityRating) { setSeverityRating(severityRating); return this; } /** *

* The severity of a security control. For more information about how Security Hub determines control severity, see * Assigning severity to control findings in the Security Hub User Guide. *

* * @param severityRating * The severity of a security control. For more information about how Security Hub determines control * severity, see Assigning severity to control findings in the Security Hub User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see SeverityRating */ public SecurityControl withSeverityRating(SeverityRating severityRating) { this.severityRating = severityRating.toString(); return this; } /** *

* The status of a security control based on the compliance status of its findings. For more information about how * control status is determined, see Determining the * overall status of a control from its findings in the Security Hub User Guide. *

* * @param securityControlStatus * The status of a security control based on the compliance status of its findings. For more information * about how control status is determined, see Determining * the overall status of a control from its findings in the Security Hub User Guide. * @see ControlStatus */ public void setSecurityControlStatus(String securityControlStatus) { this.securityControlStatus = securityControlStatus; } /** *

* The status of a security control based on the compliance status of its findings. For more information about how * control status is determined, see Determining the * overall status of a control from its findings in the Security Hub User Guide. *

* * @return The status of a security control based on the compliance status of its findings. For more information * about how control status is determined, see Determining * the overall status of a control from its findings in the Security Hub User Guide. * @see ControlStatus */ public String getSecurityControlStatus() { return this.securityControlStatus; } /** *

* The status of a security control based on the compliance status of its findings. For more information about how * control status is determined, see Determining the * overall status of a control from its findings in the Security Hub User Guide. *

* * @param securityControlStatus * The status of a security control based on the compliance status of its findings. For more information * about how control status is determined, see Determining * the overall status of a control from its findings in the Security Hub User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ControlStatus */ public SecurityControl withSecurityControlStatus(String securityControlStatus) { setSecurityControlStatus(securityControlStatus); return this; } /** *

* The status of a security control based on the compliance status of its findings. For more information about how * control status is determined, see Determining the * overall status of a control from its findings in the Security Hub User Guide. *

* * @param securityControlStatus * The status of a security control based on the compliance status of its findings. For more information * about how control status is determined, see Determining * the overall status of a control from its findings in the Security Hub User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ControlStatus */ public SecurityControl withSecurityControlStatus(ControlStatus securityControlStatus) { this.securityControlStatus = securityControlStatus.toString(); 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 (getSecurityControlId() != null) sb.append("SecurityControlId: ").append(getSecurityControlId()).append(","); if (getSecurityControlArn() != null) sb.append("SecurityControlArn: ").append(getSecurityControlArn()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRemediationUrl() != null) sb.append("RemediationUrl: ").append(getRemediationUrl()).append(","); if (getSeverityRating() != null) sb.append("SeverityRating: ").append(getSeverityRating()).append(","); if (getSecurityControlStatus() != null) sb.append("SecurityControlStatus: ").append(getSecurityControlStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SecurityControl == false) return false; SecurityControl other = (SecurityControl) obj; if (other.getSecurityControlId() == null ^ this.getSecurityControlId() == null) return false; if (other.getSecurityControlId() != null && other.getSecurityControlId().equals(this.getSecurityControlId()) == false) return false; if (other.getSecurityControlArn() == null ^ this.getSecurityControlArn() == null) return false; if (other.getSecurityControlArn() != null && other.getSecurityControlArn().equals(this.getSecurityControlArn()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getRemediationUrl() == null ^ this.getRemediationUrl() == null) return false; if (other.getRemediationUrl() != null && other.getRemediationUrl().equals(this.getRemediationUrl()) == false) return false; if (other.getSeverityRating() == null ^ this.getSeverityRating() == null) return false; if (other.getSeverityRating() != null && other.getSeverityRating().equals(this.getSeverityRating()) == false) return false; if (other.getSecurityControlStatus() == null ^ this.getSecurityControlStatus() == null) return false; if (other.getSecurityControlStatus() != null && other.getSecurityControlStatus().equals(this.getSecurityControlStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSecurityControlId() == null) ? 0 : getSecurityControlId().hashCode()); hashCode = prime * hashCode + ((getSecurityControlArn() == null) ? 0 : getSecurityControlArn().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRemediationUrl() == null) ? 0 : getRemediationUrl().hashCode()); hashCode = prime * hashCode + ((getSeverityRating() == null) ? 0 : getSeverityRating().hashCode()); hashCode = prime * hashCode + ((getSecurityControlStatus() == null) ? 0 : getSecurityControlStatus().hashCode()); return hashCode; } @Override public SecurityControl clone() { try { return (SecurityControl) 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.securityhub.model.transform.SecurityControlMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy