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

com.amazonaws.services.securityhub.model.SecurityHubPolicy 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.772
Show newest version
/*
 * 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 object that defines how Security Hub is configured. The configuration policy includes whether Security Hub is * enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a * list of custom parameter values for specified controls. If you provide a list of security controls that are enabled * in the configuration policy, Security Hub disables all other controls (including newly released controls). If you * provide a list of security controls that are disabled in the configuration policy, Security Hub enables all other * controls (including newly released controls). *

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

* Indicates whether Security Hub is enabled in the policy. *

*/ private Boolean serviceEnabled; /** *

* A list that defines which security standards are enabled in the configuration policy. *

*/ private java.util.List enabledStandardIdentifiers; /** *

* An object that defines which security controls are enabled in the configuration policy. The enablement status of * a control is aligned across all of the enabled standards in an account. *

*/ private SecurityControlsConfiguration securityControlsConfiguration; /** *

* Indicates whether Security Hub is enabled in the policy. *

* * @param serviceEnabled * Indicates whether Security Hub is enabled in the policy. */ public void setServiceEnabled(Boolean serviceEnabled) { this.serviceEnabled = serviceEnabled; } /** *

* Indicates whether Security Hub is enabled in the policy. *

* * @return Indicates whether Security Hub is enabled in the policy. */ public Boolean getServiceEnabled() { return this.serviceEnabled; } /** *

* Indicates whether Security Hub is enabled in the policy. *

* * @param serviceEnabled * Indicates whether Security Hub is enabled in the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityHubPolicy withServiceEnabled(Boolean serviceEnabled) { setServiceEnabled(serviceEnabled); return this; } /** *

* Indicates whether Security Hub is enabled in the policy. *

* * @return Indicates whether Security Hub is enabled in the policy. */ public Boolean isServiceEnabled() { return this.serviceEnabled; } /** *

* A list that defines which security standards are enabled in the configuration policy. *

* * @return A list that defines which security standards are enabled in the configuration policy. */ public java.util.List getEnabledStandardIdentifiers() { return enabledStandardIdentifiers; } /** *

* A list that defines which security standards are enabled in the configuration policy. *

* * @param enabledStandardIdentifiers * A list that defines which security standards are enabled in the configuration policy. */ public void setEnabledStandardIdentifiers(java.util.Collection enabledStandardIdentifiers) { if (enabledStandardIdentifiers == null) { this.enabledStandardIdentifiers = null; return; } this.enabledStandardIdentifiers = new java.util.ArrayList(enabledStandardIdentifiers); } /** *

* A list that defines which security standards are enabled in the configuration policy. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setEnabledStandardIdentifiers(java.util.Collection)} or * {@link #withEnabledStandardIdentifiers(java.util.Collection)} if you want to override the existing values. *

* * @param enabledStandardIdentifiers * A list that defines which security standards are enabled in the configuration policy. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityHubPolicy withEnabledStandardIdentifiers(String... enabledStandardIdentifiers) { if (this.enabledStandardIdentifiers == null) { setEnabledStandardIdentifiers(new java.util.ArrayList(enabledStandardIdentifiers.length)); } for (String ele : enabledStandardIdentifiers) { this.enabledStandardIdentifiers.add(ele); } return this; } /** *

* A list that defines which security standards are enabled in the configuration policy. *

* * @param enabledStandardIdentifiers * A list that defines which security standards are enabled in the configuration policy. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityHubPolicy withEnabledStandardIdentifiers(java.util.Collection enabledStandardIdentifiers) { setEnabledStandardIdentifiers(enabledStandardIdentifiers); return this; } /** *

* An object that defines which security controls are enabled in the configuration policy. The enablement status of * a control is aligned across all of the enabled standards in an account. *

* * @param securityControlsConfiguration * An object that defines which security controls are enabled in the configuration policy. The enablement * status of a control is aligned across all of the enabled standards in an account. */ public void setSecurityControlsConfiguration(SecurityControlsConfiguration securityControlsConfiguration) { this.securityControlsConfiguration = securityControlsConfiguration; } /** *

* An object that defines which security controls are enabled in the configuration policy. The enablement status of * a control is aligned across all of the enabled standards in an account. *

* * @return An object that defines which security controls are enabled in the configuration policy. The enablement * status of a control is aligned across all of the enabled standards in an account. */ public SecurityControlsConfiguration getSecurityControlsConfiguration() { return this.securityControlsConfiguration; } /** *

* An object that defines which security controls are enabled in the configuration policy. The enablement status of * a control is aligned across all of the enabled standards in an account. *

* * @param securityControlsConfiguration * An object that defines which security controls are enabled in the configuration policy. The enablement * status of a control is aligned across all of the enabled standards in an account. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityHubPolicy withSecurityControlsConfiguration(SecurityControlsConfiguration securityControlsConfiguration) { setSecurityControlsConfiguration(securityControlsConfiguration); 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 (getServiceEnabled() != null) sb.append("ServiceEnabled: ").append(getServiceEnabled()).append(","); if (getEnabledStandardIdentifiers() != null) sb.append("EnabledStandardIdentifiers: ").append(getEnabledStandardIdentifiers()).append(","); if (getSecurityControlsConfiguration() != null) sb.append("SecurityControlsConfiguration: ").append(getSecurityControlsConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SecurityHubPolicy == false) return false; SecurityHubPolicy other = (SecurityHubPolicy) obj; if (other.getServiceEnabled() == null ^ this.getServiceEnabled() == null) return false; if (other.getServiceEnabled() != null && other.getServiceEnabled().equals(this.getServiceEnabled()) == false) return false; if (other.getEnabledStandardIdentifiers() == null ^ this.getEnabledStandardIdentifiers() == null) return false; if (other.getEnabledStandardIdentifiers() != null && other.getEnabledStandardIdentifiers().equals(this.getEnabledStandardIdentifiers()) == false) return false; if (other.getSecurityControlsConfiguration() == null ^ this.getSecurityControlsConfiguration() == null) return false; if (other.getSecurityControlsConfiguration() != null && other.getSecurityControlsConfiguration().equals(this.getSecurityControlsConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServiceEnabled() == null) ? 0 : getServiceEnabled().hashCode()); hashCode = prime * hashCode + ((getEnabledStandardIdentifiers() == null) ? 0 : getEnabledStandardIdentifiers().hashCode()); hashCode = prime * hashCode + ((getSecurityControlsConfiguration() == null) ? 0 : getSecurityControlsConfiguration().hashCode()); return hashCode; } @Override public SecurityHubPolicy clone() { try { return (SecurityHubPolicy) 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.SecurityHubPolicyMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy