AWS SDK for C++

AWS SDK for C++ Version 1.11.932

Loading...
Searching...
No Matches
IPSet.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/wafv2/WAFV2_EXPORTS.h>
10#include <aws/wafv2/model/IPAddressVersion.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace WAFV2 {
22namespace Model {
23
36class IPSet {
37 public:
38 AWS_WAFV2_API IPSet() = default;
39 AWS_WAFV2_API IPSet(Aws::Utils::Json::JsonView jsonValue);
40 AWS_WAFV2_API IPSet& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
48 inline const Aws::String& GetName() const { return m_name; }
49 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 template <typename NameT = Aws::String>
51 void SetName(NameT&& value) {
52 m_nameHasBeenSet = true;
53 m_name = std::forward<NameT>(value);
54 }
55 template <typename NameT = Aws::String>
56 IPSet& WithName(NameT&& value) {
57 SetName(std::forward<NameT>(value));
58 return *this;
59 }
61
63
68 inline const Aws::String& GetId() const { return m_id; }
69 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
70 template <typename IdT = Aws::String>
71 void SetId(IdT&& value) {
72 m_idHasBeenSet = true;
73 m_id = std::forward<IdT>(value);
74 }
75 template <typename IdT = Aws::String>
76 IPSet& WithId(IdT&& value) {
77 SetId(std::forward<IdT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::String& GetARN() const { return m_aRN; }
87 inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
88 template <typename ARNT = Aws::String>
89 void SetARN(ARNT&& value) {
90 m_aRNHasBeenSet = true;
91 m_aRN = std::forward<ARNT>(value);
92 }
93 template <typename ARNT = Aws::String>
94 IPSet& WithARN(ARNT&& value) {
95 SetARN(std::forward<ARNT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::String& GetDescription() const { return m_description; }
105 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
106 template <typename DescriptionT = Aws::String>
107 void SetDescription(DescriptionT&& value) {
108 m_descriptionHasBeenSet = true;
109 m_description = std::forward<DescriptionT>(value);
110 }
111 template <typename DescriptionT = Aws::String>
112 IPSet& WithDescription(DescriptionT&& value) {
113 SetDescription(std::forward<DescriptionT>(value));
114 return *this;
115 }
117
119
123 inline IPAddressVersion GetIPAddressVersion() const { return m_iPAddressVersion; }
124 inline bool IPAddressVersionHasBeenSet() const { return m_iPAddressVersionHasBeenSet; }
126 m_iPAddressVersionHasBeenSet = true;
127 m_iPAddressVersion = value;
128 }
130 SetIPAddressVersion(value);
131 return *this;
132 }
134
136
161 inline const Aws::Vector<Aws::String>& GetAddresses() const { return m_addresses; }
162 inline bool AddressesHasBeenSet() const { return m_addressesHasBeenSet; }
163 template <typename AddressesT = Aws::Vector<Aws::String>>
164 void SetAddresses(AddressesT&& value) {
165 m_addressesHasBeenSet = true;
166 m_addresses = std::forward<AddressesT>(value);
167 }
168 template <typename AddressesT = Aws::Vector<Aws::String>>
169 IPSet& WithAddresses(AddressesT&& value) {
170 SetAddresses(std::forward<AddressesT>(value));
171 return *this;
172 }
173 template <typename AddressesT = Aws::String>
174 IPSet& AddAddresses(AddressesT&& value) {
175 m_addressesHasBeenSet = true;
176 m_addresses.emplace_back(std::forward<AddressesT>(value));
177 return *this;
178 }
180 private:
181 Aws::String m_name;
182
183 Aws::String m_id;
184
185 Aws::String m_aRN;
186
187 Aws::String m_description;
188
190
191 Aws::Vector<Aws::String> m_addresses;
192 bool m_nameHasBeenSet = false;
193 bool m_idHasBeenSet = false;
194 bool m_aRNHasBeenSet = false;
195 bool m_descriptionHasBeenSet = false;
196 bool m_iPAddressVersionHasBeenSet = false;
197 bool m_addressesHasBeenSet = false;
198};
199
200} // namespace Model
201} // namespace WAFV2
202} // namespace Aws
void SetIPAddressVersion(IPAddressVersion value)
Definition IPSet.h:125
void SetId(IdT &&value)
Definition IPSet.h:71
AWS_WAFV2_API IPSet & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
Definition IPSet.h:48
const Aws::String & GetDescription() const
Definition IPSet.h:104
IPSet & WithARN(ARNT &&value)
Definition IPSet.h:94
AWS_WAFV2_API IPSet(Aws::Utils::Json::JsonView jsonValue)
void SetName(NameT &&value)
Definition IPSet.h:51
void SetARN(ARNT &&value)
Definition IPSet.h:89
IPSet & WithIPAddressVersion(IPAddressVersion value)
Definition IPSet.h:129
IPSet & WithAddresses(AddressesT &&value)
Definition IPSet.h:169
IPSet & WithId(IdT &&value)
Definition IPSet.h:76
const Aws::Vector< Aws::String > & GetAddresses() const
Definition IPSet.h:161
bool NameHasBeenSet() const
Definition IPSet.h:49
IPSet & WithDescription(DescriptionT &&value)
Definition IPSet.h:112
const Aws::String & GetId() const
Definition IPSet.h:68
bool IdHasBeenSet() const
Definition IPSet.h:69
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetARN() const
Definition IPSet.h:86
bool AddressesHasBeenSet() const
Definition IPSet.h:162
bool DescriptionHasBeenSet() const
Definition IPSet.h:105
bool ARNHasBeenSet() const
Definition IPSet.h:87
IPSet & WithName(NameT &&value)
Definition IPSet.h:56
void SetDescription(DescriptionT &&value)
Definition IPSet.h:107
AWS_WAFV2_API IPSet()=default
void SetAddresses(AddressesT &&value)
Definition IPSet.h:164
bool IPAddressVersionHasBeenSet() const
Definition IPSet.h:124
IPAddressVersion GetIPAddressVersion() const
Definition IPSet.h:123
IPSet & AddAddresses(AddressesT &&value)
Definition IPSet.h:174
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue