AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
FirewallStatefulRule.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/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/PortRange.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
30 public:
31 AWS_EC2_API FirewallStatefulRule() = default;
34
35 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
42 inline const Aws::String& GetRuleGroupArn() const { return m_ruleGroupArn; }
43 inline bool RuleGroupArnHasBeenSet() const { return m_ruleGroupArnHasBeenSet; }
44 template <typename RuleGroupArnT = Aws::String>
45 void SetRuleGroupArn(RuleGroupArnT&& value) {
46 m_ruleGroupArnHasBeenSet = true;
47 m_ruleGroupArn = std::forward<RuleGroupArnT>(value);
48 }
49 template <typename RuleGroupArnT = Aws::String>
50 FirewallStatefulRule& WithRuleGroupArn(RuleGroupArnT&& value) {
51 SetRuleGroupArn(std::forward<RuleGroupArnT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<Aws::String>& GetSources() const { return m_sources; }
61 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
62 template <typename SourcesT = Aws::Vector<Aws::String>>
63 void SetSources(SourcesT&& value) {
64 m_sourcesHasBeenSet = true;
65 m_sources = std::forward<SourcesT>(value);
66 }
67 template <typename SourcesT = Aws::Vector<Aws::String>>
68 FirewallStatefulRule& WithSources(SourcesT&& value) {
69 SetSources(std::forward<SourcesT>(value));
70 return *this;
71 }
72 template <typename SourcesT = Aws::String>
73 FirewallStatefulRule& AddSources(SourcesT&& value) {
74 m_sourcesHasBeenSet = true;
75 m_sources.emplace_back(std::forward<SourcesT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::Vector<Aws::String>& GetDestinations() const { return m_destinations; }
85 inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
86 template <typename DestinationsT = Aws::Vector<Aws::String>>
87 void SetDestinations(DestinationsT&& value) {
88 m_destinationsHasBeenSet = true;
89 m_destinations = std::forward<DestinationsT>(value);
90 }
91 template <typename DestinationsT = Aws::Vector<Aws::String>>
92 FirewallStatefulRule& WithDestinations(DestinationsT&& value) {
93 SetDestinations(std::forward<DestinationsT>(value));
94 return *this;
95 }
96 template <typename DestinationsT = Aws::String>
97 FirewallStatefulRule& AddDestinations(DestinationsT&& value) {
98 m_destinationsHasBeenSet = true;
99 m_destinations.emplace_back(std::forward<DestinationsT>(value));
100 return *this;
101 }
103
105
108 inline const Aws::Vector<PortRange>& GetSourcePorts() const { return m_sourcePorts; }
109 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
110 template <typename SourcePortsT = Aws::Vector<PortRange>>
111 void SetSourcePorts(SourcePortsT&& value) {
112 m_sourcePortsHasBeenSet = true;
113 m_sourcePorts = std::forward<SourcePortsT>(value);
114 }
115 template <typename SourcePortsT = Aws::Vector<PortRange>>
116 FirewallStatefulRule& WithSourcePorts(SourcePortsT&& value) {
117 SetSourcePorts(std::forward<SourcePortsT>(value));
118 return *this;
119 }
120 template <typename SourcePortsT = PortRange>
121 FirewallStatefulRule& AddSourcePorts(SourcePortsT&& value) {
122 m_sourcePortsHasBeenSet = true;
123 m_sourcePorts.emplace_back(std::forward<SourcePortsT>(value));
124 return *this;
125 }
127
129
132 inline const Aws::Vector<PortRange>& GetDestinationPorts() const { return m_destinationPorts; }
133 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
134 template <typename DestinationPortsT = Aws::Vector<PortRange>>
135 void SetDestinationPorts(DestinationPortsT&& value) {
136 m_destinationPortsHasBeenSet = true;
137 m_destinationPorts = std::forward<DestinationPortsT>(value);
138 }
139 template <typename DestinationPortsT = Aws::Vector<PortRange>>
140 FirewallStatefulRule& WithDestinationPorts(DestinationPortsT&& value) {
141 SetDestinationPorts(std::forward<DestinationPortsT>(value));
142 return *this;
143 }
144 template <typename DestinationPortsT = PortRange>
145 FirewallStatefulRule& AddDestinationPorts(DestinationPortsT&& value) {
146 m_destinationPortsHasBeenSet = true;
147 m_destinationPorts.emplace_back(std::forward<DestinationPortsT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetProtocol() const { return m_protocol; }
157 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
158 template <typename ProtocolT = Aws::String>
159 void SetProtocol(ProtocolT&& value) {
160 m_protocolHasBeenSet = true;
161 m_protocol = std::forward<ProtocolT>(value);
162 }
163 template <typename ProtocolT = Aws::String>
164 FirewallStatefulRule& WithProtocol(ProtocolT&& value) {
165 SetProtocol(std::forward<ProtocolT>(value));
166 return *this;
167 }
169
171
175 inline const Aws::String& GetRuleAction() const { return m_ruleAction; }
176 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
177 template <typename RuleActionT = Aws::String>
178 void SetRuleAction(RuleActionT&& value) {
179 m_ruleActionHasBeenSet = true;
180 m_ruleAction = std::forward<RuleActionT>(value);
181 }
182 template <typename RuleActionT = Aws::String>
183 FirewallStatefulRule& WithRuleAction(RuleActionT&& value) {
184 SetRuleAction(std::forward<RuleActionT>(value));
185 return *this;
186 }
188
190
194 inline const Aws::String& GetDirection() const { return m_direction; }
195 inline bool DirectionHasBeenSet() const { return m_directionHasBeenSet; }
196 template <typename DirectionT = Aws::String>
197 void SetDirection(DirectionT&& value) {
198 m_directionHasBeenSet = true;
199 m_direction = std::forward<DirectionT>(value);
200 }
201 template <typename DirectionT = Aws::String>
202 FirewallStatefulRule& WithDirection(DirectionT&& value) {
203 SetDirection(std::forward<DirectionT>(value));
204 return *this;
205 }
207 private:
208 Aws::String m_ruleGroupArn;
209
210 Aws::Vector<Aws::String> m_sources;
211
212 Aws::Vector<Aws::String> m_destinations;
213
214 Aws::Vector<PortRange> m_sourcePorts;
215
216 Aws::Vector<PortRange> m_destinationPorts;
217
218 Aws::String m_protocol;
219
220 Aws::String m_ruleAction;
221
222 Aws::String m_direction;
223 bool m_ruleGroupArnHasBeenSet = false;
224 bool m_sourcesHasBeenSet = false;
225 bool m_destinationsHasBeenSet = false;
226 bool m_sourcePortsHasBeenSet = false;
227 bool m_destinationPortsHasBeenSet = false;
228 bool m_protocolHasBeenSet = false;
229 bool m_ruleActionHasBeenSet = false;
230 bool m_directionHasBeenSet = false;
231};
232
233} // namespace Model
234} // namespace EC2
235} // namespace Aws
FirewallStatefulRule & WithProtocol(ProtocolT &&value)
const Aws::Vector< PortRange > & GetDestinationPorts() const
FirewallStatefulRule & AddSources(SourcesT &&value)
FirewallStatefulRule & AddDestinationPorts(DestinationPortsT &&value)
FirewallStatefulRule & WithDestinationPorts(DestinationPortsT &&value)
const Aws::String & GetRuleGroupArn() const
void SetDestinations(DestinationsT &&value)
FirewallStatefulRule & WithSourcePorts(SourcePortsT &&value)
FirewallStatefulRule & AddDestinations(DestinationsT &&value)
FirewallStatefulRule & AddSourcePorts(SourcePortsT &&value)
FirewallStatefulRule & WithRuleGroupArn(RuleGroupArnT &&value)
FirewallStatefulRule & WithSources(SourcesT &&value)
FirewallStatefulRule & WithDestinations(DestinationsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API FirewallStatefulRule(const Aws::Utils::Xml::XmlNode &xmlNode)
FirewallStatefulRule & WithRuleAction(RuleActionT &&value)
void SetDestinationPorts(DestinationPortsT &&value)
const Aws::String & GetRuleAction() const
FirewallStatefulRule & WithDirection(DirectionT &&value)
void SetRuleGroupArn(RuleGroupArnT &&value)
const Aws::Vector< PortRange > & GetSourcePorts() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< Aws::String > & GetSources() const
AWS_EC2_API FirewallStatefulRule()=default
AWS_EC2_API FirewallStatefulRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< Aws::String > & GetDestinations() 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