AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
FirewallStatefulRule.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 FirewallStatefulRule();
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 FirewallStatefulRule& WithRuleGroupArn(const Aws::String& value) { SetRuleGroupArn(value); return *this;}
54 inline FirewallStatefulRule& WithRuleGroupArn(Aws::String&& value) { SetRuleGroupArn(std::move(value)); return *this;}
55 inline FirewallStatefulRule& 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 FirewallStatefulRule& WithSources(const Aws::Vector<Aws::String>& value) { SetSources(value); return *this;}
67 inline FirewallStatefulRule& WithSources(Aws::Vector<Aws::String>&& value) { SetSources(std::move(value)); return *this;}
68 inline FirewallStatefulRule& AddSources(const Aws::String& value) { m_sourcesHasBeenSet = true; m_sources.push_back(value); return *this; }
69 inline FirewallStatefulRule& AddSources(Aws::String&& value) { m_sourcesHasBeenSet = true; m_sources.push_back(std::move(value)); return *this; }
70 inline FirewallStatefulRule& 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 FirewallStatefulRule& WithDestinations(Aws::Vector<Aws::String>&& value) { SetDestinations(std::move(value)); return *this;}
83 inline FirewallStatefulRule& AddDestinations(const Aws::String& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; }
84 inline FirewallStatefulRule& AddDestinations(Aws::String&& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(std::move(value)); return *this; }
85 inline FirewallStatefulRule& 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 FirewallStatefulRule& WithSourcePorts(const Aws::Vector<PortRange>& value) { SetSourcePorts(value); return *this;}
97 inline FirewallStatefulRule& WithSourcePorts(Aws::Vector<PortRange>&& value) { SetSourcePorts(std::move(value)); return *this;}
98 inline FirewallStatefulRule& AddSourcePorts(const PortRange& value) { m_sourcePortsHasBeenSet = true; m_sourcePorts.push_back(value); return *this; }
99 inline FirewallStatefulRule& 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); }
111 inline FirewallStatefulRule& WithDestinationPorts(Aws::Vector<PortRange>&& value) { SetDestinationPorts(std::move(value)); return *this;}
112 inline FirewallStatefulRule& AddDestinationPorts(const PortRange& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(value); return *this; }
113 inline FirewallStatefulRule& AddDestinationPorts(PortRange&& value) { m_destinationPortsHasBeenSet = true; m_destinationPorts.push_back(std::move(value)); return *this; }
115
117
120 inline const Aws::String& GetProtocol() const{ return m_protocol; }
121 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
122 inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; }
123 inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
124 inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); }
125 inline FirewallStatefulRule& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;}
126 inline FirewallStatefulRule& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;}
127 inline FirewallStatefulRule& WithProtocol(const char* value) { SetProtocol(value); return *this;}
129
131
135 inline const Aws::String& GetRuleAction() const{ return m_ruleAction; }
136 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
137 inline void SetRuleAction(const Aws::String& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; }
138 inline void SetRuleAction(Aws::String&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = std::move(value); }
139 inline void SetRuleAction(const char* value) { m_ruleActionHasBeenSet = true; m_ruleAction.assign(value); }
140 inline FirewallStatefulRule& WithRuleAction(const Aws::String& value) { SetRuleAction(value); return *this;}
141 inline FirewallStatefulRule& WithRuleAction(Aws::String&& value) { SetRuleAction(std::move(value)); return *this;}
142 inline FirewallStatefulRule& WithRuleAction(const char* value) { SetRuleAction(value); return *this;}
144
146
150 inline const Aws::String& GetDirection() const{ return m_direction; }
151 inline bool DirectionHasBeenSet() const { return m_directionHasBeenSet; }
152 inline void SetDirection(const Aws::String& value) { m_directionHasBeenSet = true; m_direction = value; }
153 inline void SetDirection(Aws::String&& value) { m_directionHasBeenSet = true; m_direction = std::move(value); }
154 inline void SetDirection(const char* value) { m_directionHasBeenSet = true; m_direction.assign(value); }
155 inline FirewallStatefulRule& WithDirection(const Aws::String& value) { SetDirection(value); return *this;}
156 inline FirewallStatefulRule& WithDirection(Aws::String&& value) { SetDirection(std::move(value)); return *this;}
157 inline FirewallStatefulRule& WithDirection(const char* value) { SetDirection(value); return *this;}
159 private:
160
161 Aws::String m_ruleGroupArn;
162 bool m_ruleGroupArnHasBeenSet = false;
163
164 Aws::Vector<Aws::String> m_sources;
165 bool m_sourcesHasBeenSet = false;
166
167 Aws::Vector<Aws::String> m_destinations;
168 bool m_destinationsHasBeenSet = false;
169
170 Aws::Vector<PortRange> m_sourcePorts;
171 bool m_sourcePortsHasBeenSet = false;
172
173 Aws::Vector<PortRange> m_destinationPorts;
174 bool m_destinationPortsHasBeenSet = false;
175
176 Aws::String m_protocol;
177 bool m_protocolHasBeenSet = false;
178
179 Aws::String m_ruleAction;
180 bool m_ruleActionHasBeenSet = false;
181
182 Aws::String m_direction;
183 bool m_directionHasBeenSet = false;
184 };
185
186} // namespace Model
187} // namespace EC2
188} // namespace Aws
FirewallStatefulRule & WithSources(Aws::Vector< Aws::String > &&value)
FirewallStatefulRule & WithDirection(Aws::String &&value)
const Aws::Vector< PortRange > & GetDestinationPorts() const
FirewallStatefulRule & WithDestinations(Aws::Vector< Aws::String > &&value)
void SetSources(Aws::Vector< Aws::String > &&value)
FirewallStatefulRule & AddSourcePorts(PortRange &&value)
FirewallStatefulRule & WithRuleAction(const char *value)
const Aws::String & GetRuleGroupArn() const
FirewallStatefulRule & AddDestinations(const char *value)
FirewallStatefulRule & WithRuleAction(Aws::String &&value)
void SetDestinations(const Aws::Vector< Aws::String > &value)
void SetDestinationPorts(Aws::Vector< PortRange > &&value)
FirewallStatefulRule & WithSourcePorts(const Aws::Vector< PortRange > &value)
void SetSourcePorts(const Aws::Vector< PortRange > &value)
void SetSources(const Aws::Vector< Aws::String > &value)
FirewallStatefulRule & AddDestinationPorts(PortRange &&value)
void SetDirection(const Aws::String &value)
void SetRuleAction(const Aws::String &value)
FirewallStatefulRule & WithProtocol(Aws::String &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
FirewallStatefulRule & WithProtocol(const Aws::String &value)
void SetProtocol(const Aws::String &value)
AWS_EC2_API FirewallStatefulRule(const Aws::Utils::Xml::XmlNode &xmlNode)
FirewallStatefulRule & AddDestinations(const Aws::String &value)
FirewallStatefulRule & WithSourcePorts(Aws::Vector< PortRange > &&value)
FirewallStatefulRule & WithRuleAction(const Aws::String &value)
FirewallStatefulRule & WithDirection(const Aws::String &value)
void SetRuleGroupArn(const Aws::String &value)
const Aws::String & GetRuleAction() const
FirewallStatefulRule & WithProtocol(const char *value)
FirewallStatefulRule & WithRuleGroupArn(const char *value)
const Aws::Vector< PortRange > & GetSourcePorts() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
FirewallStatefulRule & AddDestinations(Aws::String &&value)
FirewallStatefulRule & AddSources(Aws::String &&value)
FirewallStatefulRule & WithDestinationPorts(const Aws::Vector< PortRange > &value)
const Aws::Vector< Aws::String > & GetSources() const
FirewallStatefulRule & WithSources(const Aws::Vector< Aws::String > &value)
void SetDestinationPorts(const Aws::Vector< PortRange > &value)
void SetDestinations(Aws::Vector< Aws::String > &&value)
void SetSourcePorts(Aws::Vector< PortRange > &&value)
FirewallStatefulRule & AddDestinationPorts(const PortRange &value)
FirewallStatefulRule & WithDestinationPorts(Aws::Vector< PortRange > &&value)
FirewallStatefulRule & WithDestinations(const Aws::Vector< Aws::String > &value)
AWS_EC2_API FirewallStatefulRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
FirewallStatefulRule & WithRuleGroupArn(Aws::String &&value)
FirewallStatefulRule & WithDirection(const char *value)
FirewallStatefulRule & AddSources(const char *value)
FirewallStatefulRule & WithRuleGroupArn(const Aws::String &value)
FirewallStatefulRule & AddSourcePorts(const PortRange &value)
FirewallStatefulRule & AddSources(const Aws::String &value)
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