/** * 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 filter to use to identify the subset of cookies to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedCookies, or ExcludedCookies.

Example * JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", * "session-id" ] }

See Also:

AWS * API Reference

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

Inspect all cookies.

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

Inspect all cookies.

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

Inspect all cookies.

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

Inspect all cookies.

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

Inspect all cookies.

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

Inspect all cookies.

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

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline const Aws::Vector& GetIncludedCookies() const{ return m_includedCookies; } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline bool IncludedCookiesHasBeenSet() const { return m_includedCookiesHasBeenSet; } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline void SetIncludedCookies(const Aws::Vector& value) { m_includedCookiesHasBeenSet = true; m_includedCookies = value; } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline void SetIncludedCookies(Aws::Vector&& value) { m_includedCookiesHasBeenSet = true; m_includedCookies = std::move(value); } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline CookieMatchPattern& WithIncludedCookies(const Aws::Vector& value) { SetIncludedCookies(value); return *this;} /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline CookieMatchPattern& WithIncludedCookies(Aws::Vector&& value) { SetIncludedCookies(std::move(value)); return *this;} /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline CookieMatchPattern& AddIncludedCookies(const Aws::String& value) { m_includedCookiesHasBeenSet = true; m_includedCookies.push_back(value); return *this; } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline CookieMatchPattern& AddIncludedCookies(Aws::String&& value) { m_includedCookiesHasBeenSet = true; m_includedCookies.push_back(std::move(value)); return *this; } /** *

Inspect only the cookies that have a key that matches one of the strings * specified here.

*/ inline CookieMatchPattern& AddIncludedCookies(const char* value) { m_includedCookiesHasBeenSet = true; m_includedCookies.push_back(value); return *this; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline const Aws::Vector& GetExcludedCookies() const{ return m_excludedCookies; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline bool ExcludedCookiesHasBeenSet() const { return m_excludedCookiesHasBeenSet; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline void SetExcludedCookies(const Aws::Vector& value) { m_excludedCookiesHasBeenSet = true; m_excludedCookies = value; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline void SetExcludedCookies(Aws::Vector&& value) { m_excludedCookiesHasBeenSet = true; m_excludedCookies = std::move(value); } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline CookieMatchPattern& WithExcludedCookies(const Aws::Vector& value) { SetExcludedCookies(value); return *this;} /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline CookieMatchPattern& WithExcludedCookies(Aws::Vector&& value) { SetExcludedCookies(std::move(value)); return *this;} /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline CookieMatchPattern& AddExcludedCookies(const Aws::String& value) { m_excludedCookiesHasBeenSet = true; m_excludedCookies.push_back(value); return *this; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline CookieMatchPattern& AddExcludedCookies(Aws::String&& value) { m_excludedCookiesHasBeenSet = true; m_excludedCookies.push_back(std::move(value)); return *this; } /** *

Inspect only the cookies whose keys don't match any of the strings specified * here.

*/ inline CookieMatchPattern& AddExcludedCookies(const char* value) { m_excludedCookiesHasBeenSet = true; m_excludedCookies.push_back(value); return *this; } private: All m_all; bool m_allHasBeenSet = false; Aws::Vector m_includedCookies; bool m_includedCookiesHasBeenSet = false; Aws::Vector m_excludedCookies; bool m_excludedCookiesHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws