AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
SampledHTTPRequest.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/wafv2/model/HTTPRequest.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/wafv2/model/CaptchaResponse.h>
13#include <aws/wafv2/model/ChallengeResponse.h>
14#include <aws/wafv2/model/HTTPHeader.h>
15#include <aws/wafv2/model/Label.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace WAFV2
29{
30namespace Model
31{
32
43 {
44 public:
45 AWS_WAFV2_API SampledHTTPRequest() = default;
48 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
49
50
52
55 inline const HTTPRequest& GetRequest() const { return m_request; }
56 inline bool RequestHasBeenSet() const { return m_requestHasBeenSet; }
57 template<typename RequestT = HTTPRequest>
58 void SetRequest(RequestT&& value) { m_requestHasBeenSet = true; m_request = std::forward<RequestT>(value); }
59 template<typename RequestT = HTTPRequest>
60 SampledHTTPRequest& WithRequest(RequestT&& value) { SetRequest(std::forward<RequestT>(value)); return *this;}
62
64
70 inline long long GetWeight() const { return m_weight; }
71 inline bool WeightHasBeenSet() const { return m_weightHasBeenSet; }
72 inline void SetWeight(long long value) { m_weightHasBeenSet = true; m_weight = value; }
73 inline SampledHTTPRequest& WithWeight(long long value) { SetWeight(value); return *this;}
75
77
81 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
82 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
83 template<typename TimestampT = Aws::Utils::DateTime>
84 void SetTimestamp(TimestampT&& value) { m_timestampHasBeenSet = true; m_timestamp = std::forward<TimestampT>(value); }
85 template<typename TimestampT = Aws::Utils::DateTime>
86 SampledHTTPRequest& WithTimestamp(TimestampT&& value) { SetTimestamp(std::forward<TimestampT>(value)); return *this;}
88
90
93 inline const Aws::String& GetAction() const { return m_action; }
94 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
95 template<typename ActionT = Aws::String>
96 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
97 template<typename ActionT = Aws::String>
98 SampledHTTPRequest& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
100
102
109 inline const Aws::String& GetRuleNameWithinRuleGroup() const { return m_ruleNameWithinRuleGroup; }
110 inline bool RuleNameWithinRuleGroupHasBeenSet() const { return m_ruleNameWithinRuleGroupHasBeenSet; }
111 template<typename RuleNameWithinRuleGroupT = Aws::String>
112 void SetRuleNameWithinRuleGroup(RuleNameWithinRuleGroupT&& value) { m_ruleNameWithinRuleGroupHasBeenSet = true; m_ruleNameWithinRuleGroup = std::forward<RuleNameWithinRuleGroupT>(value); }
113 template<typename RuleNameWithinRuleGroupT = Aws::String>
114 SampledHTTPRequest& WithRuleNameWithinRuleGroup(RuleNameWithinRuleGroupT&& value) { SetRuleNameWithinRuleGroup(std::forward<RuleNameWithinRuleGroupT>(value)); return *this;}
116
118
122 inline const Aws::Vector<HTTPHeader>& GetRequestHeadersInserted() const { return m_requestHeadersInserted; }
123 inline bool RequestHeadersInsertedHasBeenSet() const { return m_requestHeadersInsertedHasBeenSet; }
124 template<typename RequestHeadersInsertedT = Aws::Vector<HTTPHeader>>
125 void SetRequestHeadersInserted(RequestHeadersInsertedT&& value) { m_requestHeadersInsertedHasBeenSet = true; m_requestHeadersInserted = std::forward<RequestHeadersInsertedT>(value); }
126 template<typename RequestHeadersInsertedT = Aws::Vector<HTTPHeader>>
127 SampledHTTPRequest& WithRequestHeadersInserted(RequestHeadersInsertedT&& value) { SetRequestHeadersInserted(std::forward<RequestHeadersInsertedT>(value)); return *this;}
128 template<typename RequestHeadersInsertedT = HTTPHeader>
129 SampledHTTPRequest& AddRequestHeadersInserted(RequestHeadersInsertedT&& value) { m_requestHeadersInsertedHasBeenSet = true; m_requestHeadersInserted.emplace_back(std::forward<RequestHeadersInsertedT>(value)); return *this; }
131
133
136 inline int GetResponseCodeSent() const { return m_responseCodeSent; }
137 inline bool ResponseCodeSentHasBeenSet() const { return m_responseCodeSentHasBeenSet; }
138 inline void SetResponseCodeSent(int value) { m_responseCodeSentHasBeenSet = true; m_responseCodeSent = value; }
139 inline SampledHTTPRequest& WithResponseCodeSent(int value) { SetResponseCodeSent(value); return *this;}
141
143
151 inline const Aws::Vector<Label>& GetLabels() const { return m_labels; }
152 inline bool LabelsHasBeenSet() const { return m_labelsHasBeenSet; }
153 template<typename LabelsT = Aws::Vector<Label>>
154 void SetLabels(LabelsT&& value) { m_labelsHasBeenSet = true; m_labels = std::forward<LabelsT>(value); }
155 template<typename LabelsT = Aws::Vector<Label>>
156 SampledHTTPRequest& WithLabels(LabelsT&& value) { SetLabels(std::forward<LabelsT>(value)); return *this;}
157 template<typename LabelsT = Label>
158 SampledHTTPRequest& AddLabels(LabelsT&& value) { m_labelsHasBeenSet = true; m_labels.emplace_back(std::forward<LabelsT>(value)); return *this; }
160
162
165 inline const CaptchaResponse& GetCaptchaResponse() const { return m_captchaResponse; }
166 inline bool CaptchaResponseHasBeenSet() const { return m_captchaResponseHasBeenSet; }
167 template<typename CaptchaResponseT = CaptchaResponse>
168 void SetCaptchaResponse(CaptchaResponseT&& value) { m_captchaResponseHasBeenSet = true; m_captchaResponse = std::forward<CaptchaResponseT>(value); }
169 template<typename CaptchaResponseT = CaptchaResponse>
170 SampledHTTPRequest& WithCaptchaResponse(CaptchaResponseT&& value) { SetCaptchaResponse(std::forward<CaptchaResponseT>(value)); return *this;}
172
174
177 inline const ChallengeResponse& GetChallengeResponse() const { return m_challengeResponse; }
178 inline bool ChallengeResponseHasBeenSet() const { return m_challengeResponseHasBeenSet; }
179 template<typename ChallengeResponseT = ChallengeResponse>
180 void SetChallengeResponse(ChallengeResponseT&& value) { m_challengeResponseHasBeenSet = true; m_challengeResponse = std::forward<ChallengeResponseT>(value); }
181 template<typename ChallengeResponseT = ChallengeResponse>
182 SampledHTTPRequest& WithChallengeResponse(ChallengeResponseT&& value) { SetChallengeResponse(std::forward<ChallengeResponseT>(value)); return *this;}
184
186
192 inline const Aws::String& GetOverriddenAction() const { return m_overriddenAction; }
193 inline bool OverriddenActionHasBeenSet() const { return m_overriddenActionHasBeenSet; }
194 template<typename OverriddenActionT = Aws::String>
195 void SetOverriddenAction(OverriddenActionT&& value) { m_overriddenActionHasBeenSet = true; m_overriddenAction = std::forward<OverriddenActionT>(value); }
196 template<typename OverriddenActionT = Aws::String>
197 SampledHTTPRequest& WithOverriddenAction(OverriddenActionT&& value) { SetOverriddenAction(std::forward<OverriddenActionT>(value)); return *this;}
199 private:
200
201 HTTPRequest m_request;
202 bool m_requestHasBeenSet = false;
203
204 long long m_weight{0};
205 bool m_weightHasBeenSet = false;
206
207 Aws::Utils::DateTime m_timestamp{};
208 bool m_timestampHasBeenSet = false;
209
210 Aws::String m_action;
211 bool m_actionHasBeenSet = false;
212
213 Aws::String m_ruleNameWithinRuleGroup;
214 bool m_ruleNameWithinRuleGroupHasBeenSet = false;
215
216 Aws::Vector<HTTPHeader> m_requestHeadersInserted;
217 bool m_requestHeadersInsertedHasBeenSet = false;
218
219 int m_responseCodeSent{0};
220 bool m_responseCodeSentHasBeenSet = false;
221
222 Aws::Vector<Label> m_labels;
223 bool m_labelsHasBeenSet = false;
224
225 CaptchaResponse m_captchaResponse;
226 bool m_captchaResponseHasBeenSet = false;
227
228 ChallengeResponse m_challengeResponse;
229 bool m_challengeResponseHasBeenSet = false;
230
231 Aws::String m_overriddenAction;
232 bool m_overriddenActionHasBeenSet = false;
233 };
234
235} // namespace Model
236} // namespace WAFV2
237} // namespace Aws
SampledHTTPRequest & AddRequestHeadersInserted(RequestHeadersInsertedT &&value)
SampledHTTPRequest & WithAction(ActionT &&value)
const Aws::Vector< Label > & GetLabels() const
const CaptchaResponse & GetCaptchaResponse() const
void SetRuleNameWithinRuleGroup(RuleNameWithinRuleGroupT &&value)
SampledHTTPRequest & WithRuleNameWithinRuleGroup(RuleNameWithinRuleGroupT &&value)
AWS_WAFV2_API SampledHTTPRequest(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetTimestamp() const
const Aws::Vector< HTTPHeader > & GetRequestHeadersInserted() const
const Aws::String & GetRuleNameWithinRuleGroup() const
SampledHTTPRequest & WithResponseCodeSent(int value)
SampledHTTPRequest & WithWeight(long long value)
void SetChallengeResponse(ChallengeResponseT &&value)
SampledHTTPRequest & WithRequest(RequestT &&value)
SampledHTTPRequest & WithRequestHeadersInserted(RequestHeadersInsertedT &&value)
AWS_WAFV2_API SampledHTTPRequest()=default
void SetCaptchaResponse(CaptchaResponseT &&value)
SampledHTTPRequest & WithCaptchaResponse(CaptchaResponseT &&value)
void SetOverriddenAction(OverriddenActionT &&value)
SampledHTTPRequest & WithOverriddenAction(OverriddenActionT &&value)
const Aws::String & GetAction() const
const Aws::String & GetOverriddenAction() const
void SetRequestHeadersInserted(RequestHeadersInsertedT &&value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
const ChallengeResponse & GetChallengeResponse() const
SampledHTTPRequest & WithTimestamp(TimestampT &&value)
SampledHTTPRequest & WithLabels(LabelsT &&value)
const HTTPRequest & GetRequest() const
SampledHTTPRequest & WithChallengeResponse(ChallengeResponseT &&value)
AWS_WAFV2_API SampledHTTPRequest & operator=(Aws::Utils::Json::JsonView jsonValue)
SampledHTTPRequest & AddLabels(LabelsT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue