com.amazonaws.services.securityhub.model.StandardsControlAssociationSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An array that provides the enablement status and other details for each control that applies to each enabled
* standard.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StandardsControlAssociationSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of a standard.
*
*/
private String standardsArn;
/**
*
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon Web
* Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*
*/
private String securityControlId;
/**
*
* The ARN of a control, 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 enablement status of a control in a specific standard.
*
*/
private String associationStatus;
/**
*
* The requirement that underlies this control in the compliance framework related to the standard.
*
*/
private java.util.List relatedRequirements;
/**
*
* The last time that a control's enablement status in a specified standard was updated.
*
*/
private java.util.Date updatedAt;
/**
*
* The reason for updating a control's enablement status in a specified standard.
*
*/
private String updatedReason;
/**
*
* The title of a control.
*
*/
private String standardsControlTitle;
/**
*
* The description of a control. This typically summarizes how Security Hub evaluates the control and the conditions
* under which it produces a failed finding. The parameter may reference a specific standard.
*
*/
private String standardsControlDescription;
/**
*
* The Amazon Resource Name (ARN) of a standard.
*
*
* @param standardsArn
* The Amazon Resource Name (ARN) of a standard.
*/
public void setStandardsArn(String standardsArn) {
this.standardsArn = standardsArn;
}
/**
*
* The Amazon Resource Name (ARN) of a standard.
*
*
* @return The Amazon Resource Name (ARN) of a standard.
*/
public String getStandardsArn() {
return this.standardsArn;
}
/**
*
* The Amazon Resource Name (ARN) of a standard.
*
*
* @param standardsArn
* The Amazon Resource Name (ARN) of a standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withStandardsArn(String standardsArn) {
setStandardsArn(standardsArn);
return this;
}
/**
*
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon Web
* Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*
*
* @param securityControlId
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon
* Web Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*/
public void setSecurityControlId(String securityControlId) {
this.securityControlId = securityControlId;
}
/**
*
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon Web
* Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*
*
* @return A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon
* Web Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*/
public String getSecurityControlId() {
return this.securityControlId;
}
/**
*
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon Web
* Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
*
*
* @param securityControlId
* A unique standard-agnostic identifier for a control. Values for this field typically consist of an Amazon
* Web Service and a number, such as APIGateway.5. This field doesn't reference a specific standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withSecurityControlId(String securityControlId) {
setSecurityControlId(securityControlId);
return this;
}
/**
*
* The ARN of a control, such as arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1
.
* This parameter doesn't mention a specific standard.
*
*
* @param securityControlArn
* The ARN of a control, 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 ARN of a control, such as arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1
.
* This parameter doesn't mention a specific standard.
*
*
* @return The ARN of a control, 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 ARN of a control, such as arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1
.
* This parameter doesn't mention a specific standard.
*
*
* @param securityControlArn
* The ARN of a control, 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 StandardsControlAssociationSummary withSecurityControlArn(String securityControlArn) {
setSecurityControlArn(securityControlArn);
return this;
}
/**
*
* The enablement status of a control in a specific standard.
*
*
* @param associationStatus
* The enablement status of a control in a specific standard.
* @see AssociationStatus
*/
public void setAssociationStatus(String associationStatus) {
this.associationStatus = associationStatus;
}
/**
*
* The enablement status of a control in a specific standard.
*
*
* @return The enablement status of a control in a specific standard.
* @see AssociationStatus
*/
public String getAssociationStatus() {
return this.associationStatus;
}
/**
*
* The enablement status of a control in a specific standard.
*
*
* @param associationStatus
* The enablement status of a control in a specific standard.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssociationStatus
*/
public StandardsControlAssociationSummary withAssociationStatus(String associationStatus) {
setAssociationStatus(associationStatus);
return this;
}
/**
*
* The enablement status of a control in a specific standard.
*
*
* @param associationStatus
* The enablement status of a control in a specific standard.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AssociationStatus
*/
public StandardsControlAssociationSummary withAssociationStatus(AssociationStatus associationStatus) {
this.associationStatus = associationStatus.toString();
return this;
}
/**
*
* The requirement that underlies this control in the compliance framework related to the standard.
*
*
* @return The requirement that underlies this control in the compliance framework related to the standard.
*/
public java.util.List getRelatedRequirements() {
return relatedRequirements;
}
/**
*
* The requirement that underlies this control in the compliance framework related to the standard.
*
*
* @param relatedRequirements
* The requirement that underlies this control in the compliance framework related to the standard.
*/
public void setRelatedRequirements(java.util.Collection relatedRequirements) {
if (relatedRequirements == null) {
this.relatedRequirements = null;
return;
}
this.relatedRequirements = new java.util.ArrayList(relatedRequirements);
}
/**
*
* The requirement that underlies this control in the compliance framework related to the standard.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRelatedRequirements(java.util.Collection)} or {@link #withRelatedRequirements(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param relatedRequirements
* The requirement that underlies this control in the compliance framework related to the standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withRelatedRequirements(String... relatedRequirements) {
if (this.relatedRequirements == null) {
setRelatedRequirements(new java.util.ArrayList(relatedRequirements.length));
}
for (String ele : relatedRequirements) {
this.relatedRequirements.add(ele);
}
return this;
}
/**
*
* The requirement that underlies this control in the compliance framework related to the standard.
*
*
* @param relatedRequirements
* The requirement that underlies this control in the compliance framework related to the standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withRelatedRequirements(java.util.Collection relatedRequirements) {
setRelatedRequirements(relatedRequirements);
return this;
}
/**
*
* The last time that a control's enablement status in a specified standard was updated.
*
*
* @param updatedAt
* The last time that a control's enablement status in a specified standard was updated.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The last time that a control's enablement status in a specified standard was updated.
*
*
* @return The last time that a control's enablement status in a specified standard was updated.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The last time that a control's enablement status in a specified standard was updated.
*
*
* @param updatedAt
* The last time that a control's enablement status in a specified standard was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The reason for updating a control's enablement status in a specified standard.
*
*
* @param updatedReason
* The reason for updating a control's enablement status in a specified standard.
*/
public void setUpdatedReason(String updatedReason) {
this.updatedReason = updatedReason;
}
/**
*
* The reason for updating a control's enablement status in a specified standard.
*
*
* @return The reason for updating a control's enablement status in a specified standard.
*/
public String getUpdatedReason() {
return this.updatedReason;
}
/**
*
* The reason for updating a control's enablement status in a specified standard.
*
*
* @param updatedReason
* The reason for updating a control's enablement status in a specified standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withUpdatedReason(String updatedReason) {
setUpdatedReason(updatedReason);
return this;
}
/**
*
* The title of a control.
*
*
* @param standardsControlTitle
* The title of a control.
*/
public void setStandardsControlTitle(String standardsControlTitle) {
this.standardsControlTitle = standardsControlTitle;
}
/**
*
* The title of a control.
*
*
* @return The title of a control.
*/
public String getStandardsControlTitle() {
return this.standardsControlTitle;
}
/**
*
* The title of a control.
*
*
* @param standardsControlTitle
* The title of a control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withStandardsControlTitle(String standardsControlTitle) {
setStandardsControlTitle(standardsControlTitle);
return this;
}
/**
*
* The description of a control. This typically summarizes how Security Hub evaluates the control and the conditions
* under which it produces a failed finding. The parameter may reference a specific standard.
*
*
* @param standardsControlDescription
* The description of a control. This typically summarizes how Security Hub evaluates the control and the
* conditions under which it produces a failed finding. The parameter may reference a specific standard.
*/
public void setStandardsControlDescription(String standardsControlDescription) {
this.standardsControlDescription = standardsControlDescription;
}
/**
*
* The description of a control. This typically summarizes how Security Hub evaluates the control and the conditions
* under which it produces a failed finding. The parameter may reference a specific standard.
*
*
* @return The description of a control. This typically summarizes how Security Hub evaluates the control and the
* conditions under which it produces a failed finding. The parameter may reference a specific standard.
*/
public String getStandardsControlDescription() {
return this.standardsControlDescription;
}
/**
*
* The description of a control. This typically summarizes how Security Hub evaluates the control and the conditions
* under which it produces a failed finding. The parameter may reference a specific standard.
*
*
* @param standardsControlDescription
* The description of a control. This typically summarizes how Security Hub evaluates the control and the
* conditions under which it produces a failed finding. The parameter may reference a specific standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsControlAssociationSummary withStandardsControlDescription(String standardsControlDescription) {
setStandardsControlDescription(standardsControlDescription);
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 (getStandardsArn() != null)
sb.append("StandardsArn: ").append(getStandardsArn()).append(",");
if (getSecurityControlId() != null)
sb.append("SecurityControlId: ").append(getSecurityControlId()).append(",");
if (getSecurityControlArn() != null)
sb.append("SecurityControlArn: ").append(getSecurityControlArn()).append(",");
if (getAssociationStatus() != null)
sb.append("AssociationStatus: ").append(getAssociationStatus()).append(",");
if (getRelatedRequirements() != null)
sb.append("RelatedRequirements: ").append(getRelatedRequirements()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).append(",");
if (getUpdatedReason() != null)
sb.append("UpdatedReason: ").append(getUpdatedReason()).append(",");
if (getStandardsControlTitle() != null)
sb.append("StandardsControlTitle: ").append(getStandardsControlTitle()).append(",");
if (getStandardsControlDescription() != null)
sb.append("StandardsControlDescription: ").append(getStandardsControlDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StandardsControlAssociationSummary == false)
return false;
StandardsControlAssociationSummary other = (StandardsControlAssociationSummary) obj;
if (other.getStandardsArn() == null ^ this.getStandardsArn() == null)
return false;
if (other.getStandardsArn() != null && other.getStandardsArn().equals(this.getStandardsArn()) == false)
return false;
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.getAssociationStatus() == null ^ this.getAssociationStatus() == null)
return false;
if (other.getAssociationStatus() != null && other.getAssociationStatus().equals(this.getAssociationStatus()) == false)
return false;
if (other.getRelatedRequirements() == null ^ this.getRelatedRequirements() == null)
return false;
if (other.getRelatedRequirements() != null && other.getRelatedRequirements().equals(this.getRelatedRequirements()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
if (other.getUpdatedReason() == null ^ this.getUpdatedReason() == null)
return false;
if (other.getUpdatedReason() != null && other.getUpdatedReason().equals(this.getUpdatedReason()) == false)
return false;
if (other.getStandardsControlTitle() == null ^ this.getStandardsControlTitle() == null)
return false;
if (other.getStandardsControlTitle() != null && other.getStandardsControlTitle().equals(this.getStandardsControlTitle()) == false)
return false;
if (other.getStandardsControlDescription() == null ^ this.getStandardsControlDescription() == null)
return false;
if (other.getStandardsControlDescription() != null && other.getStandardsControlDescription().equals(this.getStandardsControlDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStandardsArn() == null) ? 0 : getStandardsArn().hashCode());
hashCode = prime * hashCode + ((getSecurityControlId() == null) ? 0 : getSecurityControlId().hashCode());
hashCode = prime * hashCode + ((getSecurityControlArn() == null) ? 0 : getSecurityControlArn().hashCode());
hashCode = prime * hashCode + ((getAssociationStatus() == null) ? 0 : getAssociationStatus().hashCode());
hashCode = prime * hashCode + ((getRelatedRequirements() == null) ? 0 : getRelatedRequirements().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getUpdatedReason() == null) ? 0 : getUpdatedReason().hashCode());
hashCode = prime * hashCode + ((getStandardsControlTitle() == null) ? 0 : getStandardsControlTitle().hashCode());
hashCode = prime * hashCode + ((getStandardsControlDescription() == null) ? 0 : getStandardsControlDescription().hashCode());
return hashCode;
}
@Override
public StandardsControlAssociationSummary clone() {
try {
return (StandardsControlAssociationSummary) 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.StandardsControlAssociationSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}