AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
NetworkAclEntry.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/fms/FMS_EXPORTS.h>
9#include <aws/fms/model/NetworkAclIcmpTypeCode.h>
10#include <aws/fms/model/NetworkAclPortRange.h>
11#include <aws/fms/model/NetworkAclRuleAction.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace FMS {
23namespace Model {
24
41 public:
42 AWS_FMS_API NetworkAclEntry() = default;
46
48
51 inline const NetworkAclIcmpTypeCode& GetIcmpTypeCode() const { return m_icmpTypeCode; }
52 inline bool IcmpTypeCodeHasBeenSet() const { return m_icmpTypeCodeHasBeenSet; }
53 template <typename IcmpTypeCodeT = NetworkAclIcmpTypeCode>
54 void SetIcmpTypeCode(IcmpTypeCodeT&& value) {
55 m_icmpTypeCodeHasBeenSet = true;
56 m_icmpTypeCode = std::forward<IcmpTypeCodeT>(value);
57 }
58 template <typename IcmpTypeCodeT = NetworkAclIcmpTypeCode>
59 NetworkAclEntry& WithIcmpTypeCode(IcmpTypeCodeT&& value) {
60 SetIcmpTypeCode(std::forward<IcmpTypeCodeT>(value));
61 return *this;
62 }
64
66
69 inline const Aws::String& GetProtocol() const { return m_protocol; }
70 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
71 template <typename ProtocolT = Aws::String>
72 void SetProtocol(ProtocolT&& value) {
73 m_protocolHasBeenSet = true;
74 m_protocol = std::forward<ProtocolT>(value);
75 }
76 template <typename ProtocolT = Aws::String>
77 NetworkAclEntry& WithProtocol(ProtocolT&& value) {
78 SetProtocol(std::forward<ProtocolT>(value));
79 return *this;
80 }
82
84
87 inline const NetworkAclPortRange& GetPortRange() const { return m_portRange; }
88 inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; }
89 template <typename PortRangeT = NetworkAclPortRange>
90 void SetPortRange(PortRangeT&& value) {
91 m_portRangeHasBeenSet = true;
92 m_portRange = std::forward<PortRangeT>(value);
93 }
94 template <typename PortRangeT = NetworkAclPortRange>
95 NetworkAclEntry& WithPortRange(PortRangeT&& value) {
96 SetPortRange(std::forward<PortRangeT>(value));
97 return *this;
98 }
100
102
105 inline const Aws::String& GetCidrBlock() const { return m_cidrBlock; }
106 inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; }
107 template <typename CidrBlockT = Aws::String>
108 void SetCidrBlock(CidrBlockT&& value) {
109 m_cidrBlockHasBeenSet = true;
110 m_cidrBlock = std::forward<CidrBlockT>(value);
111 }
112 template <typename CidrBlockT = Aws::String>
113 NetworkAclEntry& WithCidrBlock(CidrBlockT&& value) {
114 SetCidrBlock(std::forward<CidrBlockT>(value));
115 return *this;
116 }
118
120
123 inline const Aws::String& GetIpv6CidrBlock() const { return m_ipv6CidrBlock; }
124 inline bool Ipv6CidrBlockHasBeenSet() const { return m_ipv6CidrBlockHasBeenSet; }
125 template <typename Ipv6CidrBlockT = Aws::String>
126 void SetIpv6CidrBlock(Ipv6CidrBlockT&& value) {
127 m_ipv6CidrBlockHasBeenSet = true;
128 m_ipv6CidrBlock = std::forward<Ipv6CidrBlockT>(value);
129 }
130 template <typename Ipv6CidrBlockT = Aws::String>
131 NetworkAclEntry& WithIpv6CidrBlock(Ipv6CidrBlockT&& value) {
132 SetIpv6CidrBlock(std::forward<Ipv6CidrBlockT>(value));
133 return *this;
134 }
136
138
141 inline NetworkAclRuleAction GetRuleAction() const { return m_ruleAction; }
142 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
144 m_ruleActionHasBeenSet = true;
145 m_ruleAction = value;
146 }
148 SetRuleAction(value);
149 return *this;
150 }
152
154
159 inline bool GetEgress() const { return m_egress; }
160 inline bool EgressHasBeenSet() const { return m_egressHasBeenSet; }
161 inline void SetEgress(bool value) {
162 m_egressHasBeenSet = true;
163 m_egress = value;
164 }
165 inline NetworkAclEntry& WithEgress(bool value) {
166 SetEgress(value);
167 return *this;
168 }
170 private:
171 NetworkAclIcmpTypeCode m_icmpTypeCode;
172
173 Aws::String m_protocol;
174
175 NetworkAclPortRange m_portRange;
176
177 Aws::String m_cidrBlock;
178
179 Aws::String m_ipv6CidrBlock;
180
182
183 bool m_egress{false};
184 bool m_icmpTypeCodeHasBeenSet = false;
185 bool m_protocolHasBeenSet = false;
186 bool m_portRangeHasBeenSet = false;
187 bool m_cidrBlockHasBeenSet = false;
188 bool m_ipv6CidrBlockHasBeenSet = false;
189 bool m_ruleActionHasBeenSet = false;
190 bool m_egressHasBeenSet = false;
191};
192
193} // namespace Model
194} // namespace FMS
195} // namespace Aws
bool EgressHasBeenSet() const
NetworkAclEntry & WithEgress(bool value)
NetworkAclEntry & WithCidrBlock(CidrBlockT &&value)
AWS_FMS_API NetworkAclEntry()=default
bool GetEgress() const
void SetIcmpTypeCode(IcmpTypeCodeT &&value)
const Aws::String & GetProtocol() const
const Aws::String & GetIpv6CidrBlock() const
NetworkAclEntry & WithIcmpTypeCode(IcmpTypeCodeT &&value)
void SetPortRange(PortRangeT &&value)
void SetIpv6CidrBlock(Ipv6CidrBlockT &&value)
NetworkAclEntry & WithProtocol(ProtocolT &&value)
bool RuleActionHasBeenSet() const
const NetworkAclPortRange & GetPortRange() const
const NetworkAclIcmpTypeCode & GetIcmpTypeCode() const
bool Ipv6CidrBlockHasBeenSet() const
void SetEgress(bool value)
NetworkAclEntry & WithIpv6CidrBlock(Ipv6CidrBlockT &&value)
NetworkAclEntry & WithRuleAction(NetworkAclRuleAction value)
void SetProtocol(ProtocolT &&value)
AWS_FMS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRuleAction(NetworkAclRuleAction value)
AWS_FMS_API NetworkAclEntry & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_FMS_API NetworkAclEntry(Aws::Utils::Json::JsonView jsonValue)
void SetCidrBlock(CidrBlockT &&value)
bool IcmpTypeCodeHasBeenSet() const
NetworkAclEntry & WithPortRange(PortRangeT &&value)
bool CidrBlockHasBeenSet() const
bool ProtocolHasBeenSet() const
bool PortRangeHasBeenSet() const
const Aws::String & GetCidrBlock() const
NetworkAclRuleAction GetRuleAction() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue