AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
RuleDefinition.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
11#include <aws/network-firewall/model/MatchAttributes.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace NetworkFirewall {
22namespace Model {
23
33 public:
34 AWS_NETWORKFIREWALL_API RuleDefinition() = default;
35 AWS_NETWORKFIREWALL_API RuleDefinition(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_NETWORKFIREWALL_API RuleDefinition& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
38
40
45 inline const MatchAttributes& GetMatchAttributes() const { return m_matchAttributes; }
46 inline bool MatchAttributesHasBeenSet() const { return m_matchAttributesHasBeenSet; }
47 template <typename MatchAttributesT = MatchAttributes>
48 void SetMatchAttributes(MatchAttributesT&& value) {
49 m_matchAttributesHasBeenSet = true;
50 m_matchAttributes = std::forward<MatchAttributesT>(value);
51 }
52 template <typename MatchAttributesT = MatchAttributes>
53 RuleDefinition& WithMatchAttributes(MatchAttributesT&& value) {
54 SetMatchAttributes(std::forward<MatchAttributesT>(value));
55 return *this;
56 }
58
60
85 inline const Aws::Vector<Aws::String>& GetActions() const { return m_actions; }
86 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
87 template <typename ActionsT = Aws::Vector<Aws::String>>
88 void SetActions(ActionsT&& value) {
89 m_actionsHasBeenSet = true;
90 m_actions = std::forward<ActionsT>(value);
91 }
92 template <typename ActionsT = Aws::Vector<Aws::String>>
93 RuleDefinition& WithActions(ActionsT&& value) {
94 SetActions(std::forward<ActionsT>(value));
95 return *this;
96 }
97 template <typename ActionsT = Aws::String>
98 RuleDefinition& AddActions(ActionsT&& value) {
99 m_actionsHasBeenSet = true;
100 m_actions.emplace_back(std::forward<ActionsT>(value));
101 return *this;
102 }
104 private:
105 MatchAttributes m_matchAttributes;
106
107 Aws::Vector<Aws::String> m_actions;
108 bool m_matchAttributesHasBeenSet = false;
109 bool m_actionsHasBeenSet = false;
110};
111
112} // namespace Model
113} // namespace NetworkFirewall
114} // namespace Aws
AWS_NETWORKFIREWALL_API RuleDefinition & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
RuleDefinition & WithMatchAttributes(MatchAttributesT &&value)
const Aws::Vector< Aws::String > & GetActions() const
RuleDefinition & WithActions(ActionsT &&value)
RuleDefinition & AddActions(ActionsT &&value)
const MatchAttributes & GetMatchAttributes() const
AWS_NETWORKFIREWALL_API RuleDefinition()=default
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
void SetMatchAttributes(MatchAttributesT &&value)
AWS_NETWORKFIREWALL_API RuleDefinition(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::vector< T, Aws::Allocator< T > > Vector