AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
NetworkAclEntry.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/ec2/model/IcmpTypeCode.h>
11#include <aws/ec2/model/PortRange.h>
12#include <aws/ec2/model/RuleAction.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API NetworkAclEntry() = default;
38 AWS_EC2_API NetworkAclEntry(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
49 inline const Aws::String& GetCidrBlock() const { return m_cidrBlock; }
50 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; }
51 template<typename CidrBlockT = Aws::String>
52 void SetCidrBlock(CidrBlockT&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = std::forward<CidrBlockT>(value); }
53 template<typename CidrBlockT = Aws::String>
54 NetworkAclEntry& WithCidrBlock(CidrBlockT&& value) { SetCidrBlock(std::forward<CidrBlockT>(value)); return *this;}
56
58
62 inline bool GetEgress() const { return m_egress; }
63 inline bool EgressHasBeenSet() const { return m_egressHasBeenSet; }
64 inline void SetEgress(bool value) { m_egressHasBeenSet = true; m_egress = value; }
65 inline NetworkAclEntry& WithEgress(bool value) { SetEgress(value); return *this;}
67
69
72 inline const IcmpTypeCode& GetIcmpTypeCode() const { return m_icmpTypeCode; }
73 inline bool IcmpTypeCodeHasBeenSet() const { return m_icmpTypeCodeHasBeenSet; }
74 template<typename IcmpTypeCodeT = IcmpTypeCode>
75 void SetIcmpTypeCode(IcmpTypeCodeT&& value) { m_icmpTypeCodeHasBeenSet = true; m_icmpTypeCode = std::forward<IcmpTypeCodeT>(value); }
76 template<typename IcmpTypeCodeT = IcmpTypeCode>
77 NetworkAclEntry& WithIcmpTypeCode(IcmpTypeCodeT&& value) { SetIcmpTypeCode(std::forward<IcmpTypeCodeT>(value)); return *this;}
79
81
84 inline const Aws::String& GetIpv6CidrBlock() const { return m_ipv6CidrBlock; }
85 inline bool Ipv6CidrBlockHasBeenSet() const { return m_ipv6CidrBlockHasBeenSet; }
86 template<typename Ipv6CidrBlockT = Aws::String>
87 void SetIpv6CidrBlock(Ipv6CidrBlockT&& value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock = std::forward<Ipv6CidrBlockT>(value); }
88 template<typename Ipv6CidrBlockT = Aws::String>
89 NetworkAclEntry& WithIpv6CidrBlock(Ipv6CidrBlockT&& value) { SetIpv6CidrBlock(std::forward<Ipv6CidrBlockT>(value)); return *this;}
91
93
96 inline const PortRange& GetPortRange() const { return m_portRange; }
97 inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; }
98 template<typename PortRangeT = PortRange>
99 void SetPortRange(PortRangeT&& value) { m_portRangeHasBeenSet = true; m_portRange = std::forward<PortRangeT>(value); }
100 template<typename PortRangeT = PortRange>
101 NetworkAclEntry& WithPortRange(PortRangeT&& value) { SetPortRange(std::forward<PortRangeT>(value)); return *this;}
103
105
108 inline const Aws::String& GetProtocol() const { return m_protocol; }
109 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
110 template<typename ProtocolT = Aws::String>
111 void SetProtocol(ProtocolT&& value) { m_protocolHasBeenSet = true; m_protocol = std::forward<ProtocolT>(value); }
112 template<typename ProtocolT = Aws::String>
113 NetworkAclEntry& WithProtocol(ProtocolT&& value) { SetProtocol(std::forward<ProtocolT>(value)); return *this;}
115
117
120 inline RuleAction GetRuleAction() const { return m_ruleAction; }
121 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
122 inline void SetRuleAction(RuleAction value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; }
123 inline NetworkAclEntry& WithRuleAction(RuleAction value) { SetRuleAction(value); return *this;}
125
127
131 inline int GetRuleNumber() const { return m_ruleNumber; }
132 inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; }
133 inline void SetRuleNumber(int value) { m_ruleNumberHasBeenSet = true; m_ruleNumber = value; }
134 inline NetworkAclEntry& WithRuleNumber(int value) { SetRuleNumber(value); return *this;}
136 private:
137
138 Aws::String m_cidrBlock;
139 bool m_cidrBlockHasBeenSet = false;
140
141 bool m_egress{false};
142 bool m_egressHasBeenSet = false;
143
144 IcmpTypeCode m_icmpTypeCode;
145 bool m_icmpTypeCodeHasBeenSet = false;
146
147 Aws::String m_ipv6CidrBlock;
148 bool m_ipv6CidrBlockHasBeenSet = false;
149
150 PortRange m_portRange;
151 bool m_portRangeHasBeenSet = false;
152
153 Aws::String m_protocol;
154 bool m_protocolHasBeenSet = false;
155
156 RuleAction m_ruleAction{RuleAction::NOT_SET};
157 bool m_ruleActionHasBeenSet = false;
158
159 int m_ruleNumber{0};
160 bool m_ruleNumberHasBeenSet = false;
161 };
162
163} // namespace Model
164} // namespace EC2
165} // 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