/** * 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 WAFV2 { namespace Model { /** *

A rule statement to match against labels that have been added to the web * request by rules that have already run in the web ACL.

The label match * statement provides the label or namespace string to search for. The label string * can represent a part or all of the fully qualified label name that had been * added to the web request. Fully qualified labels have a prefix, optional * namespaces, and label name. The prefix identifies the rule group or web ACL * context of the rule that added the label. If you do not provide the fully * qualified name in your label match string, WAF performs the search for labels * that were added in the same context as the label match statement.

See * Also:

AWS * API Reference

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

Specify whether you want to match using the label name or just the namespace. *

*/ inline const LabelMatchScope& GetScope() const{ return m_scope; } /** *

Specify whether you want to match using the label name or just the namespace. *

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

Specify whether you want to match using the label name or just the namespace. *

*/ inline void SetScope(const LabelMatchScope& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

Specify whether you want to match using the label name or just the namespace. *

*/ inline void SetScope(LabelMatchScope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

Specify whether you want to match using the label name or just the namespace. *

*/ inline LabelMatchStatement& WithScope(const LabelMatchScope& value) { SetScope(value); return *this;} /** *

Specify whether you want to match using the label name or just the namespace. *

*/ inline LabelMatchStatement& WithScope(LabelMatchScope&& value) { SetScope(std::move(value)); return *this;} /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline LabelMatchStatement& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline LabelMatchStatement& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

The string to match against. The setting you provide for this depends on the * match statement's Scope setting:

  • If the * Scope indicates LABEL, then this specification must * include the name and can include any number of preceding namespace * specifications and prefix up to providing the fully qualified label name.

    *
  • If the Scope indicates NAMESPACE, then * this specification can include any number of contiguous namespace strings, and * can include the entire label namespace prefix from the rule group or web ACL * where the label originates.

Labels are case sensitive and * components of a label must be separated by colon, for example * NS1:NS2:name.

*/ inline LabelMatchStatement& WithKey(const char* value) { SetKey(value); return *this;} private: LabelMatchScope m_scope; bool m_scopeHasBeenSet = false; Aws::String m_key; bool m_keyHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws