AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetRuleGroupArn(const Aws::String& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = value; }
51 inline void SetRuleGroupArn(Aws::String&& value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn = std::move(value); }
52 inline void SetRuleGroupArn(const char* value) { m_ruleGroupArnHasBeenSet = true; m_ruleGroupArn.assign(value); }
53 inline FirewallStatelessRule& WithRuleGroupArn(const Aws::String& value) { SetRuleGroupArn(value); return *this;}
54 inline FirewallStatelessRule& WithRuleGroupArn(Aws::String&& value) { SetRuleGroupArn(std::move(value)); return *this;}
55 inline FirewallStatelessRule& WithRuleGroupArn(const char* value) { SetRuleGroupArn(value); return *this;}
57
59
62 inline const Aws::Vector<Aws::String>& GetSources() const{ return m_sources; }
63 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
64 inline void SetSources(const Aws::Vector<Aws::String>& value) { m_sourcesHasBeenSet = true; m_sources = value; }
65 inline void SetSources(Aws::Vector<Aws::String>&& value) { m_sourcesHasBeenSet = true; m_sources = std::move(value); }
66 inline FirewallStatelessRule& WithSources(const Aws::Vector<Aws::String>& value) { SetSources(value); return *this;}
67 inline FirewallStatelessRule& WithSources(Aws::Vector<Aws::String>&& value) { SetSources(std::move(value)); return *this;}
68 inline FirewallStatelessRule& AddSources(const Aws::String& value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; }
69 inline FirewallStatelessRule& AddSources(Aws::String&& value) { m_sourcesHasBeenSet = true; m_sources.push_back(std::move(value)); return *this; }
70 inline FirewallStatelessRule& AddSources(const char* value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; }
72
74
77 inline const Aws::Vector<Aws::String>& GetDestinations() const{ return m_destinations; }
78 inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
79 inline void SetDestinations(const Aws::Vector<Aws::String>& value) { m_destinationsHasBeenSet = true; m_destinations = value; }
80 inline void SetDestinations(Aws::Vector<Aws::String>&& value) { m_destinationsHasBeenSet = true; m_destinations = std::move(value); }
82 inline FirewallStatelessRule& WithDestinations(Aws::Vector<Aws::String>&& value) { SetDestinations(std::move(value)); return *this;}
83 inline FirewallStatelessRule& AddDestinations(const Aws::String& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; }
84 inline FirewallStatelessRule& AddDestinations(Aws::String&& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(std::move(value)); return *this; }
85 inline FirewallStatelessRule& AddDestinations(const char* value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; }
87
89
92 inline const Aws::Vector<PortRange>& GetSourcePorts() const{ return m_sourcePorts; }
93 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
94 inline void SetSourcePorts(const Aws::Vector<PortRange>& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = value; }
95 inline void SetSourcePorts(Aws::Vector<PortRange>&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts = std::move(value); }
96 inline FirewallStatelessRule& WithSourcePorts(const Aws::Vector<PortRange>& value) { SetSourcePorts(value); return *this;}
97 inline FirewallStatelessRule& WithSourcePorts(Aws::Vector<PortRange>&& value) { SetSourcePorts(std::move(value)); return *this;}
98 inline FirewallStatelessRule& AddSourcePorts(const PortRange& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(value); return *this; }
99 inline FirewallStatelessRule& AddSourcePorts(PortRange&& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(std::move(value)); return *this; }
101
103
106 inline const Aws::Vector<PortRange>& GetDestinationPorts() const{ return m_destinationPorts; }
107 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
108 inline void SetDestinationPorts(const Aws::Vector<PortRange>& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = value; }
109 inline void SetDestinationPorts(Aws::Vector<PortRange>&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts = std::move(value); }
112 inline FirewallStatelessRule& AddDestinationPorts(const PortRange& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(value); return *this; }
113 inline FirewallStatelessRule& AddDestinationPorts(PortRange&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(std::move(value)); return *this; }
115
117
120 inline const Aws::Vector<int>& GetProtocols() const{ return m_protocols; }
121 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
122 inline void SetProtocols(const Aws::Vector<int>& value) { m_protocolsHasBeenSet = true; m_protocols = value; }
123 inline void SetProtocols(Aws::Vector<int>&& value) { m_protocolsHasBeenSet = true; m_protocols = std::move(value); }
124 inline FirewallStatelessRule& WithProtocols(const Aws::Vector<int>& value) { SetProtocols(value); return *this;}
125 inline FirewallStatelessRule& WithProtocols(Aws::Vector<int>&& value) { SetProtocols(std::move(value)); return *this;}
126 inline FirewallStatelessRule& AddProtocols(int value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; }
128
130
134 inline const Aws::String& GetRuleAction() const{ return m_ruleAction; }
135 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
136 inline void SetRuleAction(const Aws::String& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; }
137 inline void SetRuleAction(Aws::String&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = std::move(value); }
138 inline void SetRuleAction(const char* value) { m_ruleActionHasBeenSet = true; m_ruleAction.assign(value); }
139 inline FirewallStatelessRule& WithRuleAction(const Aws::String& value) { SetRuleAction(value); return *this;}
140 inline FirewallStatelessRule& WithRuleAction(Aws::String&& value) { SetRuleAction(std::move(value)); return *this;}
141 inline FirewallStatelessRule& WithRuleAction(const char* value) { SetRuleAction(value); return *this;}
143
145
148 inline int GetPriority() const{ return m_priority; }
149 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
150 inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
151 inline FirewallStatelessRule& WithPriority(int value) { SetPriority(value); return *this;}
153 private:
154
155 Aws::String m_ruleGroupArn;
156 bool m_ruleGroupArnHasBeenSet = false;
157
158 Aws::Vector<Aws::String> m_sources;
159 bool m_sourcesHasBeenSet = false;
160
161 Aws::Vector<Aws::String> m_destinations;
162 bool m_destinationsHasBeenSet = false;
163
164 Aws::Vector<PortRange> m_sourcePorts;
165 bool m_sourcePortsHasBeenSet = false;
166
167 Aws::Vector<PortRange> m_destinationPorts;
168 bool m_destinationPortsHasBeenSet = false;
169
170 Aws::Vector<int> m_protocols;
171 bool m_protocolsHasBeenSet = false;
172
173 Aws::String m_ruleAction;
174 bool m_ruleActionHasBeenSet = false;
175
176 int m_priority;
177 bool m_priorityHasBeenSet = false;
178 };
179
180} // namespace Model
181} // namespace EC2
182} // namespace Aws
FirewallStatelessRule & WithSourcePorts(const Aws::Vector< PortRange > &value)
void SetDestinationPorts(Aws::Vector< PortRange > &&value)
FirewallStatelessRule & WithSources(Aws::Vector< Aws::String > &&value)
FirewallStatelessRule & AddDestinations(const char *value)
FirewallStatelessRule & WithRuleGroupArn(Aws::String &&value)
void SetProtocols(const Aws::Vector< int > &value)
FirewallStatelessRule & WithRuleAction(const Aws::String &value)
void SetSourcePorts(const Aws::Vector< PortRange > &value)
FirewallStatelessRule & AddDestinations(const Aws::String &value)
FirewallStatelessRule & WithPriority(int value)
FirewallStatelessRule & AddDestinationPorts(PortRange &&value)
FirewallStatelessRule & WithRuleGroupArn(const Aws::String &value)
FirewallStatelessRule & AddDestinations(Aws::String &&value)
FirewallStatelessRule & AddProtocols(int value)
void SetSources(const Aws::Vector< Aws::String > &value)
void SetDestinationPorts(const Aws::Vector< PortRange > &value)
FirewallStatelessRule & AddDestinationPorts(const PortRange &value)
void SetSourcePorts(Aws::Vector< PortRange > &&value)
const Aws::Vector< Aws::String > & GetDestinations() const
FirewallStatelessRule & AddSources(const char *value)
FirewallStatelessRule & WithProtocols(Aws::Vector< int > &&value)
FirewallStatelessRule & WithDestinations(const Aws::Vector< Aws::String > &value)
AWS_EC2_API FirewallStatelessRule(const Aws::Utils::Xml::XmlNode &xmlNode)
FirewallStatelessRule & AddSourcePorts(PortRange &&value)
const Aws::String & GetRuleGroupArn() const
const Aws::Vector< int > & GetProtocols() const
FirewallStatelessRule & AddSourcePorts(const PortRange &value)
FirewallStatelessRule & AddSources(const Aws::String &value)
FirewallStatelessRule & AddSources(Aws::String &&value)
FirewallStatelessRule & WithProtocols(const Aws::Vector< int > &value)
void SetSources(Aws::Vector< Aws::String > &&value)
FirewallStatelessRule & WithDestinationPorts(Aws::Vector< PortRange > &&value)
void SetRuleGroupArn(const Aws::String &value)
FirewallStatelessRule & WithRuleAction(Aws::String &&value)
FirewallStatelessRule & WithSourcePorts(Aws::Vector< PortRange > &&value)
const Aws::Vector< Aws::String > & GetSources() const
void SetRuleAction(const Aws::String &value)
FirewallStatelessRule & WithRuleGroupArn(const char *value)
AWS_EC2_API FirewallStatelessRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< PortRange > & GetDestinationPorts() const
FirewallStatelessRule & WithRuleAction(const char *value)
void SetDestinations(Aws::Vector< Aws::String > &&value)
FirewallStatelessRule & WithDestinationPorts(const Aws::Vector< PortRange > &value)
void SetProtocols(Aws::Vector< int > &&value)
void SetDestinations(const Aws::Vector< Aws::String > &value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
FirewallStatelessRule & WithDestinations(Aws::Vector< Aws::String > &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< PortRange > & GetSourcePorts() const
FirewallStatelessRule & WithSources(const Aws::Vector< Aws::String > &value)
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