AWS SDK for C++  1.9.102
AWS SDK for C++
AwsEc2SecurityGroupIpPermission.h
Go to the documentation of this file.
1 
6 #pragma once
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace Utils
19 {
20 namespace Json
21 {
22  class JsonValue;
23  class JsonView;
24 } // namespace Json
25 } // namespace Utils
26 namespace SecurityHub
27 {
28 namespace Model
29 {
30 
37  {
38  public:
43 
44 
56  inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
57 
69  inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
70 
82  inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
83 
95  inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
96 
108  inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
109 
121  inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
122 
134  inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
135 
147  inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
148 
149 
155  inline int GetFromPort() const{ return m_fromPort; }
156 
162  inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
163 
169  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
170 
176  inline AwsEc2SecurityGroupIpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
177 
178 
184  inline int GetToPort() const{ return m_toPort; }
185 
191  inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
192 
198  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
199 
205  inline AwsEc2SecurityGroupIpPermission& WithToPort(int value) { SetToPort(value); return *this;}
206 
207 
211  inline const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; }
212 
216  inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
217 
221  inline void SetUserIdGroupPairs(const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
222 
226  inline void SetUserIdGroupPairs(Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::move(value); }
227 
231  inline AwsEc2SecurityGroupIpPermission& WithUserIdGroupPairs(const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& value) { SetUserIdGroupPairs(value); return *this;}
232 
236  inline AwsEc2SecurityGroupIpPermission& WithUserIdGroupPairs(Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>&& value) { SetUserIdGroupPairs(std::move(value)); return *this;}
237 
241  inline AwsEc2SecurityGroupIpPermission& AddUserIdGroupPairs(const AwsEc2SecurityGroupUserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
242 
246  inline AwsEc2SecurityGroupIpPermission& AddUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; }
247 
248 
252  inline const Aws::Vector<AwsEc2SecurityGroupIpRange>& GetIpRanges() const{ return m_ipRanges; }
253 
257  inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
258 
262  inline void SetIpRanges(const Aws::Vector<AwsEc2SecurityGroupIpRange>& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
263 
267  inline void SetIpRanges(Aws::Vector<AwsEc2SecurityGroupIpRange>&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); }
268 
272  inline AwsEc2SecurityGroupIpPermission& WithIpRanges(const Aws::Vector<AwsEc2SecurityGroupIpRange>& value) { SetIpRanges(value); return *this;}
273 
277  inline AwsEc2SecurityGroupIpPermission& WithIpRanges(Aws::Vector<AwsEc2SecurityGroupIpRange>&& value) { SetIpRanges(std::move(value)); return *this;}
278 
282  inline AwsEc2SecurityGroupIpPermission& AddIpRanges(const AwsEc2SecurityGroupIpRange& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
283 
287  inline AwsEc2SecurityGroupIpPermission& AddIpRanges(AwsEc2SecurityGroupIpRange&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; }
288 
289 
293  inline const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& GetIpv6Ranges() const{ return m_ipv6Ranges; }
294 
298  inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
299 
303  inline void SetIpv6Ranges(const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = value; }
304 
308  inline void SetIpv6Ranges(Aws::Vector<AwsEc2SecurityGroupIpv6Range>&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::move(value); }
309 
313  inline AwsEc2SecurityGroupIpPermission& WithIpv6Ranges(const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& value) { SetIpv6Ranges(value); return *this;}
314 
318  inline AwsEc2SecurityGroupIpPermission& WithIpv6Ranges(Aws::Vector<AwsEc2SecurityGroupIpv6Range>&& value) { SetIpv6Ranges(std::move(value)); return *this;}
319 
323  inline AwsEc2SecurityGroupIpPermission& AddIpv6Ranges(const AwsEc2SecurityGroupIpv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; }
324 
328  inline AwsEc2SecurityGroupIpPermission& AddIpv6Ranges(AwsEc2SecurityGroupIpv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; }
329 
330 
336  inline const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& GetPrefixListIds() const{ return m_prefixListIds; }
337 
343  inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
344 
350  inline void SetPrefixListIds(const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
351 
357  inline void SetPrefixListIds(Aws::Vector<AwsEc2SecurityGroupPrefixListId>&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::move(value); }
358 
364  inline AwsEc2SecurityGroupIpPermission& WithPrefixListIds(const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& value) { SetPrefixListIds(value); return *this;}
365 
371  inline AwsEc2SecurityGroupIpPermission& WithPrefixListIds(Aws::Vector<AwsEc2SecurityGroupPrefixListId>&& value) { SetPrefixListIds(std::move(value)); return *this;}
372 
378  inline AwsEc2SecurityGroupIpPermission& AddPrefixListIds(const AwsEc2SecurityGroupPrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
379 
385  inline AwsEc2SecurityGroupIpPermission& AddPrefixListIds(AwsEc2SecurityGroupPrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; }
386 
387  private:
388 
389  Aws::String m_ipProtocol;
390  bool m_ipProtocolHasBeenSet;
391 
392  int m_fromPort;
393  bool m_fromPortHasBeenSet;
394 
395  int m_toPort;
396  bool m_toPortHasBeenSet;
397 
399  bool m_userIdGroupPairsHasBeenSet;
400 
402  bool m_ipRangesHasBeenSet;
403 
405  bool m_ipv6RangesHasBeenSet;
406 
408  bool m_prefixListIdsHasBeenSet;
409  };
410 
411 } // namespace Model
412 } // namespace SecurityHub
413 } // namespace Aws
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithFromPort
AwsEc2SecurityGroupIpPermission & WithFromPort(int value)
Definition: AwsEc2SecurityGroupIpPermission.h:176
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpRanges
void SetIpRanges(const Aws::Vector< AwsEc2SecurityGroupIpRange > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:262
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpv6Ranges
AwsEc2SecurityGroupIpPermission & WithIpv6Ranges(Aws::Vector< AwsEc2SecurityGroupIpv6Range > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:318
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpv6Ranges
void SetIpv6Ranges(const Aws::Vector< AwsEc2SecurityGroupIpv6Range > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:303
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetUserIdGroupPairs
void SetUserIdGroupPairs(const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:221
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpv6Ranges
void SetIpv6Ranges(Aws::Vector< AwsEc2SecurityGroupIpv6Range > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:308
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetUserIdGroupPairs
void SetUserIdGroupPairs(Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:226
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithToPort
AwsEc2SecurityGroupIpPermission & WithToPort(int value)
Definition: AwsEc2SecurityGroupIpPermission.h:205
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetIpRanges
const Aws::Vector< AwsEc2SecurityGroupIpRange > & GetIpRanges() const
Definition: AwsEc2SecurityGroupIpPermission.h:252
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::Ipv6RangesHasBeenSet
bool Ipv6RangesHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:298
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetUserIdGroupPairs
const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > & GetUserIdGroupPairs() const
Definition: AwsEc2SecurityGroupIpPermission.h:211
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetToPort
int GetToPort() const
Definition: AwsEc2SecurityGroupIpPermission.h:184
AwsEc2SecurityGroupPrefixListId.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::ToPortHasBeenSet
bool ToPortHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:191
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithPrefixListIds
AwsEc2SecurityGroupIpPermission & WithPrefixListIds(Aws::Vector< AwsEc2SecurityGroupPrefixListId > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:371
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpRanges
AwsEc2SecurityGroupIpPermission & WithIpRanges(const Aws::Vector< AwsEc2SecurityGroupIpRange > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:272
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithUserIdGroupPairs
AwsEc2SecurityGroupIpPermission & WithUserIdGroupPairs(Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:236
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::IpProtocolHasBeenSet
bool IpProtocolHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:69
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpRange
Definition: AwsEc2SecurityGroupIpRange.h:32
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpProtocol
AwsEc2SecurityGroupIpPermission & WithIpProtocol(const Aws::String &value)
Definition: AwsEc2SecurityGroupIpPermission.h:121
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetFromPort
int GetFromPort() const
Definition: AwsEc2SecurityGroupIpPermission.h:155
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpProtocol
AwsEc2SecurityGroupIpPermission & WithIpProtocol(Aws::String &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:134
AWSVector.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetToPort
void SetToPort(int value)
Definition: AwsEc2SecurityGroupIpPermission.h:198
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetPrefixListIds
const Aws::Vector< AwsEc2SecurityGroupPrefixListId > & GetPrefixListIds() const
Definition: AwsEc2SecurityGroupIpPermission.h:336
AWS_SECURITYHUB_API
#define AWS_SECURITYHUB_API
Definition: SecurityHub_EXPORTS.h:28
Aws::SecurityHub::Model::AwsEc2SecurityGroupPrefixListId
Definition: AwsEc2SecurityGroupPrefixListId.h:32
AwsEc2SecurityGroupIpv6Range.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::operator=
AwsEc2SecurityGroupIpPermission & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddIpRanges
AwsEc2SecurityGroupIpPermission & AddIpRanges(const AwsEc2SecurityGroupIpRange &value)
Definition: AwsEc2SecurityGroupIpPermission.h:282
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddPrefixListIds
AwsEc2SecurityGroupIpPermission & AddPrefixListIds(const AwsEc2SecurityGroupPrefixListId &value)
Definition: AwsEc2SecurityGroupIpPermission.h:378
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::FromPortHasBeenSet
bool FromPortHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:162
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::PrefixListIdsHasBeenSet
bool PrefixListIdsHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:343
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpProtocol
AwsEc2SecurityGroupIpPermission & WithIpProtocol(const char *value)
Definition: AwsEc2SecurityGroupIpPermission.h:147
Aws::SecurityHub::Model::AwsEc2SecurityGroupUserIdGroupPair
Definition: AwsEc2SecurityGroupUserIdGroupPair.h:33
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddIpRanges
AwsEc2SecurityGroupIpPermission & AddIpRanges(AwsEc2SecurityGroupIpRange &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:287
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddIpv6Ranges
AwsEc2SecurityGroupIpPermission & AddIpv6Ranges(const AwsEc2SecurityGroupIpv6Range &value)
Definition: AwsEc2SecurityGroupIpPermission.h:323
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpv6Range
Definition: AwsEc2SecurityGroupIpv6Range.h:32
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetPrefixListIds
void SetPrefixListIds(const Aws::Vector< AwsEc2SecurityGroupPrefixListId > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:350
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::UserIdGroupPairsHasBeenSet
bool UserIdGroupPairsHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:216
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetIpv6Ranges
const Aws::Vector< AwsEc2SecurityGroupIpv6Range > & GetIpv6Ranges() const
Definition: AwsEc2SecurityGroupIpPermission.h:293
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission
Definition: AwsEc2SecurityGroupIpPermission.h:37
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::GetIpProtocol
const Aws::String & GetIpProtocol() const
Definition: AwsEc2SecurityGroupIpPermission.h:56
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithPrefixListIds
AwsEc2SecurityGroupIpPermission & WithPrefixListIds(const Aws::Vector< AwsEc2SecurityGroupPrefixListId > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:364
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission()
Aws
Definition: AccessManagementClient.h:15
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpRanges
void SetIpRanges(Aws::Vector< AwsEc2SecurityGroupIpRange > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:267
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddUserIdGroupPairs
AwsEc2SecurityGroupIpPermission & AddUserIdGroupPairs(const AwsEc2SecurityGroupUserIdGroupPair &value)
Definition: AwsEc2SecurityGroupIpPermission.h:241
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpv6Ranges
AwsEc2SecurityGroupIpPermission & WithIpv6Ranges(const Aws::Vector< AwsEc2SecurityGroupIpv6Range > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:313
AwsEc2SecurityGroupIpRange.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithUserIdGroupPairs
AwsEc2SecurityGroupIpPermission & WithUserIdGroupPairs(const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &value)
Definition: AwsEc2SecurityGroupIpPermission.h:231
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpProtocol
void SetIpProtocol(Aws::String &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:95
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddUserIdGroupPairs
AwsEc2SecurityGroupIpPermission & AddUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:246
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpProtocol
void SetIpProtocol(const Aws::String &value)
Definition: AwsEc2SecurityGroupIpPermission.h:82
SecurityHub_EXPORTS.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::IpRangesHasBeenSet
bool IpRangesHasBeenSet() const
Definition: AwsEc2SecurityGroupIpPermission.h:257
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetFromPort
void SetFromPort(int value)
Definition: AwsEc2SecurityGroupIpPermission.h:169
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetPrefixListIds
void SetPrefixListIds(Aws::Vector< AwsEc2SecurityGroupPrefixListId > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:357
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddIpv6Ranges
AwsEc2SecurityGroupIpPermission & AddIpv6Ranges(AwsEc2SecurityGroupIpv6Range &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:328
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AddPrefixListIds
AwsEc2SecurityGroupIpPermission & AddPrefixListIds(AwsEc2SecurityGroupPrefixListId &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:385
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::WithIpRanges
AwsEc2SecurityGroupIpPermission & WithIpRanges(Aws::Vector< AwsEc2SecurityGroupIpRange > &&value)
Definition: AwsEc2SecurityGroupIpPermission.h:277
AwsEc2SecurityGroupUserIdGroupPair.h
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission(Aws::Utils::Json::JsonView jsonValue)
Aws::SecurityHub::Model::AwsEc2SecurityGroupIpPermission::SetIpProtocol
void SetIpProtocol(const char *value)
Definition: AwsEc2SecurityGroupIpPermission.h:108