
shiver.me.timbers.aws.wafv2.RuleGroup Maven / Gradle / Ivy
package shiver.me.timbers.aws.wafv2;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
import shiver.me.timbers.aws.Tag;
/**
* RuleGroup
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Capacity",
"Description",
"Name",
"Scope",
"Rules",
"VisibilityConfig",
"Tags"
})
public class RuleGroup {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-capacity
*
*/
@JsonProperty("Capacity")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-capacity")
private Number capacity;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-description
*
*/
@JsonProperty("Description")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-description")
private CharSequence description;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-name
*
*/
@JsonProperty("Name")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-name")
private CharSequence name;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-scope
*
*/
@JsonProperty("Scope")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-scope")
private CharSequence scope;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-rules
*
*/
@JsonProperty("Rules")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-rules")
private List> rules = new ArrayList>();
/**
* RuleGroupVisibilityConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-visibilityconfig.html
*
*/
@JsonProperty("VisibilityConfig")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-visibilityconfig.html")
private Property visibilityConfig;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-tags
*
*/
@JsonProperty("Tags")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-tags")
private List> tags = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-capacity
*
*/
@JsonIgnore
public Number getCapacity() {
return capacity;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-capacity
*
*/
@JsonIgnore
public void setCapacity(Number capacity) {
this.capacity = capacity;
}
public RuleGroup withCapacity(Number capacity) {
this.capacity = capacity;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-description
*
*/
@JsonIgnore
public CharSequence getDescription() {
return description;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-description
*
*/
@JsonIgnore
public void setDescription(CharSequence description) {
this.description = description;
}
public RuleGroup withDescription(CharSequence description) {
this.description = description;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-name
*
*/
@JsonIgnore
public CharSequence getName() {
return name;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-name
*
*/
@JsonIgnore
public void setName(CharSequence name) {
this.name = name;
}
public RuleGroup withName(CharSequence name) {
this.name = name;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-scope
*
*/
@JsonIgnore
public CharSequence getScope() {
return scope;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-scope
*
*/
@JsonIgnore
public void setScope(CharSequence scope) {
this.scope = scope;
}
public RuleGroup withScope(CharSequence scope) {
this.scope = scope;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-rules
*
*/
@JsonIgnore
public List> getRules() {
return rules;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-rules
*
*/
@JsonIgnore
public void setRules(List> rules) {
this.rules = rules;
}
public RuleGroup withRules(List> rules) {
this.rules = rules;
return this;
}
/**
* RuleGroupVisibilityConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-visibilityconfig.html
*
*/
@JsonIgnore
public Property getVisibilityConfig() {
return visibilityConfig;
}
/**
* RuleGroupVisibilityConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-visibilityconfig.html
*
*/
@JsonIgnore
public void setVisibilityConfig(Property visibilityConfig) {
this.visibilityConfig = visibilityConfig;
}
public RuleGroup withVisibilityConfig(Property visibilityConfig) {
this.visibilityConfig = visibilityConfig;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-tags
*
*/
@JsonIgnore
public List> getTags() {
return tags;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html#cfn-wafv2-rulegroup-tags
*
*/
@JsonIgnore
public void setTags(List> tags) {
this.tags = tags;
}
public RuleGroup withTags(List> tags) {
this.tags = tags;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("capacity", capacity).append("description", description).append("name", name).append("scope", scope).append("rules", rules).append("visibilityConfig", visibilityConfig).append("tags", tags).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(visibilityConfig).append(scope).append(name).append(description).append(rules).append(capacity).append(tags).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof RuleGroup) == false) {
return false;
}
RuleGroup rhs = ((RuleGroup) other);
return new EqualsBuilder().append(visibilityConfig, rhs.visibilityConfig).append(scope, rhs.scope).append(name, rhs.name).append(description, rhs.description).append(rules, rhs.rules).append(capacity, rhs.capacity).append(tags, rhs.tags).isEquals();
}
}