AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
NetworkAclEntry.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/IcmpTypeCode.h>
11#include <aws/ec2/model/PortRange.h>
12#include <aws/ec2/model/RuleAction.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
31 public:
32 AWS_EC2_API NetworkAclEntry() = default;
33 AWS_EC2_API NetworkAclEntry(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline const Aws::String& GetCidrBlock() const { return m_cidrBlock; }
44 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; }
45 template <typename CidrBlockT = Aws::String>
46 void SetCidrBlock(CidrBlockT&& value) {
47 m_cidrBlockHasBeenSet = true;
48 m_cidrBlock = std::forward<CidrBlockT>(value);
49 }
50 template <typename CidrBlockT = Aws::String>
51 NetworkAclEntry& WithCidrBlock(CidrBlockT&& value) {
52 SetCidrBlock(std::forward<CidrBlockT>(value));
53 return *this;
54 }
56
58
62 inline bool GetEgress() const { return m_egress; }
63 inline bool EgressHasBeenSet() const { return m_egressHasBeenSet; }
64 inline void SetEgress(bool value) {
65 m_egressHasBeenSet = true;
66 m_egress = value;
67 }
68 inline NetworkAclEntry& WithEgress(bool value) {
69 SetEgress(value);
70 return *this;
71 }
73
75
78 inline const IcmpTypeCode& GetIcmpTypeCode() const { return m_icmpTypeCode; }
79 inline bool IcmpTypeCodeHasBeenSet() const { return m_icmpTypeCodeHasBeenSet; }
80 template <typename IcmpTypeCodeT = IcmpTypeCode>
81 void SetIcmpTypeCode(IcmpTypeCodeT&& value) {
82 m_icmpTypeCodeHasBeenSet = true;
83 m_icmpTypeCode = std::forward<IcmpTypeCodeT>(value);
84 }
85 template <typename IcmpTypeCodeT = IcmpTypeCode>
86 NetworkAclEntry& WithIcmpTypeCode(IcmpTypeCodeT&& value) {
87 SetIcmpTypeCode(std::forward<IcmpTypeCodeT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::String& GetIpv6CidrBlock() const { return m_ipv6CidrBlock; }
97 inline bool Ipv6CidrBlockHasBeenSet() const { return m_ipv6CidrBlockHasBeenSet; }
98 template <typename Ipv6CidrBlockT = Aws::String>
99 void SetIpv6CidrBlock(Ipv6CidrBlockT&& value) {
100 m_ipv6CidrBlockHasBeenSet = true;
101 m_ipv6CidrBlock = std::forward<Ipv6CidrBlockT>(value);
102 }
103 template <typename Ipv6CidrBlockT = Aws::String>
104 NetworkAclEntry& WithIpv6CidrBlock(Ipv6CidrBlockT&& value) {
105 SetIpv6CidrBlock(std::forward<Ipv6CidrBlockT>(value));
106 return *this;
107 }
109
111
114 inline const PortRange& GetPortRange() const { return m_portRange; }
115 inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; }
116 template <typename PortRangeT = PortRange>
117 void SetPortRange(PortRangeT&& value) {
118 m_portRangeHasBeenSet = true;
119 m_portRange = std::forward<PortRangeT>(value);
120 }
121 template <typename PortRangeT = PortRange>
122 NetworkAclEntry& WithPortRange(PortRangeT&& value) {
123 SetPortRange(std::forward<PortRangeT>(value));
124 return *this;
125 }
127
129
132 inline const Aws::String& GetProtocol() const { return m_protocol; }
133 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
134 template <typename ProtocolT = Aws::String>
135 void SetProtocol(ProtocolT&& value) {
136 m_protocolHasBeenSet = true;
137 m_protocol = std::forward<ProtocolT>(value);
138 }
139 template <typename ProtocolT = Aws::String>
140 NetworkAclEntry& WithProtocol(ProtocolT&& value) {
141 SetProtocol(std::forward<ProtocolT>(value));
142 return *this;
143 }
145
147
150 inline RuleAction GetRuleAction() const { return m_ruleAction; }
151 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
152 inline void SetRuleAction(RuleAction value) {
153 m_ruleActionHasBeenSet = true;
154 m_ruleAction = value;
155 }
157 SetRuleAction(value);
158 return *this;
159 }
161
163
167 inline int GetRuleNumber() const { return m_ruleNumber; }
168 inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; }
169 inline void SetRuleNumber(int value) {
170 m_ruleNumberHasBeenSet = true;
171 m_ruleNumber = value;
172 }
173 inline NetworkAclEntry& WithRuleNumber(int value) {
174 SetRuleNumber(value);
175 return *this;
176 }
178 private:
179 Aws::String m_cidrBlock;
180
181 bool m_egress{false};
182
183 IcmpTypeCode m_icmpTypeCode;
184
185 Aws::String m_ipv6CidrBlock;
186
187 PortRange m_portRange;
188
189 Aws::String m_protocol;
190
191 RuleAction m_ruleAction{RuleAction::NOT_SET};
192
193 int m_ruleNumber{0};
194 bool m_cidrBlockHasBeenSet = false;
195 bool m_egressHasBeenSet = false;
196 bool m_icmpTypeCodeHasBeenSet = false;
197 bool m_ipv6CidrBlockHasBeenSet = false;
198 bool m_portRangeHasBeenSet = false;
199 bool m_protocolHasBeenSet = false;
200 bool m_ruleActionHasBeenSet = false;
201 bool m_ruleNumberHasBeenSet = false;
202};
203
204} // namespace Model
205} // namespace EC2
206} // namespace Aws
bool Ipv6CidrBlockHasBeenSet() const
int GetRuleNumber() const
bool IcmpTypeCodeHasBeenSet() const
RuleAction GetRuleAction() const
bool EgressHasBeenSet() const
void SetCidrBlock(CidrBlockT &&value)
void SetRuleNumber(int value)
void SetEgress(bool value)
void SetRuleAction(RuleAction value)
NetworkAclEntry & WithRuleAction(RuleAction value)
const Aws::String & GetIpv6CidrBlock() const
AWS_EC2_API NetworkAclEntry & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetProtocol(ProtocolT &&value)
AWS_EC2_API NetworkAclEntry(const Aws::Utils::Xml::XmlNode &xmlNode)
const IcmpTypeCode & GetIcmpTypeCode() const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetPortRange(PortRangeT &&value)
const Aws::String & GetProtocol() const
void SetIcmpTypeCode(IcmpTypeCodeT &&value)
bool PortRangeHasBeenSet() const
NetworkAclEntry & WithCidrBlock(CidrBlockT &&value)
bool RuleNumberHasBeenSet() const
NetworkAclEntry & WithEgress(bool value)
void SetIpv6CidrBlock(Ipv6CidrBlockT &&value)
bool GetEgress() const
const Aws::String & GetCidrBlock() const
NetworkAclEntry & WithIcmpTypeCode(IcmpTypeCodeT &&value)
NetworkAclEntry & WithPortRange(PortRangeT &&value)
bool ProtocolHasBeenSet() const
NetworkAclEntry & WithIpv6CidrBlock(Ipv6CidrBlockT &&value)
NetworkAclEntry & WithProtocol(ProtocolT &&value)
bool CidrBlockHasBeenSet() const
const PortRange & GetPortRange() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
NetworkAclEntry & WithRuleNumber(int value)
AWS_EC2_API NetworkAclEntry()=default
bool RuleActionHasBeenSet() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream