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

com.amazonaws.services.securityhub.model.AwsWafRegionalRuleDetails 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

The 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;

/**
 * 

* Provides information about an WAF Regional rule. This rule identifies the web requests that you want to allow, block, * or count. *

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

* A name for the metrics for the rule. *

*/ private String metricName; /** *

* A descriptive name for the rule. *

*/ private String name; /** *

* Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates whether you * want to negate the settings. *

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

* The ID of the rule. *

*/ private String ruleId; /** *

* A name for the metrics for the rule. *

* * @param metricName * A name for the metrics for the rule. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** *

* A name for the metrics for the rule. *

* * @return A name for the metrics for the rule. */ public String getMetricName() { return this.metricName; } /** *

* A name for the metrics for the rule. *

* * @param metricName * A name for the metrics for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsWafRegionalRuleDetails withMetricName(String metricName) { setMetricName(metricName); return this; } /** *

* A descriptive name for the rule. *

* * @param name * A descriptive name for the rule. */ public void setName(String name) { this.name = name; } /** *

* A descriptive name for the rule. *

* * @return A descriptive name for the rule. */ public String getName() { return this.name; } /** *

* A descriptive name for the rule. *

* * @param name * A descriptive name for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsWafRegionalRuleDetails withName(String name) { setName(name); return this; } /** *

* Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates whether you * want to negate the settings. *

* * @return Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates * whether you want to negate the settings. */ public java.util.List getPredicateList() { return predicateList; } /** *

* Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates whether you * want to negate the settings. *

* * @param predicateList * Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates * whether you want to negate the settings. */ public void setPredicateList(java.util.Collection predicateList) { if (predicateList == null) { this.predicateList = null; return; } this.predicateList = new java.util.ArrayList(predicateList); } /** *

* Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates whether you * want to negate the settings. *

*

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

* * @param predicateList * Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates * whether you want to negate the settings. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsWafRegionalRuleDetails withPredicateList(AwsWafRegionalRulePredicateListDetails... predicateList) { if (this.predicateList == null) { setPredicateList(new java.util.ArrayList(predicateList.length)); } for (AwsWafRegionalRulePredicateListDetails ele : predicateList) { this.predicateList.add(ele); } return this; } /** *

* Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates whether you * want to negate the settings. *

* * @param predicateList * Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, and * SizeConstraintSet objects that you want to add to a rule and, for each object, indicates * whether you want to negate the settings. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsWafRegionalRuleDetails withPredicateList(java.util.Collection predicateList) { setPredicateList(predicateList); return this; } /** *

* The ID of the rule. *

* * @param ruleId * The ID of the rule. */ public void setRuleId(String ruleId) { this.ruleId = ruleId; } /** *

* The ID of the rule. *

* * @return The ID of the rule. */ public String getRuleId() { return this.ruleId; } /** *

* The ID of the rule. *

* * @param ruleId * The ID of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsWafRegionalRuleDetails withRuleId(String ruleId) { setRuleId(ruleId); 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 (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPredicateList() != null) sb.append("PredicateList: ").append(getPredicateList()).append(","); if (getRuleId() != null) sb.append("RuleId: ").append(getRuleId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsWafRegionalRuleDetails == false) return false; AwsWafRegionalRuleDetails other = (AwsWafRegionalRuleDetails) obj; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getPredicateList() == null ^ this.getPredicateList() == null) return false; if (other.getPredicateList() != null && other.getPredicateList().equals(this.getPredicateList()) == false) return false; if (other.getRuleId() == null ^ this.getRuleId() == null) return false; if (other.getRuleId() != null && other.getRuleId().equals(this.getRuleId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPredicateList() == null) ? 0 : getPredicateList().hashCode()); hashCode = prime * hashCode + ((getRuleId() == null) ? 0 : getRuleId().hashCode()); return hashCode; } @Override public AwsWafRegionalRuleDetails clone() { try { return (AwsWafRegionalRuleDetails) 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.AwsWafRegionalRuleDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy