/** * 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 headers to inspect in a web * request.

You must specify exactly one setting: either All, * IncludedHeaders, or ExcludedHeaders.

Example * JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", * "KeyToExclude2" ] }

See Also:

AWS * API Reference

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

Inspect all headers.

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

Inspect all headers.

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

Inspect all headers.

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

Inspect all headers.

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

Inspect all headers.

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

Inspect all headers.

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

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

*/ inline const Aws::Vector& GetIncludedHeaders() const{ return m_includedHeaders; } /** *

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

*/ inline bool IncludedHeadersHasBeenSet() const { return m_includedHeadersHasBeenSet; } /** *

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

*/ inline void SetIncludedHeaders(const Aws::Vector& value) { m_includedHeadersHasBeenSet = true; m_includedHeaders = value; } /** *

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

*/ inline void SetIncludedHeaders(Aws::Vector&& value) { m_includedHeadersHasBeenSet = true; m_includedHeaders = std::move(value); } /** *

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

*/ inline HeaderMatchPattern& WithIncludedHeaders(const Aws::Vector& value) { SetIncludedHeaders(value); return *this;} /** *

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

*/ inline HeaderMatchPattern& WithIncludedHeaders(Aws::Vector&& value) { SetIncludedHeaders(std::move(value)); return *this;} /** *

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

*/ inline HeaderMatchPattern& AddIncludedHeaders(const Aws::String& value) { m_includedHeadersHasBeenSet = true; m_includedHeaders.push_back(value); return *this; } /** *

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

*/ inline HeaderMatchPattern& AddIncludedHeaders(Aws::String&& value) { m_includedHeadersHasBeenSet = true; m_includedHeaders.push_back(std::move(value)); return *this; } /** *

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

*/ inline HeaderMatchPattern& AddIncludedHeaders(const char* value) { m_includedHeadersHasBeenSet = true; m_includedHeaders.push_back(value); return *this; } /** *

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

*/ inline const Aws::Vector& GetExcludedHeaders() const{ return m_excludedHeaders; } /** *

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

*/ inline bool ExcludedHeadersHasBeenSet() const { return m_excludedHeadersHasBeenSet; } /** *

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

*/ inline void SetExcludedHeaders(const Aws::Vector& value) { m_excludedHeadersHasBeenSet = true; m_excludedHeaders = value; } /** *

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

*/ inline void SetExcludedHeaders(Aws::Vector&& value) { m_excludedHeadersHasBeenSet = true; m_excludedHeaders = std::move(value); } /** *

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

*/ inline HeaderMatchPattern& WithExcludedHeaders(const Aws::Vector& value) { SetExcludedHeaders(value); return *this;} /** *

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

*/ inline HeaderMatchPattern& WithExcludedHeaders(Aws::Vector&& value) { SetExcludedHeaders(std::move(value)); return *this;} /** *

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

*/ inline HeaderMatchPattern& AddExcludedHeaders(const Aws::String& value) { m_excludedHeadersHasBeenSet = true; m_excludedHeaders.push_back(value); return *this; } /** *

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

*/ inline HeaderMatchPattern& AddExcludedHeaders(Aws::String&& value) { m_excludedHeadersHasBeenSet = true; m_excludedHeaders.push_back(std::move(value)); return *this; } /** *

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

*/ inline HeaderMatchPattern& AddExcludedHeaders(const char* value) { m_excludedHeadersHasBeenSet = true; m_excludedHeaders.push_back(value); return *this; } private: All m_all; bool m_allHasBeenSet = false; Aws::Vector m_includedHeaders; bool m_includedHeadersHasBeenSet = false; Aws::Vector m_excludedHeaders; bool m_excludedHeadersHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws