AWS SDK for C++

AWS SDK for C++ Version 1.11.756

Loading...
Searching...
No Matches
HTTPRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/waf/WAF_EXPORTS.h>
10#include <aws/waf/model/HTTPHeader.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace WAF {
22namespace Model {
23
41 public:
42 AWS_WAF_API HTTPRequest() = default;
46
48
56 inline const Aws::String& GetClientIP() const { return m_clientIP; }
57 inline bool ClientIPHasBeenSet() const { return m_clientIPHasBeenSet; }
58 template <typename ClientIPT = Aws::String>
59 void SetClientIP(ClientIPT&& value) {
60 m_clientIPHasBeenSet = true;
61 m_clientIP = std::forward<ClientIPT>(value);
62 }
63 template <typename ClientIPT = Aws::String>
64 HTTPRequest& WithClientIP(ClientIPT&& value) {
65 SetClientIP(std::forward<ClientIPT>(value));
66 return *this;
67 }
69
71
77 inline const Aws::String& GetCountry() const { return m_country; }
78 inline bool CountryHasBeenSet() const { return m_countryHasBeenSet; }
79 template <typename CountryT = Aws::String>
80 void SetCountry(CountryT&& value) {
81 m_countryHasBeenSet = true;
82 m_country = std::forward<CountryT>(value);
83 }
84 template <typename CountryT = Aws::String>
85 HTTPRequest& WithCountry(CountryT&& value) {
86 SetCountry(std::forward<CountryT>(value));
87 return *this;
88 }
90
92
96 inline const Aws::String& GetURI() const { return m_uRI; }
97 inline bool URIHasBeenSet() const { return m_uRIHasBeenSet; }
98 template <typename URIT = Aws::String>
99 void SetURI(URIT&& value) {
100 m_uRIHasBeenSet = true;
101 m_uRI = std::forward<URIT>(value);
102 }
103 template <typename URIT = Aws::String>
104 HTTPRequest& WithURI(URIT&& value) {
105 SetURI(std::forward<URIT>(value));
106 return *this;
107 }
109
111
117 inline const Aws::String& GetMethod() const { return m_method; }
118 inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; }
119 template <typename MethodT = Aws::String>
120 void SetMethod(MethodT&& value) {
121 m_methodHasBeenSet = true;
122 m_method = std::forward<MethodT>(value);
123 }
124 template <typename MethodT = Aws::String>
125 HTTPRequest& WithMethod(MethodT&& value) {
126 SetMethod(std::forward<MethodT>(value));
127 return *this;
128 }
130
132
136 inline const Aws::String& GetHTTPVersion() const { return m_hTTPVersion; }
137 inline bool HTTPVersionHasBeenSet() const { return m_hTTPVersionHasBeenSet; }
138 template <typename HTTPVersionT = Aws::String>
139 void SetHTTPVersion(HTTPVersionT&& value) {
140 m_hTTPVersionHasBeenSet = true;
141 m_hTTPVersion = std::forward<HTTPVersionT>(value);
142 }
143 template <typename HTTPVersionT = Aws::String>
144 HTTPRequest& WithHTTPVersion(HTTPVersionT&& value) {
145 SetHTTPVersion(std::forward<HTTPVersionT>(value));
146 return *this;
147 }
149
151
155 inline const Aws::Vector<HTTPHeader>& GetHeaders() const { return m_headers; }
156 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
157 template <typename HeadersT = Aws::Vector<HTTPHeader>>
158 void SetHeaders(HeadersT&& value) {
159 m_headersHasBeenSet = true;
160 m_headers = std::forward<HeadersT>(value);
161 }
162 template <typename HeadersT = Aws::Vector<HTTPHeader>>
163 HTTPRequest& WithHeaders(HeadersT&& value) {
164 SetHeaders(std::forward<HeadersT>(value));
165 return *this;
166 }
167 template <typename HeadersT = HTTPHeader>
168 HTTPRequest& AddHeaders(HeadersT&& value) {
169 m_headersHasBeenSet = true;
170 m_headers.emplace_back(std::forward<HeadersT>(value));
171 return *this;
172 }
174 private:
175 Aws::String m_clientIP;
176
177 Aws::String m_country;
178
179 Aws::String m_uRI;
180
181 Aws::String m_method;
182
183 Aws::String m_hTTPVersion;
184
185 Aws::Vector<HTTPHeader> m_headers;
186 bool m_clientIPHasBeenSet = false;
187 bool m_countryHasBeenSet = false;
188 bool m_uRIHasBeenSet = false;
189 bool m_methodHasBeenSet = false;
190 bool m_hTTPVersionHasBeenSet = false;
191 bool m_headersHasBeenSet = false;
192};
193
194} // namespace Model
195} // namespace WAF
196} // namespace Aws
HTTPRequest & WithHTTPVersion(HTTPVersionT &&value)
const Aws::String & GetCountry() const
Definition HTTPRequest.h:77
HTTPRequest & WithHeaders(HeadersT &&value)
void SetHeaders(HeadersT &&value)
HTTPRequest & WithURI(URIT &&value)
void SetCountry(CountryT &&value)
Definition HTTPRequest.h:80
const Aws::String & GetClientIP() const
Definition HTTPRequest.h:56
HTTPRequest & WithMethod(MethodT &&value)
void SetHTTPVersion(HTTPVersionT &&value)
AWS_WAF_API HTTPRequest()=default
AWS_WAF_API HTTPRequest & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_WAF_API HTTPRequest(Aws::Utils::Json::JsonView jsonValue)
void SetMethod(MethodT &&value)
HTTPRequest & WithCountry(CountryT &&value)
Definition HTTPRequest.h:85
const Aws::String & GetMethod() const
HTTPRequest & WithClientIP(ClientIPT &&value)
Definition HTTPRequest.h:64
const Aws::String & GetURI() const
Definition HTTPRequest.h:96
void SetClientIP(ClientIPT &&value)
Definition HTTPRequest.h:59
HTTPRequest & AddHeaders(HeadersT &&value)
const Aws::String & GetHTTPVersion() const
const Aws::Vector< HTTPHeader > & GetHeaders() const
AWS_WAF_API Aws::Utils::Json::JsonValue Jsonize() const
void SetURI(URIT &&value)
Definition HTTPRequest.h:99
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue