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

The patterns to look for in the JSON body. WAF inspects the results of these * pattern matches against the rule inspection criteria. This is used with the * FieldToMatch option JsonBody.

See Also:

AWS * API Reference

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

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline const All& GetAll() const{ return m_all; } /** *

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline bool AllHasBeenSet() const { return m_allHasBeenSet; } /** *

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline void SetAll(const All& value) { m_allHasBeenSet = true; m_all = value; } /** *

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline void SetAll(All&& value) { m_allHasBeenSet = true; m_all = std::move(value); } /** *

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline JsonMatchPattern& WithAll(const All& value) { SetAll(value); return *this;} /** *

Match all of the elements. See also MatchScope in * JsonBody.

You must specify either this setting or the * IncludedPaths setting, but not both.

*/ inline JsonMatchPattern& WithAll(All&& value) { SetAll(std::move(value)); return *this;} /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline const Aws::Vector& GetIncludedPaths() const{ return m_includedPaths; } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline bool IncludedPathsHasBeenSet() const { return m_includedPathsHasBeenSet; } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline void SetIncludedPaths(const Aws::Vector& value) { m_includedPathsHasBeenSet = true; m_includedPaths = value; } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline void SetIncludedPaths(Aws::Vector&& value) { m_includedPathsHasBeenSet = true; m_includedPaths = std::move(value); } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline JsonMatchPattern& WithIncludedPaths(const Aws::Vector& value) { SetIncludedPaths(value); return *this;} /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline JsonMatchPattern& WithIncludedPaths(Aws::Vector&& value) { SetIncludedPaths(std::move(value)); return *this;} /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline JsonMatchPattern& AddIncludedPaths(const Aws::String& value) { m_includedPathsHasBeenSet = true; m_includedPaths.push_back(value); return *this; } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline JsonMatchPattern& AddIncludedPaths(Aws::String&& value) { m_includedPathsHasBeenSet = true; m_includedPaths.push_back(std::move(value)); return *this; } /** *

Match only the specified include paths. See also MatchScope in * JsonBody.

Provide the include paths using JSON Pointer syntax. * For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"]. For * information about this syntax, see the Internet Engineering Task Force (IETF) * documentation JavaScript Object * Notation (JSON) Pointer.

You must specify either this setting or the * All setting, but not both.

Don't use this option to * include all paths. Instead, use the All setting.

*/ inline JsonMatchPattern& AddIncludedPaths(const char* value) { m_includedPathsHasBeenSet = true; m_includedPaths.push_back(value); return *this; } private: All m_all; bool m_allHasBeenSet = false; Aws::Vector m_includedPaths; bool m_includedPathsHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws