AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
FirewallStatelessRule.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/PortRange.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Xml
19{
20 class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2
24{
25namespace Model
26{
27
34 {
35 public:
36 AWS_EC2_API FirewallStatelessRule() = default;
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
48 inline const Aws::String& GetRuleGroupArn() const { return m_ruleGroupArn; }
49 inline bool RuleGroupArnHasBeenSet() const { return m_ruleGroupArnHasBeenSet; }
50 template<typename RuleGroupArnT = Aws::String>
51 void SetRuleGroupArn(RuleGroupArnT&& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = std::forward<RuleGroupArnT>(value); }
52 template<typename RuleGroupArnT = Aws::String>
53 FirewallStatelessRule& WithRuleGroupArn(RuleGroupArnT&& value) { SetRuleGroupArn(std::forward<RuleGroupArnT>(value)); return *this;}
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) { m_sourcesHasBeenSet = true; m_sources = std::forward<SourcesT>(value); }
64 template<typename SourcesT = Aws::Vector<Aws::String>>
65 FirewallStatelessRule& WithSources(SourcesT&& value) { SetSources(std::forward<SourcesT>(value)); return *this;}
66 template<typename SourcesT = Aws::String>
67 FirewallStatelessRule& AddSources(SourcesT&& value) { m_sourcesHasBeenSet = true; m_sources.emplace_back(std::forward<SourcesT>(value)); return *this; }
69
71
74 inline const Aws::Vector<Aws::String>& GetDestinations() const { return m_destinations; }
75 inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
76 template<typename DestinationsT = Aws::Vector<Aws::String>>
77 void SetDestinations(DestinationsT&& value) { m_destinationsHasBeenSet = true; m_destinations = std::forward<DestinationsT>(value); }
78 template<typename DestinationsT = Aws::Vector<Aws::String>>
79 FirewallStatelessRule& WithDestinations(DestinationsT&& value) { SetDestinations(std::forward<DestinationsT>(value)); return *this;}
80 template<typename DestinationsT = Aws::String>
81 FirewallStatelessRule& AddDestinations(DestinationsT&& value) { m_destinationsHasBeenSet = true; m_destinations.emplace_back(std::forward<DestinationsT>(value)); return *this; }
83
85
88 inline const Aws::Vector<PortRange>& GetSourcePorts() const { return m_sourcePorts; }
89 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
90 template<typename SourcePortsT = Aws::Vector<PortRange>>
91 void SetSourcePorts(SourcePortsT&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = std::forward<SourcePortsT>(value); }
92 template<typename SourcePortsT = Aws::Vector<PortRange>>
93 FirewallStatelessRule& WithSourcePorts(SourcePortsT&& value) { SetSourcePorts(std::forward<SourcePortsT>(value)); return *this;}
94 template<typename SourcePortsT = PortRange>
95 FirewallStatelessRule& AddSourcePorts(SourcePortsT&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.emplace_back(std::forward<SourcePortsT>(value)); return *this; }
97
99
102 inline const Aws::Vector<PortRange>& GetDestinationPorts() const { return m_destinationPorts; }
103 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
104 template<typename DestinationPortsT = Aws::Vector<PortRange>>
105 void SetDestinationPorts(DestinationPortsT&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = std::forward<DestinationPortsT>(value); }
106 template<typename DestinationPortsT = Aws::Vector<PortRange>>
107 FirewallStatelessRule& WithDestinationPorts(DestinationPortsT&& value) { SetDestinationPorts(std::forward<DestinationPortsT>(value)); return *this;}
108 template<typename DestinationPortsT = PortRange>
109 FirewallStatelessRule& AddDestinationPorts(DestinationPortsT&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.emplace_back(std::forward<DestinationPortsT>(value)); return *this; }
111
113
116 inline const Aws::Vector<int>& GetProtocols() const { return m_protocols; }
117 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
118 template<typename ProtocolsT = Aws::Vector<int>>
119 void SetProtocols(ProtocolsT&& value) { m_protocolsHasBeenSet = true; m_protocols = std::forward<ProtocolsT>(value); }
120 template<typename ProtocolsT = Aws::Vector<int>>
121 FirewallStatelessRule& WithProtocols(ProtocolsT&& value) { SetProtocols(std::forward<ProtocolsT>(value)); return *this;}
122 inline FirewallStatelessRule& AddProtocols(int value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; }
124
126
130 inline const Aws::String& GetRuleAction() const { return m_ruleAction; }
131 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
132 template<typename RuleActionT = Aws::String>
133 void SetRuleAction(RuleActionT&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = std::forward<RuleActionT>(value); }
134 template<typename RuleActionT = Aws::String>
135 FirewallStatelessRule& WithRuleAction(RuleActionT&& value) { SetRuleAction(std::forward<RuleActionT>(value)); return *this;}
137
139
142 inline int GetPriority() const { return m_priority; }
143 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
144 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
145 inline FirewallStatelessRule& WithPriority(int value) { SetPriority(value); return *this;}
147 private:
148
149 Aws::String m_ruleGroupArn;
150 bool m_ruleGroupArnHasBeenSet = false;
151
152 Aws::Vector<Aws::String> m_sources;
153 bool m_sourcesHasBeenSet = false;
154
155 Aws::Vector<Aws::String> m_destinations;
156 bool m_destinationsHasBeenSet = false;
157
158 Aws::Vector<PortRange> m_sourcePorts;
159 bool m_sourcePortsHasBeenSet = false;
160
161 Aws::Vector<PortRange> m_destinationPorts;
162 bool m_destinationPortsHasBeenSet = false;
163
164 Aws::Vector<int> m_protocols;
165 bool m_protocolsHasBeenSet = false;
166
167 Aws::String m_ruleAction;
168 bool m_ruleActionHasBeenSet = false;
169
170 int m_priority{0};
171 bool m_priorityHasBeenSet = false;
172 };
173
174} // namespace Model
175} // namespace EC2
176} // namespace Aws
FirewallStatelessRule & WithSourcePorts(SourcePortsT &&value)
FirewallStatelessRule & AddDestinationPorts(DestinationPortsT &&value)
FirewallStatelessRule & WithSources(SourcesT &&value)
FirewallStatelessRule & WithPriority(int value)
FirewallStatelessRule & AddSources(SourcesT &&value)
FirewallStatelessRule & AddProtocols(int value)
void SetDestinations(DestinationsT &&value)
FirewallStatelessRule & AddSourcePorts(SourcePortsT &&value)
const Aws::Vector< Aws::String > & GetDestinations() const
AWS_EC2_API FirewallStatelessRule(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetRuleGroupArn() const
FirewallStatelessRule & AddDestinations(DestinationsT &&value)
const Aws::Vector< int > & GetProtocols() const
FirewallStatelessRule & WithDestinations(DestinationsT &&value)
void SetDestinationPorts(DestinationPortsT &&value)
void SetRuleGroupArn(RuleGroupArnT &&value)
AWS_EC2_API FirewallStatelessRule()=default
FirewallStatelessRule & WithRuleAction(RuleActionT &&value)
const Aws::Vector< Aws::String > & GetSources() const
AWS_EC2_API FirewallStatelessRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< PortRange > & GetDestinationPorts() const
FirewallStatelessRule & WithRuleGroupArn(RuleGroupArnT &&value)
FirewallStatelessRule & WithDestinationPorts(DestinationPortsT &&value)
FirewallStatelessRule & WithProtocols(ProtocolsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< PortRange > & GetSourcePorts() 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