AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
RuleOption.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
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace NetworkFirewall {
21namespace Model {
22
30 public:
31 AWS_NETWORKFIREWALL_API RuleOption() = default;
32 AWS_NETWORKFIREWALL_API RuleOption(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_NETWORKFIREWALL_API RuleOption& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
35
37
44 inline const Aws::String& GetKeyword() const { return m_keyword; }
45 inline bool KeywordHasBeenSet() const { return m_keywordHasBeenSet; }
46 template <typename KeywordT = Aws::String>
47 void SetKeyword(KeywordT&& value) {
48 m_keywordHasBeenSet = true;
49 m_keyword = std::forward<KeywordT>(value);
50 }
51 template <typename KeywordT = Aws::String>
52 RuleOption& WithKeyword(KeywordT&& value) {
53 SetKeyword(std::forward<KeywordT>(value));
54 return *this;
55 }
57
59
67 inline const Aws::Vector<Aws::String>& GetSettings() const { return m_settings; }
68 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
69 template <typename SettingsT = Aws::Vector<Aws::String>>
70 void SetSettings(SettingsT&& value) {
71 m_settingsHasBeenSet = true;
72 m_settings = std::forward<SettingsT>(value);
73 }
74 template <typename SettingsT = Aws::Vector<Aws::String>>
75 RuleOption& WithSettings(SettingsT&& value) {
76 SetSettings(std::forward<SettingsT>(value));
77 return *this;
78 }
79 template <typename SettingsT = Aws::String>
80 RuleOption& AddSettings(SettingsT&& value) {
81 m_settingsHasBeenSet = true;
82 m_settings.emplace_back(std::forward<SettingsT>(value));
83 return *this;
84 }
86 private:
87 Aws::String m_keyword;
88
89 Aws::Vector<Aws::String> m_settings;
90 bool m_keywordHasBeenSet = false;
91 bool m_settingsHasBeenSet = false;
92};
93
94} // namespace Model
95} // namespace NetworkFirewall
96} // namespace Aws
RuleOption & WithKeyword(KeywordT &&value)
Definition RuleOption.h:52
void SetSettings(SettingsT &&value)
Definition RuleOption.h:70
AWS_NETWORKFIREWALL_API RuleOption & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_NETWORKFIREWALL_API RuleOption()=default
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::Vector< Aws::String > & GetSettings() const
Definition RuleOption.h:67
const Aws::String & GetKeyword() const
Definition RuleOption.h:44
void SetKeyword(KeywordT &&value)
Definition RuleOption.h:47
RuleOption & AddSettings(SettingsT &&value)
Definition RuleOption.h:80
RuleOption & WithSettings(SettingsT &&value)
Definition RuleOption.h:75
AWS_NETWORKFIREWALL_API RuleOption(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector