AWS SDK for C++

AWS SDK for C++ Version 1.11.931

Loading...
Searching...
No Matches
ByteMatchStatement.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/wafv2/WAFV2_EXPORTS.h>
10#include <aws/wafv2/model/FieldToMatch.h>
11#include <aws/wafv2/model/PositionalConstraint.h>
12#include <aws/wafv2/model/PreParseTextTransformation.h>
13#include <aws/wafv2/model/TextTransformation.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace WAFV2 {
25namespace Model {
26
38 public:
39 AWS_WAFV2_API ByteMatchStatement() = default;
42 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
82 inline const Aws::Utils::ByteBuffer& GetSearchString() const { return m_searchString; }
83 inline bool SearchStringHasBeenSet() const { return m_searchStringHasBeenSet; }
84 template <typename SearchStringT = Aws::Utils::ByteBuffer>
85 void SetSearchString(SearchStringT&& value) {
86 m_searchStringHasBeenSet = true;
87 m_searchString = std::forward<SearchStringT>(value);
88 }
89 template <typename SearchStringT = Aws::Utils::ByteBuffer>
90 ByteMatchStatement& WithSearchString(SearchStringT&& value) {
91 SetSearchString(std::forward<SearchStringT>(value));
92 return *this;
93 }
95
97
100 inline const FieldToMatch& GetFieldToMatch() const { return m_fieldToMatch; }
101 inline bool FieldToMatchHasBeenSet() const { return m_fieldToMatchHasBeenSet; }
102 template <typename FieldToMatchT = FieldToMatch>
103 void SetFieldToMatch(FieldToMatchT&& value) {
104 m_fieldToMatchHasBeenSet = true;
105 m_fieldToMatch = std::forward<FieldToMatchT>(value);
106 }
107 template <typename FieldToMatchT = FieldToMatch>
108 ByteMatchStatement& WithFieldToMatch(FieldToMatchT&& value) {
109 SetFieldToMatch(std::forward<FieldToMatchT>(value));
110 return *this;
111 }
113
115
125 inline const Aws::Vector<TextTransformation>& GetTextTransformations() const { return m_textTransformations; }
126 inline bool TextTransformationsHasBeenSet() const { return m_textTransformationsHasBeenSet; }
127 template <typename TextTransformationsT = Aws::Vector<TextTransformation>>
128 void SetTextTransformations(TextTransformationsT&& value) {
129 m_textTransformationsHasBeenSet = true;
130 m_textTransformations = std::forward<TextTransformationsT>(value);
131 }
132 template <typename TextTransformationsT = Aws::Vector<TextTransformation>>
133 ByteMatchStatement& WithTextTransformations(TextTransformationsT&& value) {
134 SetTextTransformations(std::forward<TextTransformationsT>(value));
135 return *this;
136 }
137 template <typename TextTransformationsT = TextTransformation>
138 ByteMatchStatement& AddTextTransformations(TextTransformationsT&& value) {
139 m_textTransformationsHasBeenSet = true;
140 m_textTransformations.emplace_back(std::forward<TextTransformationsT>(value));
141 return *this;
142 }
144
146
154 inline const Aws::Vector<PreParseTextTransformation>& GetPreParseTextTransformations() const { return m_preParseTextTransformations; }
155 inline bool PreParseTextTransformationsHasBeenSet() const { return m_preParseTextTransformationsHasBeenSet; }
156 template <typename PreParseTextTransformationsT = Aws::Vector<PreParseTextTransformation>>
157 void SetPreParseTextTransformations(PreParseTextTransformationsT&& value) {
158 m_preParseTextTransformationsHasBeenSet = true;
159 m_preParseTextTransformations = std::forward<PreParseTextTransformationsT>(value);
160 }
161 template <typename PreParseTextTransformationsT = Aws::Vector<PreParseTextTransformation>>
162 ByteMatchStatement& WithPreParseTextTransformations(PreParseTextTransformationsT&& value) {
163 SetPreParseTextTransformations(std::forward<PreParseTextTransformationsT>(value));
164 return *this;
165 }
166 template <typename PreParseTextTransformationsT = PreParseTextTransformation>
167 ByteMatchStatement& AddPreParseTextTransformations(PreParseTextTransformationsT&& value) {
168 m_preParseTextTransformationsHasBeenSet = true;
169 m_preParseTextTransformations.emplace_back(std::forward<PreParseTextTransformationsT>(value));
170 return *this;
171 }
173
175
198 inline PositionalConstraint GetPositionalConstraint() const { return m_positionalConstraint; }
199 inline bool PositionalConstraintHasBeenSet() const { return m_positionalConstraintHasBeenSet; }
201 m_positionalConstraintHasBeenSet = true;
202 m_positionalConstraint = value;
203 }
209 private:
210 Aws::Utils::ByteBuffer m_searchString{};
211
212 FieldToMatch m_fieldToMatch;
213
214 Aws::Vector<TextTransformation> m_textTransformations;
215
216 Aws::Vector<PreParseTextTransformation> m_preParseTextTransformations;
217
219 bool m_searchStringHasBeenSet = false;
220 bool m_fieldToMatchHasBeenSet = false;
221 bool m_textTransformationsHasBeenSet = false;
222 bool m_preParseTextTransformationsHasBeenSet = false;
223 bool m_positionalConstraintHasBeenSet = false;
224};
225
226} // namespace Model
227} // namespace WAFV2
228} // namespace Aws
const FieldToMatch & GetFieldToMatch() const
const Aws::Vector< PreParseTextTransformation > & GetPreParseTextTransformations() const
ByteMatchStatement & WithFieldToMatch(FieldToMatchT &&value)
void SetTextTransformations(TextTransformationsT &&value)
void SetFieldToMatch(FieldToMatchT &&value)
const Aws::Vector< TextTransformation > & GetTextTransformations() const
ByteMatchStatement & AddPreParseTextTransformations(PreParseTextTransformationsT &&value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
ByteMatchStatement & WithPositionalConstraint(PositionalConstraint value)
void SetPreParseTextTransformations(PreParseTextTransformationsT &&value)
AWS_WAFV2_API ByteMatchStatement()=default
ByteMatchStatement & WithPreParseTextTransformations(PreParseTextTransformationsT &&value)
AWS_WAFV2_API ByteMatchStatement & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_WAFV2_API ByteMatchStatement(Aws::Utils::Json::JsonView jsonValue)
void SetSearchString(SearchStringT &&value)
void SetPositionalConstraint(PositionalConstraint value)
PositionalConstraint GetPositionalConstraint() const
ByteMatchStatement & WithSearchString(SearchStringT &&value)
const Aws::Utils::ByteBuffer & GetSearchString() const
ByteMatchStatement & WithTextTransformations(TextTransformationsT &&value)
ByteMatchStatement & AddTextTransformations(TextTransformationsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue