/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WAF { namespace Model { /** *

This is AWS WAF Classic documentation. For more information, * see AWS * WAF Classic in the developer guide.

For the latest version of AWS * WAF, use the AWS WAFV2 API and see the AWS * WAF Developer Guide. With the latest version, AWS WAF has a single set of * endpoints for regional and global use.

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, for * example, requests that do NOT originate from the IP address 192.0.2.44. *

See Also:

AWS API * Reference

*/ class Predicate { public: AWS_WAF_API Predicate(); AWS_WAF_API Predicate(Aws::Utils::Json::JsonView jsonValue); AWS_WAF_API Predicate& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Set Negated to False if you want AWS WAF to allow, * block, or count requests based on the settings in the specified * ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow or block requests based on * that IP address.

Set Negated to True if you * want AWS WAF to allow or block a request based on the negation of the settings * in the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow, block, or count requests * based on all IP addresses except 192.0.2.44.

*/ inline bool GetNegated() const{ return m_negated; } /** *

Set Negated to False if you want AWS WAF to allow, * block, or count requests based on the settings in the specified * ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow or block requests based on * that IP address.

Set Negated to True if you * want AWS WAF to allow or block a request based on the negation of the settings * in the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow, block, or count requests * based on all IP addresses except 192.0.2.44.

*/ inline bool NegatedHasBeenSet() const { return m_negatedHasBeenSet; } /** *

Set Negated to False if you want AWS WAF to allow, * block, or count requests based on the settings in the specified * ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow or block requests based on * that IP address.

Set Negated to True if you * want AWS WAF to allow or block a request based on the negation of the settings * in the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow, block, or count requests * based on all IP addresses except 192.0.2.44.

*/ inline void SetNegated(bool value) { m_negatedHasBeenSet = true; m_negated = value; } /** *

Set Negated to False if you want AWS WAF to allow, * block, or count requests based on the settings in the specified * ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow or block requests based on * that IP address.

Set Negated to True if you * want AWS WAF to allow or block a request based on the negation of the settings * in the ByteMatchSet, IPSet, SqlInjectionMatchSet, * XssMatchSet, RegexMatchSet, GeoMatchSet, or * SizeConstraintSet. For example, if an IPSet includes the IP * address 192.0.2.44, AWS WAF will allow, block, or count requests * based on all IP addresses except 192.0.2.44.

*/ inline Predicate& WithNegated(bool value) { SetNegated(value); return *this;} /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline const PredicateType& GetType() const{ return m_type; } /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline void SetType(const PredicateType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline void SetType(PredicateType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline Predicate& WithType(const PredicateType& value) { SetType(value); return *this;} /** *

The type of predicate in a Rule, such as ByteMatch * or IPSet.

*/ inline Predicate& WithType(PredicateType&& value) { SetType(std::move(value)); return *this;} /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline const Aws::String& GetDataId() const{ return m_dataId; } /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline bool DataIdHasBeenSet() const { return m_dataIdHasBeenSet; } /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline void SetDataId(const Aws::String& value) { m_dataIdHasBeenSet = true; m_dataId = value; } /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline void SetDataId(Aws::String&& value) { m_dataIdHasBeenSet = true; m_dataId = std::move(value); } /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline void SetDataId(const char* value) { m_dataIdHasBeenSet = true; m_dataId.assign(value); } /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline Predicate& WithDataId(const Aws::String& value) { SetDataId(value); return *this;} /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline Predicate& WithDataId(Aws::String&& value) { SetDataId(std::move(value)); return *this;} /** *

A unique identifier for a predicate in a Rule, such as * ByteMatchSetId or IPSetId. The ID is returned by the * corresponding Create or List command.

*/ inline Predicate& WithDataId(const char* value) { SetDataId(value); return *this;} private: bool m_negated; bool m_negatedHasBeenSet = false; PredicateType m_type; bool m_typeHasBeenSet = false; Aws::String m_dataId; bool m_dataIdHasBeenSet = false; }; } // namespace Model } // namespace WAF } // namespace Aws