/** * 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 { /** *

This is the latest version of AWS WAF, named AWS WAFV2, * released in November, 2019. For information, including how to migrate your AWS * WAF resources from the prior release, see the AWS * WAF Developer Guide.

A rule statement used to identify web * requests based on country of origin.

See Also:

AWS * API Reference

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

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline const Aws::Vector& GetCountryCodes() const{ return m_countryCodes; } /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline bool CountryCodesHasBeenSet() const { return m_countryCodesHasBeenSet; } /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline void SetCountryCodes(const Aws::Vector& value) { m_countryCodesHasBeenSet = true; m_countryCodes = value; } /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline void SetCountryCodes(Aws::Vector&& value) { m_countryCodesHasBeenSet = true; m_countryCodes = std::move(value); } /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline GeoMatchStatement& WithCountryCodes(const Aws::Vector& value) { SetCountryCodes(value); return *this;} /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline GeoMatchStatement& WithCountryCodes(Aws::Vector&& value) { SetCountryCodes(std::move(value)); return *this;} /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline GeoMatchStatement& AddCountryCodes(const CountryCode& value) { m_countryCodesHasBeenSet = true; m_countryCodes.push_back(value); return *this; } /** *

An array of two-character country codes, for example, [ "US", "CN" * ], from the alpha-2 country ISO codes of the ISO 3166 international * standard.

*/ inline GeoMatchStatement& AddCountryCodes(CountryCode&& value) { m_countryCodesHasBeenSet = true; m_countryCodes.push_back(std::move(value)); return *this; } /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline const ForwardedIPConfig& GetForwardedIPConfig() const{ return m_forwardedIPConfig; } /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline bool ForwardedIPConfigHasBeenSet() const { return m_forwardedIPConfigHasBeenSet; } /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline void SetForwardedIPConfig(const ForwardedIPConfig& value) { m_forwardedIPConfigHasBeenSet = true; m_forwardedIPConfig = value; } /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline void SetForwardedIPConfig(ForwardedIPConfig&& value) { m_forwardedIPConfigHasBeenSet = true; m_forwardedIPConfig = std::move(value); } /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline GeoMatchStatement& WithForwardedIPConfig(const ForwardedIPConfig& value) { SetForwardedIPConfig(value); return *this;} /** *

The configuration for inspecting IP addresses in an HTTP header that you * specify, instead of using the IP address that's reported by the web request * origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify * any header name.

If the specified header isn't present in the * request, AWS WAF doesn't apply the rule to the web request at all.

*/ inline GeoMatchStatement& WithForwardedIPConfig(ForwardedIPConfig&& value) { SetForwardedIPConfig(std::move(value)); return *this;} private: Aws::Vector m_countryCodes; bool m_countryCodesHasBeenSet; ForwardedIPConfig m_forwardedIPConfig; bool m_forwardedIPConfigHasBeenSet; }; } // namespace Model } // namespace WAFV2 } // namespace Aws