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

TCP flags and masks to inspect packets for, used in stateless rules * MatchAttributes settings.

See Also:

AWS * API Reference

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

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline const Aws::Vector& GetFlags() const{ return m_flags; } /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline bool FlagsHasBeenSet() const { return m_flagsHasBeenSet; } /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline void SetFlags(const Aws::Vector& value) { m_flagsHasBeenSet = true; m_flags = value; } /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline void SetFlags(Aws::Vector&& value) { m_flagsHasBeenSet = true; m_flags = std::move(value); } /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline TCPFlagField& WithFlags(const Aws::Vector& value) { SetFlags(value); return *this;} /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline TCPFlagField& WithFlags(Aws::Vector&& value) { SetFlags(std::move(value)); return *this;} /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline TCPFlagField& AddFlags(const TCPFlag& value) { m_flagsHasBeenSet = true; m_flags.push_back(value); return *this; } /** *

Used in conjunction with the Masks setting to define the flags * that must be set and flags that must not be set in order for the packet to * match. This setting can only specify values that are also specified in the * Masks setting.

For the flags that are specified in the masks * setting, the following must be true for the packet to match:

  • *

    The ones that are set in this flags setting must be set in the packet.

    *
  • The ones that are not set in this flags setting must also not be * set in the packet.

*/ inline TCPFlagField& AddFlags(TCPFlag&& value) { m_flagsHasBeenSet = true; m_flags.push_back(std::move(value)); return *this; } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline const Aws::Vector& GetMasks() const{ return m_masks; } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline bool MasksHasBeenSet() const { return m_masksHasBeenSet; } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline void SetMasks(const Aws::Vector& value) { m_masksHasBeenSet = true; m_masks = value; } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline void SetMasks(Aws::Vector&& value) { m_masksHasBeenSet = true; m_masks = std::move(value); } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline TCPFlagField& WithMasks(const Aws::Vector& value) { SetMasks(value); return *this;} /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline TCPFlagField& WithMasks(Aws::Vector&& value) { SetMasks(std::move(value)); return *this;} /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline TCPFlagField& AddMasks(const TCPFlag& value) { m_masksHasBeenSet = true; m_masks.push_back(value); return *this; } /** *

The set of flags to consider in the inspection. To inspect all flags in the * valid values list, leave this with no setting.

*/ inline TCPFlagField& AddMasks(TCPFlag&& value) { m_masksHasBeenSet = true; m_masks.push_back(std::move(value)); return *this; } private: Aws::Vector m_flags; bool m_flagsHasBeenSet = false; Aws::Vector m_masks; bool m_masksHasBeenSet = false; }; } // namespace Model } // namespace NetworkFirewall } // namespace Aws