com.amazonaws.services.securityhub.model.ConfigurationOptions 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The options for customizing a security control parameter.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfigurationOptions implements Serializable, Cloneable, StructuredPojo {
/**
*
* The options for customizing a security control parameter that is an integer.
*
*/
private IntegerConfigurationOptions integer;
/**
*
* The options for customizing a security control parameter that is a list of integers.
*
*/
private IntegerListConfigurationOptions integerList;
/**
*
* The options for customizing a security control parameter that is a double.
*
*/
private DoubleConfigurationOptions doubleValue;
/**
*
* The options for customizing a security control parameter that is a string data type.
*
*/
private StringConfigurationOptions string;
/**
*
* The options for customizing a security control parameter that is a list of strings.
*
*/
private StringListConfigurationOptions stringList;
/**
*
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the options
* are true
and false
.
*
*/
private BooleanConfigurationOptions booleanValue;
/**
*
* The options for customizing a security control parameter that is an enum.
*
*/
private EnumConfigurationOptions enumValue;
/**
*
* The options for customizing a security control parameter that is a list of enums.
*
*/
private EnumListConfigurationOptions enumList;
/**
*
* The options for customizing a security control parameter that is an integer.
*
*
* @param integer
* The options for customizing a security control parameter that is an integer.
*/
public void setInteger(IntegerConfigurationOptions integer) {
this.integer = integer;
}
/**
*
* The options for customizing a security control parameter that is an integer.
*
*
* @return The options for customizing a security control parameter that is an integer.
*/
public IntegerConfigurationOptions getInteger() {
return this.integer;
}
/**
*
* The options for customizing a security control parameter that is an integer.
*
*
* @param integer
* The options for customizing a security control parameter that is an integer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withInteger(IntegerConfigurationOptions integer) {
setInteger(integer);
return this;
}
/**
*
* The options for customizing a security control parameter that is a list of integers.
*
*
* @param integerList
* The options for customizing a security control parameter that is a list of integers.
*/
public void setIntegerList(IntegerListConfigurationOptions integerList) {
this.integerList = integerList;
}
/**
*
* The options for customizing a security control parameter that is a list of integers.
*
*
* @return The options for customizing a security control parameter that is a list of integers.
*/
public IntegerListConfigurationOptions getIntegerList() {
return this.integerList;
}
/**
*
* The options for customizing a security control parameter that is a list of integers.
*
*
* @param integerList
* The options for customizing a security control parameter that is a list of integers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withIntegerList(IntegerListConfigurationOptions integerList) {
setIntegerList(integerList);
return this;
}
/**
*
* The options for customizing a security control parameter that is a double.
*
*
* @param doubleValue
* The options for customizing a security control parameter that is a double.
*/
public void setDouble(DoubleConfigurationOptions doubleValue) {
this.doubleValue = doubleValue;
}
/**
*
* The options for customizing a security control parameter that is a double.
*
*
* @return The options for customizing a security control parameter that is a double.
*/
public DoubleConfigurationOptions getDouble() {
return this.doubleValue;
}
/**
*
* The options for customizing a security control parameter that is a double.
*
*
* @param doubleValue
* The options for customizing a security control parameter that is a double.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withDouble(DoubleConfigurationOptions doubleValue) {
setDouble(doubleValue);
return this;
}
/**
*
* The options for customizing a security control parameter that is a string data type.
*
*
* @param string
* The options for customizing a security control parameter that is a string data type.
*/
public void setString(StringConfigurationOptions string) {
this.string = string;
}
/**
*
* The options for customizing a security control parameter that is a string data type.
*
*
* @return The options for customizing a security control parameter that is a string data type.
*/
public StringConfigurationOptions getString() {
return this.string;
}
/**
*
* The options for customizing a security control parameter that is a string data type.
*
*
* @param string
* The options for customizing a security control parameter that is a string data type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withString(StringConfigurationOptions string) {
setString(string);
return this;
}
/**
*
* The options for customizing a security control parameter that is a list of strings.
*
*
* @param stringList
* The options for customizing a security control parameter that is a list of strings.
*/
public void setStringList(StringListConfigurationOptions stringList) {
this.stringList = stringList;
}
/**
*
* The options for customizing a security control parameter that is a list of strings.
*
*
* @return The options for customizing a security control parameter that is a list of strings.
*/
public StringListConfigurationOptions getStringList() {
return this.stringList;
}
/**
*
* The options for customizing a security control parameter that is a list of strings.
*
*
* @param stringList
* The options for customizing a security control parameter that is a list of strings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withStringList(StringListConfigurationOptions stringList) {
setStringList(stringList);
return this;
}
/**
*
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the options
* are true
and false
.
*
*
* @param booleanValue
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the
* options are true
and false
.
*/
public void setBoolean(BooleanConfigurationOptions booleanValue) {
this.booleanValue = booleanValue;
}
/**
*
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the options
* are true
and false
.
*
*
* @return The options for customizing a security control parameter that is a boolean. For a boolean parameter, the
* options are true
and false
.
*/
public BooleanConfigurationOptions getBoolean() {
return this.booleanValue;
}
/**
*
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the options
* are true
and false
.
*
*
* @param booleanValue
* The options for customizing a security control parameter that is a boolean. For a boolean parameter, the
* options are true
and false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withBoolean(BooleanConfigurationOptions booleanValue) {
setBoolean(booleanValue);
return this;
}
/**
*
* The options for customizing a security control parameter that is an enum.
*
*
* @param enumValue
* The options for customizing a security control parameter that is an enum.
*/
public void setEnum(EnumConfigurationOptions enumValue) {
this.enumValue = enumValue;
}
/**
*
* The options for customizing a security control parameter that is an enum.
*
*
* @return The options for customizing a security control parameter that is an enum.
*/
public EnumConfigurationOptions getEnum() {
return this.enumValue;
}
/**
*
* The options for customizing a security control parameter that is an enum.
*
*
* @param enumValue
* The options for customizing a security control parameter that is an enum.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withEnum(EnumConfigurationOptions enumValue) {
setEnum(enumValue);
return this;
}
/**
*
* The options for customizing a security control parameter that is a list of enums.
*
*
* @param enumList
* The options for customizing a security control parameter that is a list of enums.
*/
public void setEnumList(EnumListConfigurationOptions enumList) {
this.enumList = enumList;
}
/**
*
* The options for customizing a security control parameter that is a list of enums.
*
*
* @return The options for customizing a security control parameter that is a list of enums.
*/
public EnumListConfigurationOptions getEnumList() {
return this.enumList;
}
/**
*
* The options for customizing a security control parameter that is a list of enums.
*
*
* @param enumList
* The options for customizing a security control parameter that is a list of enums.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationOptions withEnumList(EnumListConfigurationOptions enumList) {
setEnumList(enumList);
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 (getInteger() != null)
sb.append("Integer: ").append(getInteger()).append(",");
if (getIntegerList() != null)
sb.append("IntegerList: ").append(getIntegerList()).append(",");
if (getDouble() != null)
sb.append("Double: ").append(getDouble()).append(",");
if (getString() != null)
sb.append("String: ").append(getString()).append(",");
if (getStringList() != null)
sb.append("StringList: ").append(getStringList()).append(",");
if (getBoolean() != null)
sb.append("Boolean: ").append(getBoolean()).append(",");
if (getEnum() != null)
sb.append("Enum: ").append(getEnum()).append(",");
if (getEnumList() != null)
sb.append("EnumList: ").append(getEnumList());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConfigurationOptions == false)
return false;
ConfigurationOptions other = (ConfigurationOptions) obj;
if (other.getInteger() == null ^ this.getInteger() == null)
return false;
if (other.getInteger() != null && other.getInteger().equals(this.getInteger()) == false)
return false;
if (other.getIntegerList() == null ^ this.getIntegerList() == null)
return false;
if (other.getIntegerList() != null && other.getIntegerList().equals(this.getIntegerList()) == false)
return false;
if (other.getDouble() == null ^ this.getDouble() == null)
return false;
if (other.getDouble() != null && other.getDouble().equals(this.getDouble()) == false)
return false;
if (other.getString() == null ^ this.getString() == null)
return false;
if (other.getString() != null && other.getString().equals(this.getString()) == false)
return false;
if (other.getStringList() == null ^ this.getStringList() == null)
return false;
if (other.getStringList() != null && other.getStringList().equals(this.getStringList()) == false)
return false;
if (other.getBoolean() == null ^ this.getBoolean() == null)
return false;
if (other.getBoolean() != null && other.getBoolean().equals(this.getBoolean()) == false)
return false;
if (other.getEnum() == null ^ this.getEnum() == null)
return false;
if (other.getEnum() != null && other.getEnum().equals(this.getEnum()) == false)
return false;
if (other.getEnumList() == null ^ this.getEnumList() == null)
return false;
if (other.getEnumList() != null && other.getEnumList().equals(this.getEnumList()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInteger() == null) ? 0 : getInteger().hashCode());
hashCode = prime * hashCode + ((getIntegerList() == null) ? 0 : getIntegerList().hashCode());
hashCode = prime * hashCode + ((getDouble() == null) ? 0 : getDouble().hashCode());
hashCode = prime * hashCode + ((getString() == null) ? 0 : getString().hashCode());
hashCode = prime * hashCode + ((getStringList() == null) ? 0 : getStringList().hashCode());
hashCode = prime * hashCode + ((getBoolean() == null) ? 0 : getBoolean().hashCode());
hashCode = prime * hashCode + ((getEnum() == null) ? 0 : getEnum().hashCode());
hashCode = prime * hashCode + ((getEnumList() == null) ? 0 : getEnumList().hashCode());
return hashCode;
}
@Override
public ConfigurationOptions clone() {
try {
return (ConfigurationOptions) 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.ConfigurationOptionsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}