com.amazonaws.services.securityhub.model.DescribeHubResult 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;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeHubResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN of the Hub resource that was retrieved.
*
*/
private String hubArn;
/**
*
* The date and time when Security Hub was enabled in the account.
*
*/
private String subscribedAt;
/**
*
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*
*/
private Boolean autoEnableControls;
/**
*
* Specifies whether the calling account has consolidated control findings turned on. If the value for this field is
* set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check even when the
* check applies to multiple enabled standards.
*
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate findings for
* a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts that
* aren't part of an organization, the default value of this field is SECURITY_CONTROL
if you enabled
* Security Hub on or after February 23, 2023.
*
*/
private String controlFindingGenerator;
/**
*
* The ARN of the Hub resource that was retrieved.
*
*
* @param hubArn
* The ARN of the Hub resource that was retrieved.
*/
public void setHubArn(String hubArn) {
this.hubArn = hubArn;
}
/**
*
* The ARN of the Hub resource that was retrieved.
*
*
* @return The ARN of the Hub resource that was retrieved.
*/
public String getHubArn() {
return this.hubArn;
}
/**
*
* The ARN of the Hub resource that was retrieved.
*
*
* @param hubArn
* The ARN of the Hub resource that was retrieved.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeHubResult withHubArn(String hubArn) {
setHubArn(hubArn);
return this;
}
/**
*
* The date and time when Security Hub was enabled in the account.
*
*
* @param subscribedAt
* The date and time when Security Hub was enabled in the account.
*/
public void setSubscribedAt(String subscribedAt) {
this.subscribedAt = subscribedAt;
}
/**
*
* The date and time when Security Hub was enabled in the account.
*
*
* @return The date and time when Security Hub was enabled in the account.
*/
public String getSubscribedAt() {
return this.subscribedAt;
}
/**
*
* The date and time when Security Hub was enabled in the account.
*
*
* @param subscribedAt
* The date and time when Security Hub was enabled in the account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeHubResult withSubscribedAt(String subscribedAt) {
setSubscribedAt(subscribedAt);
return this;
}
/**
*
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*
*
* @param autoEnableControls
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*/
public void setAutoEnableControls(Boolean autoEnableControls) {
this.autoEnableControls = autoEnableControls;
}
/**
*
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*
*
* @return Whether to automatically enable new controls when they are added to standards that are enabled.
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*/
public Boolean getAutoEnableControls() {
return this.autoEnableControls;
}
/**
*
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*
*
* @param autoEnableControls
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeHubResult withAutoEnableControls(Boolean autoEnableControls) {
setAutoEnableControls(autoEnableControls);
return this;
}
/**
*
* Whether to automatically enable new controls when they are added to standards that are enabled.
*
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*
*
* @return Whether to automatically enable new controls when they are added to standards that are enabled.
*
* If set to true
, then new controls for enabled standards are enabled automatically. If set to
* false
, then new controls are not enabled.
*/
public Boolean isAutoEnableControls() {
return this.autoEnableControls;
}
/**
*
* Specifies whether the calling account has consolidated control findings turned on. If the value for this field is
* set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check even when the
* check applies to multiple enabled standards.
*
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate findings for
* a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts that
* aren't part of an organization, the default value of this field is SECURITY_CONTROL
if you enabled
* Security Hub on or after February 23, 2023.
*
*
* @param controlFindingGenerator
* Specifies whether the calling account has consolidated control findings turned on. If the value for this
* field is set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check
* even when the check applies to multiple enabled standards.
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate
* findings for a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts
* that aren't part of an organization, the default value of this field is SECURITY_CONTROL
if
* you enabled Security Hub on or after February 23, 2023.
* @see ControlFindingGenerator
*/
public void setControlFindingGenerator(String controlFindingGenerator) {
this.controlFindingGenerator = controlFindingGenerator;
}
/**
*
* Specifies whether the calling account has consolidated control findings turned on. If the value for this field is
* set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check even when the
* check applies to multiple enabled standards.
*
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate findings for
* a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts that
* aren't part of an organization, the default value of this field is SECURITY_CONTROL
if you enabled
* Security Hub on or after February 23, 2023.
*
*
* @return Specifies whether the calling account has consolidated control findings turned on. If the value for this
* field is set to SECURITY_CONTROL
, Security Hub generates a single finding for a control
* check even when the check applies to multiple enabled standards.
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate
* findings for a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts
* that aren't part of an organization, the default value of this field is SECURITY_CONTROL
if
* you enabled Security Hub on or after February 23, 2023.
* @see ControlFindingGenerator
*/
public String getControlFindingGenerator() {
return this.controlFindingGenerator;
}
/**
*
* Specifies whether the calling account has consolidated control findings turned on. If the value for this field is
* set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check even when the
* check applies to multiple enabled standards.
*
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate findings for
* a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts that
* aren't part of an organization, the default value of this field is SECURITY_CONTROL
if you enabled
* Security Hub on or after February 23, 2023.
*
*
* @param controlFindingGenerator
* Specifies whether the calling account has consolidated control findings turned on. If the value for this
* field is set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check
* even when the check applies to multiple enabled standards.
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate
* findings for a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts
* that aren't part of an organization, the default value of this field is SECURITY_CONTROL
if
* you enabled Security Hub on or after February 23, 2023.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ControlFindingGenerator
*/
public DescribeHubResult withControlFindingGenerator(String controlFindingGenerator) {
setControlFindingGenerator(controlFindingGenerator);
return this;
}
/**
*
* Specifies whether the calling account has consolidated control findings turned on. If the value for this field is
* set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check even when the
* check applies to multiple enabled standards.
*
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate findings for
* a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts that
* aren't part of an organization, the default value of this field is SECURITY_CONTROL
if you enabled
* Security Hub on or after February 23, 2023.
*
*
* @param controlFindingGenerator
* Specifies whether the calling account has consolidated control findings turned on. If the value for this
* field is set to SECURITY_CONTROL
, Security Hub generates a single finding for a control check
* even when the check applies to multiple enabled standards.
*
* If the value for this field is set to STANDARD_CONTROL
, Security Hub generates separate
* findings for a control check when the check applies to multiple enabled standards.
*
*
* The value for this field in a member account matches the value in the administrator account. For accounts
* that aren't part of an organization, the default value of this field is SECURITY_CONTROL
if
* you enabled Security Hub on or after February 23, 2023.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ControlFindingGenerator
*/
public DescribeHubResult withControlFindingGenerator(ControlFindingGenerator controlFindingGenerator) {
this.controlFindingGenerator = controlFindingGenerator.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 (getHubArn() != null)
sb.append("HubArn: ").append(getHubArn()).append(",");
if (getSubscribedAt() != null)
sb.append("SubscribedAt: ").append(getSubscribedAt()).append(",");
if (getAutoEnableControls() != null)
sb.append("AutoEnableControls: ").append(getAutoEnableControls()).append(",");
if (getControlFindingGenerator() != null)
sb.append("ControlFindingGenerator: ").append(getControlFindingGenerator());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeHubResult == false)
return false;
DescribeHubResult other = (DescribeHubResult) obj;
if (other.getHubArn() == null ^ this.getHubArn() == null)
return false;
if (other.getHubArn() != null && other.getHubArn().equals(this.getHubArn()) == false)
return false;
if (other.getSubscribedAt() == null ^ this.getSubscribedAt() == null)
return false;
if (other.getSubscribedAt() != null && other.getSubscribedAt().equals(this.getSubscribedAt()) == false)
return false;
if (other.getAutoEnableControls() == null ^ this.getAutoEnableControls() == null)
return false;
if (other.getAutoEnableControls() != null && other.getAutoEnableControls().equals(this.getAutoEnableControls()) == false)
return false;
if (other.getControlFindingGenerator() == null ^ this.getControlFindingGenerator() == null)
return false;
if (other.getControlFindingGenerator() != null && other.getControlFindingGenerator().equals(this.getControlFindingGenerator()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getHubArn() == null) ? 0 : getHubArn().hashCode());
hashCode = prime * hashCode + ((getSubscribedAt() == null) ? 0 : getSubscribedAt().hashCode());
hashCode = prime * hashCode + ((getAutoEnableControls() == null) ? 0 : getAutoEnableControls().hashCode());
hashCode = prime * hashCode + ((getControlFindingGenerator() == null) ? 0 : getControlFindingGenerator().hashCode());
return hashCode;
}
@Override
public DescribeHubResult clone() {
try {
return (DescribeHubResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}