AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
AnalysisAclRule.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/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/PortRange.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace EC2 {
21namespace Model {
22
29 public:
30 AWS_EC2_API AnalysisAclRule() = default;
31 AWS_EC2_API AnalysisAclRule(const Aws::Utils::Xml::XmlNode& xmlNode);
33
34 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
35 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
36
38
41 inline const Aws::String& GetCidr() const { return m_cidr; }
42 inline bool CidrHasBeenSet() const { return m_cidrHasBeenSet; }
43 template <typename CidrT = Aws::String>
44 void SetCidr(CidrT&& value) {
45 m_cidrHasBeenSet = true;
46 m_cidr = std::forward<CidrT>(value);
47 }
48 template <typename CidrT = Aws::String>
49 AnalysisAclRule& WithCidr(CidrT&& value) {
50 SetCidr(std::forward<CidrT>(value));
51 return *this;
52 }
54
56
59 inline bool GetEgress() const { return m_egress; }
60 inline bool EgressHasBeenSet() const { return m_egressHasBeenSet; }
61 inline void SetEgress(bool value) {
62 m_egressHasBeenSet = true;
63 m_egress = value;
64 }
65 inline AnalysisAclRule& WithEgress(bool value) {
66 SetEgress(value);
67 return *this;
68 }
70
72
75 inline const PortRange& GetPortRange() const { return m_portRange; }
76 inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; }
77 template <typename PortRangeT = PortRange>
78 void SetPortRange(PortRangeT&& value) {
79 m_portRangeHasBeenSet = true;
80 m_portRange = std::forward<PortRangeT>(value);
81 }
82 template <typename PortRangeT = PortRange>
83 AnalysisAclRule& WithPortRange(PortRangeT&& value) {
84 SetPortRange(std::forward<PortRangeT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetProtocol() const { return m_protocol; }
94 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
95 template <typename ProtocolT = Aws::String>
96 void SetProtocol(ProtocolT&& value) {
97 m_protocolHasBeenSet = true;
98 m_protocol = std::forward<ProtocolT>(value);
99 }
100 template <typename ProtocolT = Aws::String>
101 AnalysisAclRule& WithProtocol(ProtocolT&& value) {
102 SetProtocol(std::forward<ProtocolT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::String& GetRuleAction() const { return m_ruleAction; }
112 inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; }
113 template <typename RuleActionT = Aws::String>
114 void SetRuleAction(RuleActionT&& value) {
115 m_ruleActionHasBeenSet = true;
116 m_ruleAction = std::forward<RuleActionT>(value);
117 }
118 template <typename RuleActionT = Aws::String>
119 AnalysisAclRule& WithRuleAction(RuleActionT&& value) {
120 SetRuleAction(std::forward<RuleActionT>(value));
121 return *this;
122 }
124
126
129 inline int GetRuleNumber() const { return m_ruleNumber; }
130 inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; }
131 inline void SetRuleNumber(int value) {
132 m_ruleNumberHasBeenSet = true;
133 m_ruleNumber = value;
134 }
135 inline AnalysisAclRule& WithRuleNumber(int value) {
136 SetRuleNumber(value);
137 return *this;
138 }
140 private:
141 Aws::String m_cidr;
142
143 bool m_egress{false};
144
145 PortRange m_portRange;
146
147 Aws::String m_protocol;
148
149 Aws::String m_ruleAction;
150
151 int m_ruleNumber{0};
152 bool m_cidrHasBeenSet = false;
153 bool m_egressHasBeenSet = false;
154 bool m_portRangeHasBeenSet = false;
155 bool m_protocolHasBeenSet = false;
156 bool m_ruleActionHasBeenSet = false;
157 bool m_ruleNumberHasBeenSet = false;
158};
159
160} // namespace Model
161} // namespace EC2
162} // namespace Aws
const PortRange & GetPortRange() const
const Aws::String & GetCidr() const
AnalysisAclRule & WithPortRange(PortRangeT &&value)
AnalysisAclRule & WithEgress(bool value)
AnalysisAclRule & WithRuleNumber(int value)
AnalysisAclRule & WithRuleAction(RuleActionT &&value)
void SetPortRange(PortRangeT &&value)
AnalysisAclRule & WithCidr(CidrT &&value)
void SetProtocol(ProtocolT &&value)
AWS_EC2_API AnalysisAclRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API AnalysisAclRule()=default
void SetRuleAction(RuleActionT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetRuleAction() const
AWS_EC2_API AnalysisAclRule(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetProtocol() const
AnalysisAclRule & WithProtocol(ProtocolT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream