AWS SDK for C++

AWS SDK for C++ Version 1.11.719

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
43 public:
44 AWS_ELASTICLOADBALANCINGV2_API RuleCondition() = default;
45 AWS_ELASTICLOADBALANCINGV2_API RuleCondition(const Aws::Utils::Xml::XmlNode& xmlNode);
46 AWS_ELASTICLOADBALANCINGV2_API RuleCondition& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47
48 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index,
49 const char* locationValue) const;
50 AWS_ELASTICLOADBALANCINGV2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
51
53
61 inline const Aws::String& GetField() const { return m_field; }
62 inline bool FieldHasBeenSet() const { return m_fieldHasBeenSet; }
63 template <typename FieldT = Aws::String>
64 void SetField(FieldT&& value) {
65 m_fieldHasBeenSet = true;
66 m_field = std::forward<FieldT>(value);
67 }
68 template <typename FieldT = Aws::String>
69 RuleCondition& WithField(FieldT&& value) {
70 SetField(std::forward<FieldT>(value));
71 return *this;
72 }
74
76
96 inline const Aws::Vector<Aws::String>& GetValues() const { return m_values; }
97 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
98 template <typename ValuesT = Aws::Vector<Aws::String>>
99 void SetValues(ValuesT&& value) {
100 m_valuesHasBeenSet = true;
101 m_values = std::forward<ValuesT>(value);
102 }
103 template <typename ValuesT = Aws::Vector<Aws::String>>
104 RuleCondition& WithValues(ValuesT&& value) {
105 SetValues(std::forward<ValuesT>(value));
106 return *this;
107 }
108 template <typename ValuesT = Aws::String>
109 RuleCondition& AddValues(ValuesT&& value) {
110 m_valuesHasBeenSet = true;
111 m_values.emplace_back(std::forward<ValuesT>(value));
112 return *this;
113 }
115
117
121 inline const HostHeaderConditionConfig& GetHostHeaderConfig() const { return m_hostHeaderConfig; }
122 inline bool HostHeaderConfigHasBeenSet() const { return m_hostHeaderConfigHasBeenSet; }
123 template <typename HostHeaderConfigT = HostHeaderConditionConfig>
124 void SetHostHeaderConfig(HostHeaderConfigT&& value) {
125 m_hostHeaderConfigHasBeenSet = true;
126 m_hostHeaderConfig = std::forward<HostHeaderConfigT>(value);
127 }
128 template <typename HostHeaderConfigT = HostHeaderConditionConfig>
129 RuleCondition& WithHostHeaderConfig(HostHeaderConfigT&& value) {
130 SetHostHeaderConfig(std::forward<HostHeaderConfigT>(value));
131 return *this;
132 }
134
136
140 inline const PathPatternConditionConfig& GetPathPatternConfig() const { return m_pathPatternConfig; }
141 inline bool PathPatternConfigHasBeenSet() const { return m_pathPatternConfigHasBeenSet; }
142 template <typename PathPatternConfigT = PathPatternConditionConfig>
143 void SetPathPatternConfig(PathPatternConfigT&& value) {
144 m_pathPatternConfigHasBeenSet = true;
145 m_pathPatternConfig = std::forward<PathPatternConfigT>(value);
146 }
147 template <typename PathPatternConfigT = PathPatternConditionConfig>
148 RuleCondition& WithPathPatternConfig(PathPatternConfigT&& value) {
149 SetPathPatternConfig(std::forward<PathPatternConfigT>(value));
150 return *this;
151 }
153
155
159 inline const HttpHeaderConditionConfig& GetHttpHeaderConfig() const { return m_httpHeaderConfig; }
160 inline bool HttpHeaderConfigHasBeenSet() const { return m_httpHeaderConfigHasBeenSet; }
161 template <typename HttpHeaderConfigT = HttpHeaderConditionConfig>
162 void SetHttpHeaderConfig(HttpHeaderConfigT&& value) {
163 m_httpHeaderConfigHasBeenSet = true;
164 m_httpHeaderConfig = std::forward<HttpHeaderConfigT>(value);
165 }
166 template <typename HttpHeaderConfigT = HttpHeaderConditionConfig>
167 RuleCondition& WithHttpHeaderConfig(HttpHeaderConfigT&& value) {
168 SetHttpHeaderConfig(std::forward<HttpHeaderConfigT>(value));
169 return *this;
170 }
172
174
178 inline const QueryStringConditionConfig& GetQueryStringConfig() const { return m_queryStringConfig; }
179 inline bool QueryStringConfigHasBeenSet() const { return m_queryStringConfigHasBeenSet; }
180 template <typename QueryStringConfigT = QueryStringConditionConfig>
181 void SetQueryStringConfig(QueryStringConfigT&& value) {
182 m_queryStringConfigHasBeenSet = true;
183 m_queryStringConfig = std::forward<QueryStringConfigT>(value);
184 }
185 template <typename QueryStringConfigT = QueryStringConditionConfig>
186 RuleCondition& WithQueryStringConfig(QueryStringConfigT&& value) {
187 SetQueryStringConfig(std::forward<QueryStringConfigT>(value));
188 return *this;
189 }
191
193
197 inline const HttpRequestMethodConditionConfig& GetHttpRequestMethodConfig() const { return m_httpRequestMethodConfig; }
198 inline bool HttpRequestMethodConfigHasBeenSet() const { return m_httpRequestMethodConfigHasBeenSet; }
199 template <typename HttpRequestMethodConfigT = HttpRequestMethodConditionConfig>
200 void SetHttpRequestMethodConfig(HttpRequestMethodConfigT&& value) {
201 m_httpRequestMethodConfigHasBeenSet = true;
202 m_httpRequestMethodConfig = std::forward<HttpRequestMethodConfigT>(value);
203 }
204 template <typename HttpRequestMethodConfigT = HttpRequestMethodConditionConfig>
205 RuleCondition& WithHttpRequestMethodConfig(HttpRequestMethodConfigT&& value) {
206 SetHttpRequestMethodConfig(std::forward<HttpRequestMethodConfigT>(value));
207 return *this;
208 }
210
212
216 inline const SourceIpConditionConfig& GetSourceIpConfig() const { return m_sourceIpConfig; }
217 inline bool SourceIpConfigHasBeenSet() const { return m_sourceIpConfigHasBeenSet; }
218 template <typename SourceIpConfigT = SourceIpConditionConfig>
219 void SetSourceIpConfig(SourceIpConfigT&& value) {
220 m_sourceIpConfigHasBeenSet = true;
221 m_sourceIpConfig = std::forward<SourceIpConfigT>(value);
222 }
223 template <typename SourceIpConfigT = SourceIpConditionConfig>
224 RuleCondition& WithSourceIpConfig(SourceIpConfigT&& value) {
225 SetSourceIpConfig(std::forward<SourceIpConfigT>(value));
226 return *this;
227 }
229
231
237 inline const Aws::Vector<Aws::String>& GetRegexValues() const { return m_regexValues; }
238 inline bool RegexValuesHasBeenSet() const { return m_regexValuesHasBeenSet; }
239 template <typename RegexValuesT = Aws::Vector<Aws::String>>
240 void SetRegexValues(RegexValuesT&& value) {
241 m_regexValuesHasBeenSet = true;
242 m_regexValues = std::forward<RegexValuesT>(value);
243 }
244 template <typename RegexValuesT = Aws::Vector<Aws::String>>
245 RuleCondition& WithRegexValues(RegexValuesT&& value) {
246 SetRegexValues(std::forward<RegexValuesT>(value));
247 return *this;
248 }
249 template <typename RegexValuesT = Aws::String>
250 RuleCondition& AddRegexValues(RegexValuesT&& value) {
251 m_regexValuesHasBeenSet = true;
252 m_regexValues.emplace_back(std::forward<RegexValuesT>(value));
253 return *this;
254 }
256 private:
257 Aws::String m_field;
258
260
261 HostHeaderConditionConfig m_hostHeaderConfig;
262
263 PathPatternConditionConfig m_pathPatternConfig;
264
265 HttpHeaderConditionConfig m_httpHeaderConfig;
266
267 QueryStringConditionConfig m_queryStringConfig;
268
269 HttpRequestMethodConditionConfig m_httpRequestMethodConfig;
270
271 SourceIpConditionConfig m_sourceIpConfig;
272
273 Aws::Vector<Aws::String> m_regexValues;
274 bool m_fieldHasBeenSet = false;
275 bool m_valuesHasBeenSet = false;
276 bool m_hostHeaderConfigHasBeenSet = false;
277 bool m_pathPatternConfigHasBeenSet = false;
278 bool m_httpHeaderConfigHasBeenSet = false;
279 bool m_queryStringConfigHasBeenSet = false;
280 bool m_httpRequestMethodConfigHasBeenSet = false;
281 bool m_sourceIpConfigHasBeenSet = false;
282 bool m_regexValuesHasBeenSet = false;
283};
284
285} // namespace Model
286} // namespace ElasticLoadBalancingv2
287} // 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