AWS SDK for C++

AWS SDK for C++ Version 1.11.853

Loading...
Searching...
No Matches
RuleCondition.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/elasticloadbalancingv2/ElasticLoadBalancingv2_EXPORTS.h>
11#include <aws/elasticloadbalancingv2/model/HostHeaderConditionConfig.h>
12#include <aws/elasticloadbalancingv2/model/HttpHeaderConditionConfig.h>
13#include <aws/elasticloadbalancingv2/model/HttpRequestMethodConditionConfig.h>
14#include <aws/elasticloadbalancingv2/model/PathPatternConditionConfig.h>
15#include <aws/elasticloadbalancingv2/model/QueryStringConditionConfig.h>
16#include <aws/elasticloadbalancingv2/model/SourceIpConditionConfig.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Xml {
23class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace ElasticLoadBalancingv2 {
27namespace Model {
28
47 public:
48 AWS_ELASTICLOADBALANCINGV2_API RuleCondition() = default;
49 AWS_ELASTICLOADBALANCINGV2_API RuleCondition(const Aws::Utils::Xml::XmlNode& xmlNode);
50 AWS_ELASTICLOADBALANCINGV2_API RuleCondition& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
51
52 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index,
53 const char* locationValue) const;
54 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
55
57
70 inline const Aws::String& GetField() const { return m_field; }
71 inline bool FieldHasBeenSet() const { return m_fieldHasBeenSet; }
72 template <typename FieldT = Aws::String>
73 void SetField(FieldT&& value) {
74 m_fieldHasBeenSet = true;
75 m_field = std::forward<FieldT>(value);
76 }
77 template <typename FieldT = Aws::String>
78 RuleCondition& WithField(FieldT&& value) {
79 SetField(std::forward<FieldT>(value));
80 return *this;
81 }
83
85
105 inline const Aws::Vector<Aws::String>& GetValues() const { return m_values; }
106 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
107 template <typename ValuesT = Aws::Vector<Aws::String>>
108 void SetValues(ValuesT&& value) {
109 m_valuesHasBeenSet = true;
110 m_values = std::forward<ValuesT>(value);
111 }
112 template <typename ValuesT = Aws::Vector<Aws::String>>
113 RuleCondition& WithValues(ValuesT&& value) {
114 SetValues(std::forward<ValuesT>(value));
115 return *this;
116 }
117 template <typename ValuesT = Aws::String>
118 RuleCondition& AddValues(ValuesT&& value) {
119 m_valuesHasBeenSet = true;
120 m_values.emplace_back(std::forward<ValuesT>(value));
121 return *this;
122 }
124
126
130 inline const HostHeaderConditionConfig& GetHostHeaderConfig() const { return m_hostHeaderConfig; }
131 inline bool HostHeaderConfigHasBeenSet() const { return m_hostHeaderConfigHasBeenSet; }
132 template <typename HostHeaderConfigT = HostHeaderConditionConfig>
133 void SetHostHeaderConfig(HostHeaderConfigT&& value) {
134 m_hostHeaderConfigHasBeenSet = true;
135 m_hostHeaderConfig = std::forward<HostHeaderConfigT>(value);
136 }
137 template <typename HostHeaderConfigT = HostHeaderConditionConfig>
138 RuleCondition& WithHostHeaderConfig(HostHeaderConfigT&& value) {
139 SetHostHeaderConfig(std::forward<HostHeaderConfigT>(value));
140 return *this;
141 }
143
145
149 inline const PathPatternConditionConfig& GetPathPatternConfig() const { return m_pathPatternConfig; }
150 inline bool PathPatternConfigHasBeenSet() const { return m_pathPatternConfigHasBeenSet; }
151 template <typename PathPatternConfigT = PathPatternConditionConfig>
152 void SetPathPatternConfig(PathPatternConfigT&& value) {
153 m_pathPatternConfigHasBeenSet = true;
154 m_pathPatternConfig = std::forward<PathPatternConfigT>(value);
155 }
156 template <typename PathPatternConfigT = PathPatternConditionConfig>
157 RuleCondition& WithPathPatternConfig(PathPatternConfigT&& value) {
158 SetPathPatternConfig(std::forward<PathPatternConfigT>(value));
159 return *this;
160 }
162
164
168 inline const HttpHeaderConditionConfig& GetHttpHeaderConfig() const { return m_httpHeaderConfig; }
169 inline bool HttpHeaderConfigHasBeenSet() const { return m_httpHeaderConfigHasBeenSet; }
170 template <typename HttpHeaderConfigT = HttpHeaderConditionConfig>
171 void SetHttpHeaderConfig(HttpHeaderConfigT&& value) {
172 m_httpHeaderConfigHasBeenSet = true;
173 m_httpHeaderConfig = std::forward<HttpHeaderConfigT>(value);
174 }
175 template <typename HttpHeaderConfigT = HttpHeaderConditionConfig>
176 RuleCondition& WithHttpHeaderConfig(HttpHeaderConfigT&& value) {
177 SetHttpHeaderConfig(std::forward<HttpHeaderConfigT>(value));
178 return *this;
179 }
181
183
187 inline const QueryStringConditionConfig& GetQueryStringConfig() const { return m_queryStringConfig; }
188 inline bool QueryStringConfigHasBeenSet() const { return m_queryStringConfigHasBeenSet; }
189 template <typename QueryStringConfigT = QueryStringConditionConfig>
190 void SetQueryStringConfig(QueryStringConfigT&& value) {
191 m_queryStringConfigHasBeenSet = true;
192 m_queryStringConfig = std::forward<QueryStringConfigT>(value);
193 }
194 template <typename QueryStringConfigT = QueryStringConditionConfig>
195 RuleCondition& WithQueryStringConfig(QueryStringConfigT&& value) {
196 SetQueryStringConfig(std::forward<QueryStringConfigT>(value));
197 return *this;
198 }
200
202
206 inline const HttpRequestMethodConditionConfig& GetHttpRequestMethodConfig() const { return m_httpRequestMethodConfig; }
207 inline bool HttpRequestMethodConfigHasBeenSet() const { return m_httpRequestMethodConfigHasBeenSet; }
208 template <typename HttpRequestMethodConfigT = HttpRequestMethodConditionConfig>
209 void SetHttpRequestMethodConfig(HttpRequestMethodConfigT&& value) {
210 m_httpRequestMethodConfigHasBeenSet = true;
211 m_httpRequestMethodConfig = std::forward<HttpRequestMethodConfigT>(value);
212 }
213 template <typename HttpRequestMethodConfigT = HttpRequestMethodConditionConfig>
214 RuleCondition& WithHttpRequestMethodConfig(HttpRequestMethodConfigT&& value) {
215 SetHttpRequestMethodConfig(std::forward<HttpRequestMethodConfigT>(value));
216 return *this;
217 }
219
221
225 inline const SourceIpConditionConfig& GetSourceIpConfig() const { return m_sourceIpConfig; }
226 inline bool SourceIpConfigHasBeenSet() const { return m_sourceIpConfigHasBeenSet; }
227 template <typename SourceIpConfigT = SourceIpConditionConfig>
228 void SetSourceIpConfig(SourceIpConfigT&& value) {
229 m_sourceIpConfigHasBeenSet = true;
230 m_sourceIpConfig = std::forward<SourceIpConfigT>(value);
231 }
232 template <typename SourceIpConfigT = SourceIpConditionConfig>
233 RuleCondition& WithSourceIpConfig(SourceIpConfigT&& value) {
234 SetSourceIpConfig(std::forward<SourceIpConfigT>(value));
235 return *this;
236 }
238
240
246 inline const Aws::Vector<Aws::String>& GetRegexValues() const { return m_regexValues; }
247 inline bool RegexValuesHasBeenSet() const { return m_regexValuesHasBeenSet; }
248 template <typename RegexValuesT = Aws::Vector<Aws::String>>
249 void SetRegexValues(RegexValuesT&& value) {
250 m_regexValuesHasBeenSet = true;
251 m_regexValues = std::forward<RegexValuesT>(value);
252 }
253 template <typename RegexValuesT = Aws::Vector<Aws::String>>
254 RuleCondition& WithRegexValues(RegexValuesT&& value) {
255 SetRegexValues(std::forward<RegexValuesT>(value));
256 return *this;
257 }
258 template <typename RegexValuesT = Aws::String>
259 RuleCondition& AddRegexValues(RegexValuesT&& value) {
260 m_regexValuesHasBeenSet = true;
261 m_regexValues.emplace_back(std::forward<RegexValuesT>(value));
262 return *this;
263 }
265 private:
266 Aws::String m_field;
267
269
270 HostHeaderConditionConfig m_hostHeaderConfig;
271
272 PathPatternConditionConfig m_pathPatternConfig;
273
274 HttpHeaderConditionConfig m_httpHeaderConfig;
275
276 QueryStringConditionConfig m_queryStringConfig;
277
278 HttpRequestMethodConditionConfig m_httpRequestMethodConfig;
279
280 SourceIpConditionConfig m_sourceIpConfig;
281
282 Aws::Vector<Aws::String> m_regexValues;
283 bool m_fieldHasBeenSet = false;
284 bool m_valuesHasBeenSet = false;
285 bool m_hostHeaderConfigHasBeenSet = false;
286 bool m_pathPatternConfigHasBeenSet = false;
287 bool m_httpHeaderConfigHasBeenSet = false;
288 bool m_queryStringConfigHasBeenSet = false;
289 bool m_httpRequestMethodConfigHasBeenSet = false;
290 bool m_sourceIpConfigHasBeenSet = false;
291 bool m_regexValuesHasBeenSet = false;
292};
293
294} // namespace Model
295} // namespace ElasticLoadBalancingv2
296} // namespace Aws
void SetHttpHeaderConfig(HttpHeaderConfigT &&value)
RuleCondition & AddValues(ValuesT &&value)
RuleCondition & WithQueryStringConfig(QueryStringConfigT &&value)
const QueryStringConditionConfig & GetQueryStringConfig() const
const HttpRequestMethodConditionConfig & GetHttpRequestMethodConfig() const
RuleCondition & WithPathPatternConfig(PathPatternConfigT &&value)
const SourceIpConditionConfig & GetSourceIpConfig() const
RuleCondition & WithField(FieldT &&value)
RuleCondition & WithRegexValues(RegexValuesT &&value)
AWS_ELASTICLOADBALANCINGV2_API RuleCondition()=default
const HttpHeaderConditionConfig & GetHttpHeaderConfig() const
void SetPathPatternConfig(PathPatternConfigT &&value)
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetHostHeaderConfig(HostHeaderConfigT &&value)
const PathPatternConditionConfig & GetPathPatternConfig() const
RuleCondition & AddRegexValues(RegexValuesT &&value)
AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetQueryStringConfig(QueryStringConfigT &&value)
const Aws::Vector< Aws::String > & GetRegexValues() const
AWS_ELASTICLOADBALANCINGV2_API RuleCondition & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
RuleCondition & WithHttpHeaderConfig(HttpHeaderConfigT &&value)
void SetSourceIpConfig(SourceIpConfigT &&value)
RuleCondition & WithHttpRequestMethodConfig(HttpRequestMethodConfigT &&value)
const HostHeaderConditionConfig & GetHostHeaderConfig() const
void SetHttpRequestMethodConfig(HttpRequestMethodConfigT &&value)
RuleCondition & WithValues(ValuesT &&value)
AWS_ELASTICLOADBALANCINGV2_API RuleCondition(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< Aws::String > & GetValues() const
RuleCondition & WithHostHeaderConfig(HostHeaderConfigT &&value)
RuleCondition & WithSourceIpConfig(SourceIpConfigT &&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