Class Predicate
- java.lang.Object
-
- com.amazonaws.services.waf.model.Predicate
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Predicate extends Object implements Serializable, Cloneable
Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, and SizeConstraintSet objects that you want to add to a
Rule
and, for each object, indicates whether you want to negate the settings, for example, requests that do NOT originate from the IP address 192.0.2.44.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Predicate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate
clone()
boolean
equals(Object obj)
String
getDataId()
A unique identifier for a predicate in aRule
, such asByteMatchSetId
orIPSetId
.Boolean
getNegated()
SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet.String
getType()
The type of predicate in aRule
, such asByteMatchSet
orIPSet
.int
hashCode()
Boolean
isNegated()
SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet.void
setDataId(String dataId)
A unique identifier for a predicate in aRule
, such asByteMatchSetId
orIPSetId
.void
setNegated(Boolean negated)
SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet.void
setType(PredicateType type)
The type of predicate in aRule
, such asByteMatchSet
orIPSet
.void
setType(String type)
The type of predicate in aRule
, such asByteMatchSet
orIPSet
.String
toString()
Returns a string representation of this object; useful for testing and debugging.Predicate
withDataId(String dataId)
A unique identifier for a predicate in aRule
, such asByteMatchSetId
orIPSetId
.Predicate
withNegated(Boolean negated)
SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet.Predicate
withType(PredicateType type)
The type of predicate in aRule
, such asByteMatchSet
orIPSet
.Predicate
withType(String type)
The type of predicate in aRule
, such asByteMatchSet
orIPSet
.
-
-
-
Method Detail
-
setNegated
public void setNegated(Boolean negated)
Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.- Parameters:
negated
- SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.
-
getNegated
public Boolean getNegated()
Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.- Returns:
- Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.
-
withNegated
public Predicate withNegated(Boolean negated)
Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.- Parameters:
negated
- SetNegated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isNegated
public Boolean isNegated()
Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.- Returns:
- Set
Negated
toFalse
if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow or block requests based on that IP address.Set
Negated
toTrue
if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, or SizeConstraintSet. For example, if anIPSet
includes the IP address192.0.2.44
, AWS WAF will allow, block, or count requests based on all IP addresses except192.0.2.44
.
-
setType
public void setType(String type)
The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
.- Parameters:
type
- The type of predicate in aRule
, such asByteMatchSet
orIPSet
.- See Also:
PredicateType
-
getType
public String getType()
The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
.- Returns:
- The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
. - See Also:
PredicateType
-
withType
public Predicate withType(String type)
The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
.- Parameters:
type
- The type of predicate in aRule
, such asByteMatchSet
orIPSet
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PredicateType
-
setType
public void setType(PredicateType type)
The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
.- Parameters:
type
- The type of predicate in aRule
, such asByteMatchSet
orIPSet
.- See Also:
PredicateType
-
withType
public Predicate withType(PredicateType type)
The type of predicate in a
Rule
, such asByteMatchSet
orIPSet
.- Parameters:
type
- The type of predicate in aRule
, such asByteMatchSet
orIPSet
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PredicateType
-
setDataId
public void setDataId(String dataId)
A unique identifier for a predicate in a
Rule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.- Parameters:
dataId
- A unique identifier for a predicate in aRule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.
-
getDataId
public String getDataId()
A unique identifier for a predicate in a
Rule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.- Returns:
- A unique identifier for a predicate in a
Rule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.
-
withDataId
public Predicate withDataId(String dataId)
A unique identifier for a predicate in a
Rule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.- Parameters:
dataId
- A unique identifier for a predicate in aRule
, such asByteMatchSetId
orIPSetId
. The ID is returned by the correspondingCreate
orList
command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-