AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
IpPermission.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/UserIdGroupPair.h>
12#include <aws/ec2/model/IpRange.h>
13#include <aws/ec2/model/Ipv6Range.h>
14#include <aws/ec2/model/PrefixListId.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace EC2
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_EC2_API IpPermission() = default;
40 AWS_EC2_API IpPermission(const Aws::Utils::Xml::XmlNode& xmlNode);
41 AWS_EC2_API IpPermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
46
48
60 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
61 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
62 template<typename IpProtocolT = Aws::String>
63 void SetIpProtocol(IpProtocolT&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::forward<IpProtocolT>(value); }
64 template<typename IpProtocolT = Aws::String>
65 IpPermission& WithIpProtocol(IpProtocolT&& value) { SetIpProtocol(std::forward<IpProtocolT>(value)); return *this;}
67
69
73 inline int GetFromPort() const { return m_fromPort; }
74 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
75 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
76 inline IpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
78
80
86 inline int GetToPort() const { return m_toPort; }
87 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
88 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
89 inline IpPermission& WithToPort(int value) { SetToPort(value); return *this;}
91
93
96 inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const { return m_userIdGroupPairs; }
97 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
98 template<typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
99 void SetUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::forward<UserIdGroupPairsT>(value); }
100 template<typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
101 IpPermission& WithUserIdGroupPairs(UserIdGroupPairsT&& value) { SetUserIdGroupPairs(std::forward<UserIdGroupPairsT>(value)); return *this;}
102 template<typename UserIdGroupPairsT = UserIdGroupPair>
103 IpPermission& AddUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.emplace_back(std::forward<UserIdGroupPairsT>(value)); return *this; }
105
107
110 inline const Aws::Vector<IpRange>& GetIpRanges() const { return m_ipRanges; }
111 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
112 template<typename IpRangesT = Aws::Vector<IpRange>>
113 void SetIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::forward<IpRangesT>(value); }
114 template<typename IpRangesT = Aws::Vector<IpRange>>
115 IpPermission& WithIpRanges(IpRangesT&& value) { SetIpRanges(std::forward<IpRangesT>(value)); return *this;}
116 template<typename IpRangesT = IpRange>
117 IpPermission& AddIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.emplace_back(std::forward<IpRangesT>(value)); return *this; }
119
121
124 inline const Aws::Vector<Ipv6Range>& GetIpv6Ranges() const { return m_ipv6Ranges; }
125 inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
126 template<typename Ipv6RangesT = Aws::Vector<Ipv6Range>>
127 void SetIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::forward<Ipv6RangesT>(value); }
128 template<typename Ipv6RangesT = Aws::Vector<Ipv6Range>>
129 IpPermission& WithIpv6Ranges(Ipv6RangesT&& value) { SetIpv6Ranges(std::forward<Ipv6RangesT>(value)); return *this;}
130 template<typename Ipv6RangesT = Ipv6Range>
131 IpPermission& AddIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.emplace_back(std::forward<Ipv6RangesT>(value)); return *this; }
133
135
138 inline const Aws::Vector<PrefixListId>& GetPrefixListIds() const { return m_prefixListIds; }
139 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
140 template<typename PrefixListIdsT = Aws::Vector<PrefixListId>>
141 void SetPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::forward<PrefixListIdsT>(value); }
142 template<typename PrefixListIdsT = Aws::Vector<PrefixListId>>
143 IpPermission& WithPrefixListIds(PrefixListIdsT&& value) { SetPrefixListIds(std::forward<PrefixListIdsT>(value)); return *this;}
144 template<typename PrefixListIdsT = PrefixListId>
145 IpPermission& AddPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.emplace_back(std::forward<PrefixListIdsT>(value)); return *this; }
147 private:
148
149 Aws::String m_ipProtocol;
150 bool m_ipProtocolHasBeenSet = false;
151
152 int m_fromPort{0};
153 bool m_fromPortHasBeenSet = false;
154
155 int m_toPort{0};
156 bool m_toPortHasBeenSet = false;
157
158 Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
159 bool m_userIdGroupPairsHasBeenSet = false;
160
161 Aws::Vector<IpRange> m_ipRanges;
162 bool m_ipRangesHasBeenSet = false;
163
164 Aws::Vector<Ipv6Range> m_ipv6Ranges;
165 bool m_ipv6RangesHasBeenSet = false;
166
167 Aws::Vector<PrefixListId> m_prefixListIds;
168 bool m_prefixListIdsHasBeenSet = false;
169 };
170
171} // namespace Model
172} // namespace EC2
173} // namespace Aws
IpPermission & AddUserIdGroupPairs(UserIdGroupPairsT &&value)
void SetIpv6Ranges(Ipv6RangesT &&value)
const Aws::Vector< IpRange > & GetIpRanges() const
IpPermission & AddIpRanges(IpRangesT &&value)
void SetIpRanges(IpRangesT &&value)
IpPermission & WithPrefixListIds(PrefixListIdsT &&value)
const Aws::Vector< Ipv6Range > & GetIpv6Ranges() const
IpPermission & WithFromPort(int value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
IpPermission & AddIpv6Ranges(Ipv6RangesT &&value)
const Aws::String & GetIpProtocol() const
void SetUserIdGroupPairs(UserIdGroupPairsT &&value)
IpPermission & WithIpv6Ranges(Ipv6RangesT &&value)
IpPermission & WithToPort(int value)
IpPermission & WithUserIdGroupPairs(UserIdGroupPairsT &&value)
AWS_EC2_API IpPermission & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool UserIdGroupPairsHasBeenSet() const
void SetIpProtocol(IpProtocolT &&value)
IpPermission & WithIpProtocol(IpProtocolT &&value)
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
IpPermission & WithIpRanges(IpRangesT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API IpPermission()=default
void SetPrefixListIds(PrefixListIdsT &&value)
AWS_EC2_API IpPermission(const Aws::Utils::Xml::XmlNode &xmlNode)
IpPermission & AddPrefixListIds(PrefixListIdsT &&value)
const Aws::Vector< PrefixListId > & GetPrefixListIds() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream