com.amazonaws.services.securityhub.model.RuleGroupSourceListDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2017-2022 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;
/**
*
* Stateful inspection criteria for a domain list rule group.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RuleGroupSourceListDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* Indicates whether to allow or deny access to the domains listed in Targets
.
*
*/
private String generatedRulesType;
/**
*
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify HTTP_HOST
for
* HTTP. You can specify either or both.
*
*/
private java.util.List targetTypes;
/**
*
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use the '.'
* prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*
*/
private java.util.List targets;
/**
*
* Indicates whether to allow or deny access to the domains listed in Targets
.
*
*
* @param generatedRulesType
* Indicates whether to allow or deny access to the domains listed in Targets
.
*/
public void setGeneratedRulesType(String generatedRulesType) {
this.generatedRulesType = generatedRulesType;
}
/**
*
* Indicates whether to allow or deny access to the domains listed in Targets
.
*
*
* @return Indicates whether to allow or deny access to the domains listed in Targets
.
*/
public String getGeneratedRulesType() {
return this.generatedRulesType;
}
/**
*
* Indicates whether to allow or deny access to the domains listed in Targets
.
*
*
* @param generatedRulesType
* Indicates whether to allow or deny access to the domains listed in Targets
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleGroupSourceListDetails withGeneratedRulesType(String generatedRulesType) {
setGeneratedRulesType(generatedRulesType);
return this;
}
/**
*
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify HTTP_HOST
for
* HTTP. You can specify either or both.
*
*
* @return The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify
* HTTP_HOST
for HTTP. You can specify either or both.
*/
public java.util.List getTargetTypes() {
return targetTypes;
}
/**
*
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify HTTP_HOST
for
* HTTP. You can specify either or both.
*
*
* @param targetTypes
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify
* HTTP_HOST
for HTTP. You can specify either or both.
*/
public void setTargetTypes(java.util.Collection targetTypes) {
if (targetTypes == null) {
this.targetTypes = null;
return;
}
this.targetTypes = new java.util.ArrayList(targetTypes);
}
/**
*
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify HTTP_HOST
for
* HTTP. You can specify either or both.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargetTypes(java.util.Collection)} or {@link #withTargetTypes(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param targetTypes
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify
* HTTP_HOST
for HTTP. You can specify either or both.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleGroupSourceListDetails withTargetTypes(String... targetTypes) {
if (this.targetTypes == null) {
setTargetTypes(new java.util.ArrayList(targetTypes.length));
}
for (String ele : targetTypes) {
this.targetTypes.add(ele);
}
return this;
}
/**
*
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify HTTP_HOST
for
* HTTP. You can specify either or both.
*
*
* @param targetTypes
* The protocols that you want to inspect. Specify LS_SNI
for HTTPS. Specify
* HTTP_HOST
for HTTP. You can specify either or both.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleGroupSourceListDetails withTargetTypes(java.util.Collection targetTypes) {
setTargetTypes(targetTypes);
return this;
}
/**
*
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use the '.'
* prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*
*
* @return The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use
* the '.' prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*/
public java.util.List getTargets() {
return targets;
}
/**
*
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use the '.'
* prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*
*
* @param targets
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use
* the '.' prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*/
public void setTargets(java.util.Collection targets) {
if (targets == null) {
this.targets = null;
return;
}
this.targets = new java.util.ArrayList(targets);
}
/**
*
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use the '.'
* prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargets(java.util.Collection)} or {@link #withTargets(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param targets
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use
* the '.' prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleGroupSourceListDetails withTargets(String... targets) {
if (this.targets == null) {
setTargets(new java.util.ArrayList(targets.length));
}
for (String ele : targets) {
this.targets.add(ele);
}
return this;
}
/**
*
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use the '.'
* prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
*
*
* @param targets
* The domains that you want to inspect for in your traffic flows. You can provide full domain names, or use
* the '.' prefix as a wildcard. For example, .example.com
matches all domains that end with
* example.com
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleGroupSourceListDetails withTargets(java.util.Collection targets) {
setTargets(targets);
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 (getGeneratedRulesType() != null)
sb.append("GeneratedRulesType: ").append(getGeneratedRulesType()).append(",");
if (getTargetTypes() != null)
sb.append("TargetTypes: ").append(getTargetTypes()).append(",");
if (getTargets() != null)
sb.append("Targets: ").append(getTargets());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RuleGroupSourceListDetails == false)
return false;
RuleGroupSourceListDetails other = (RuleGroupSourceListDetails) obj;
if (other.getGeneratedRulesType() == null ^ this.getGeneratedRulesType() == null)
return false;
if (other.getGeneratedRulesType() != null && other.getGeneratedRulesType().equals(this.getGeneratedRulesType()) == false)
return false;
if (other.getTargetTypes() == null ^ this.getTargetTypes() == null)
return false;
if (other.getTargetTypes() != null && other.getTargetTypes().equals(this.getTargetTypes()) == false)
return false;
if (other.getTargets() == null ^ this.getTargets() == null)
return false;
if (other.getTargets() != null && other.getTargets().equals(this.getTargets()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGeneratedRulesType() == null) ? 0 : getGeneratedRulesType().hashCode());
hashCode = prime * hashCode + ((getTargetTypes() == null) ? 0 : getTargetTypes().hashCode());
hashCode = prime * hashCode + ((getTargets() == null) ? 0 : getTargets().hashCode());
return hashCode;
}
@Override
public RuleGroupSourceListDetails clone() {
try {
return (RuleGroupSourceListDetails) 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.RuleGroupSourceListDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}