AWS SDK for C++  1.9.66
AWS SDK for C++
IpPermission.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
11 #include <aws/ec2/model/IpRange.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Xml
22 {
23  class XmlNode;
24 } // namespace Xml
25 } // namespace Utils
26 namespace EC2
27 {
28 namespace Model
29 {
30 
38  {
39  public:
43 
44  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45  void OutputToStream(Aws::OStream& oStream, const char* location) const;
46 
47 
53  inline int GetFromPort() const{ return m_fromPort; }
54 
60  inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
61 
67  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
68 
74  inline IpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
75 
76 
89  inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
90 
103  inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
104 
117  inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
118 
131  inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
132 
145  inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
146 
159  inline IpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
160 
173  inline IpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
174 
187  inline IpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
188 
189 
193  inline const Aws::Vector<IpRange>& GetIpRanges() const{ return m_ipRanges; }
194 
198  inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
199 
203  inline void SetIpRanges(const Aws::Vector<IpRange>& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
204 
208  inline void SetIpRanges(Aws::Vector<IpRange>&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); }
209 
213  inline IpPermission& WithIpRanges(const Aws::Vector<IpRange>& value) { SetIpRanges(value); return *this;}
214 
218  inline IpPermission& WithIpRanges(Aws::Vector<IpRange>&& value) { SetIpRanges(std::move(value)); return *this;}
219 
223  inline IpPermission& AddIpRanges(const IpRange& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
224 
228  inline IpPermission& AddIpRanges(IpRange&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; }
229 
230 
234  inline const Aws::Vector<Ipv6Range>& GetIpv6Ranges() const{ return m_ipv6Ranges; }
235 
239  inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
240 
244  inline void SetIpv6Ranges(const Aws::Vector<Ipv6Range>& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = value; }
245 
249  inline void SetIpv6Ranges(Aws::Vector<Ipv6Range>&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::move(value); }
250 
254  inline IpPermission& WithIpv6Ranges(const Aws::Vector<Ipv6Range>& value) { SetIpv6Ranges(value); return *this;}
255 
259  inline IpPermission& WithIpv6Ranges(Aws::Vector<Ipv6Range>&& value) { SetIpv6Ranges(std::move(value)); return *this;}
260 
264  inline IpPermission& AddIpv6Ranges(const Ipv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; }
265 
269  inline IpPermission& AddIpv6Ranges(Ipv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; }
270 
271 
275  inline const Aws::Vector<PrefixListId>& GetPrefixListIds() const{ return m_prefixListIds; }
276 
280  inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
281 
285  inline void SetPrefixListIds(const Aws::Vector<PrefixListId>& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
286 
290  inline void SetPrefixListIds(Aws::Vector<PrefixListId>&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::move(value); }
291 
295  inline IpPermission& WithPrefixListIds(const Aws::Vector<PrefixListId>& value) { SetPrefixListIds(value); return *this;}
296 
300  inline IpPermission& WithPrefixListIds(Aws::Vector<PrefixListId>&& value) { SetPrefixListIds(std::move(value)); return *this;}
301 
305  inline IpPermission& AddPrefixListIds(const PrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
306 
310  inline IpPermission& AddPrefixListIds(PrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; }
311 
312 
318  inline int GetToPort() const{ return m_toPort; }
319 
325  inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
326 
332  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
333 
339  inline IpPermission& WithToPort(int value) { SetToPort(value); return *this;}
340 
341 
345  inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; }
346 
350  inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
351 
355  inline void SetUserIdGroupPairs(const Aws::Vector<UserIdGroupPair>& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
356 
360  inline void SetUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::move(value); }
361 
365  inline IpPermission& WithUserIdGroupPairs(const Aws::Vector<UserIdGroupPair>& value) { SetUserIdGroupPairs(value); return *this;}
366 
370  inline IpPermission& WithUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { SetUserIdGroupPairs(std::move(value)); return *this;}
371 
375  inline IpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
376 
380  inline IpPermission& AddUserIdGroupPairs(UserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; }
381 
382  private:
383 
384  int m_fromPort;
385  bool m_fromPortHasBeenSet;
386 
387  Aws::String m_ipProtocol;
388  bool m_ipProtocolHasBeenSet;
389 
390  Aws::Vector<IpRange> m_ipRanges;
391  bool m_ipRangesHasBeenSet;
392 
393  Aws::Vector<Ipv6Range> m_ipv6Ranges;
394  bool m_ipv6RangesHasBeenSet;
395 
396  Aws::Vector<PrefixListId> m_prefixListIds;
397  bool m_prefixListIdsHasBeenSet;
398 
399  int m_toPort;
400  bool m_toPortHasBeenSet;
401 
402  Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
403  bool m_userIdGroupPairsHasBeenSet;
404  };
405 
406 } // namespace Model
407 } // namespace EC2
408 } // namespace Aws
Aws::EC2::Model::IpPermission::AddUserIdGroupPairs
IpPermission & AddUserIdGroupPairs(UserIdGroupPair &&value)
Definition: IpPermission.h:380
Aws::EC2::Model::IpPermission::SetFromPort
void SetFromPort(int value)
Definition: IpPermission.h:67
IpRange.h
Aws::EC2::Model::IpPermission::operator=
IpPermission & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::IpPermission::SetIpProtocol
void SetIpProtocol(const char *value)
Definition: IpPermission.h:145
Aws::EC2::Model::IpPermission::IpRangesHasBeenSet
bool IpRangesHasBeenSet() const
Definition: IpPermission.h:198
Aws::EC2::Model::IpPermission::SetUserIdGroupPairs
void SetUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
Definition: IpPermission.h:355
Aws::EC2::Model::IpPermission::GetIpProtocol
const Aws::String & GetIpProtocol() const
Definition: IpPermission.h:89
Aws::EC2::Model::IpPermission::WithPrefixListIds
IpPermission & WithPrefixListIds(const Aws::Vector< PrefixListId > &value)
Definition: IpPermission.h:295
Aws::EC2::Model::IpPermission::AddIpRanges
IpPermission & AddIpRanges(IpRange &&value)
Definition: IpPermission.h:228
Aws::EC2::Model::IpPermission::SetIpProtocol
void SetIpProtocol(const Aws::String &value)
Definition: IpPermission.h:117
Aws::EC2::Model::IpPermission::SetIpv6Ranges
void SetIpv6Ranges(Aws::Vector< Ipv6Range > &&value)
Definition: IpPermission.h:249
UserIdGroupPair.h
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::IpPermission::SetPrefixListIds
void SetPrefixListIds(Aws::Vector< PrefixListId > &&value)
Definition: IpPermission.h:290
Aws::EC2::Model::IpPermission::WithIpProtocol
IpPermission & WithIpProtocol(const char *value)
Definition: IpPermission.h:187
Aws::EC2::Model::IpPermission::SetToPort
void SetToPort(int value)
Definition: IpPermission.h:332
Aws::EC2::Model::IpPermission::WithIpProtocol
IpPermission & WithIpProtocol(const Aws::String &value)
Definition: IpPermission.h:159
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::IpPermission::GetIpRanges
const Aws::Vector< IpRange > & GetIpRanges() const
Definition: IpPermission.h:193
Aws::EC2::Model::IpRange
Definition: IpRange.h:32
AWSStreamFwd.h
Aws::EC2::Model::PrefixListId
Definition: PrefixListId.h:32
Aws::EC2::Model::IpPermission::IpProtocolHasBeenSet
bool IpProtocolHasBeenSet() const
Definition: IpPermission.h:103
Aws::EC2::Model::UserIdGroupPair
Definition: UserIdGroupPair.h:33
AWSVector.h
Aws::EC2::Model::IpPermission::SetIpRanges
void SetIpRanges(const Aws::Vector< IpRange > &value)
Definition: IpPermission.h:203
Aws::EC2::Model::IpPermission::SetUserIdGroupPairs
void SetUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
Definition: IpPermission.h:360
Aws::EC2::Model::IpPermission::WithToPort
IpPermission & WithToPort(int value)
Definition: IpPermission.h:339
Aws::EC2::Model::IpPermission::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::IpPermission::GetFromPort
int GetFromPort() const
Definition: IpPermission.h:53
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::IpPermission::AddIpRanges
IpPermission & AddIpRanges(const IpRange &value)
Definition: IpPermission.h:223
Aws::EC2::Model::IpPermission::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::IpPermission::WithIpProtocol
IpPermission & WithIpProtocol(Aws::String &&value)
Definition: IpPermission.h:173
Aws::EC2::Model::IpPermission::GetPrefixListIds
const Aws::Vector< PrefixListId > & GetPrefixListIds() const
Definition: IpPermission.h:275
Aws::EC2::Model::IpPermission::AddIpv6Ranges
IpPermission & AddIpv6Ranges(const Ipv6Range &value)
Definition: IpPermission.h:264
Aws::EC2::Model::IpPermission::AddPrefixListIds
IpPermission & AddPrefixListIds(PrefixListId &&value)
Definition: IpPermission.h:310
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::IpPermission::WithIpRanges
IpPermission & WithIpRanges(Aws::Vector< IpRange > &&value)
Definition: IpPermission.h:218
Aws::EC2::Model::IpPermission::AddUserIdGroupPairs
IpPermission & AddUserIdGroupPairs(const UserIdGroupPair &value)
Definition: IpPermission.h:375
Aws::EC2::Model::IpPermission
Definition: IpPermission.h:38
Aws::EC2::Model::IpPermission::SetIpRanges
void SetIpRanges(Aws::Vector< IpRange > &&value)
Definition: IpPermission.h:208
Aws::EC2::Model::IpPermission::SetPrefixListIds
void SetPrefixListIds(const Aws::Vector< PrefixListId > &value)
Definition: IpPermission.h:285
Aws::EC2::Model::IpPermission::GetToPort
int GetToPort() const
Definition: IpPermission.h:318
Aws::EC2::Model::IpPermission::IpPermission
IpPermission(const Aws::Utils::Xml::XmlNode &xmlNode)
AWSString.h
Aws::EC2::Model::IpPermission::SetIpProtocol
void SetIpProtocol(Aws::String &&value)
Definition: IpPermission.h:131
Aws::EC2::Model::IpPermission::GetIpv6Ranges
const Aws::Vector< Ipv6Range > & GetIpv6Ranges() const
Definition: IpPermission.h:234
Aws::EC2::Model::IpPermission::WithIpv6Ranges
IpPermission & WithIpv6Ranges(Aws::Vector< Ipv6Range > &&value)
Definition: IpPermission.h:259
PrefixListId.h
Aws::EC2::Model::IpPermission::AddPrefixListIds
IpPermission & AddPrefixListIds(const PrefixListId &value)
Definition: IpPermission.h:305
Aws::EC2::Model::IpPermission::IpPermission
IpPermission()
Aws::EC2::Model::IpPermission::UserIdGroupPairsHasBeenSet
bool UserIdGroupPairsHasBeenSet() const
Definition: IpPermission.h:350
Aws::EC2::Model::IpPermission::WithUserIdGroupPairs
IpPermission & WithUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
Definition: IpPermission.h:365
Aws::EC2::Model::IpPermission::SetIpv6Ranges
void SetIpv6Ranges(const Aws::Vector< Ipv6Range > &value)
Definition: IpPermission.h:244
Aws::EC2::Model::IpPermission::PrefixListIdsHasBeenSet
bool PrefixListIdsHasBeenSet() const
Definition: IpPermission.h:280
Aws::EC2::Model::IpPermission::AddIpv6Ranges
IpPermission & AddIpv6Ranges(Ipv6Range &&value)
Definition: IpPermission.h:269
Aws::EC2::Model::IpPermission::WithUserIdGroupPairs
IpPermission & WithUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
Definition: IpPermission.h:370
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::IpPermission::WithIpv6Ranges
IpPermission & WithIpv6Ranges(const Aws::Vector< Ipv6Range > &value)
Definition: IpPermission.h:254
Aws::EC2::Model::IpPermission::WithFromPort
IpPermission & WithFromPort(int value)
Definition: IpPermission.h:74
Aws::EC2::Model::IpPermission::Ipv6RangesHasBeenSet
bool Ipv6RangesHasBeenSet() const
Definition: IpPermission.h:239
Aws::EC2::Model::IpPermission::GetUserIdGroupPairs
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
Definition: IpPermission.h:345
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::IpPermission::FromPortHasBeenSet
bool FromPortHasBeenSet() const
Definition: IpPermission.h:60
Ipv6Range.h
EC2_EXPORTS.h
Aws::EC2::Model::IpPermission::WithIpRanges
IpPermission & WithIpRanges(const Aws::Vector< IpRange > &value)
Definition: IpPermission.h:213
Aws::EC2::Model::Ipv6Range
Definition: Ipv6Range.h:32
Aws::EC2::Model::IpPermission::WithPrefixListIds
IpPermission & WithPrefixListIds(Aws::Vector< PrefixListId > &&value)
Definition: IpPermission.h:300
Aws::EC2::Model::IpPermission::ToPortHasBeenSet
bool ToPortHasBeenSet() const
Definition: IpPermission.h:325