AWS SDK for C++  0.14.3
AWS SDK for C++
HTTPRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/waf/WAF_EXPORTS.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace WAF
31 {
32 namespace Model
33 {
34 
42  {
43  public:
44  HTTPRequest();
45  HTTPRequest(const Aws::Utils::Json::JsonValue& jsonValue);
46  HTTPRequest& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
57  inline const Aws::String& GetClientIP() const{ return m_clientIP; }
58 
67  inline void SetClientIP(const Aws::String& value) { m_clientIPHasBeenSet = true; m_clientIP = value; }
68 
77  inline void SetClientIP(Aws::String&& value) { m_clientIPHasBeenSet = true; m_clientIP = value; }
78 
87  inline void SetClientIP(const char* value) { m_clientIPHasBeenSet = true; m_clientIP.assign(value); }
88 
97  inline HTTPRequest& WithClientIP(const Aws::String& value) { SetClientIP(value); return *this;}
98 
107  inline HTTPRequest& WithClientIP(Aws::String&& value) { SetClientIP(value); return *this;}
108 
117  inline HTTPRequest& WithClientIP(const char* value) { SetClientIP(value); return *this;}
118 
125  inline const Aws::String& GetCountry() const{ return m_country; }
126 
133  inline void SetCountry(const Aws::String& value) { m_countryHasBeenSet = true; m_country = value; }
134 
141  inline void SetCountry(Aws::String&& value) { m_countryHasBeenSet = true; m_country = value; }
142 
149  inline void SetCountry(const char* value) { m_countryHasBeenSet = true; m_country.assign(value); }
150 
157  inline HTTPRequest& WithCountry(const Aws::String& value) { SetCountry(value); return *this;}
158 
165  inline HTTPRequest& WithCountry(Aws::String&& value) { SetCountry(value); return *this;}
166 
173  inline HTTPRequest& WithCountry(const char* value) { SetCountry(value); return *this;}
174 
179  inline const Aws::String& GetURI() const{ return m_uRI; }
180 
185  inline void SetURI(const Aws::String& value) { m_uRIHasBeenSet = true; m_uRI = value; }
186 
191  inline void SetURI(Aws::String&& value) { m_uRIHasBeenSet = true; m_uRI = value; }
192 
197  inline void SetURI(const char* value) { m_uRIHasBeenSet = true; m_uRI.assign(value); }
198 
203  inline HTTPRequest& WithURI(const Aws::String& value) { SetURI(value); return *this;}
204 
209  inline HTTPRequest& WithURI(Aws::String&& value) { SetURI(value); return *this;}
210 
215  inline HTTPRequest& WithURI(const char* value) { SetURI(value); return *this;}
216 
223  inline const Aws::String& GetMethod() const{ return m_method; }
224 
231  inline void SetMethod(const Aws::String& value) { m_methodHasBeenSet = true; m_method = value; }
232 
239  inline void SetMethod(Aws::String&& value) { m_methodHasBeenSet = true; m_method = value; }
240 
247  inline void SetMethod(const char* value) { m_methodHasBeenSet = true; m_method.assign(value); }
248 
255  inline HTTPRequest& WithMethod(const Aws::String& value) { SetMethod(value); return *this;}
256 
263  inline HTTPRequest& WithMethod(Aws::String&& value) { SetMethod(value); return *this;}
264 
271  inline HTTPRequest& WithMethod(const char* value) { SetMethod(value); return *this;}
272 
277  inline const Aws::String& GetHTTPVersion() const{ return m_hTTPVersion; }
278 
283  inline void SetHTTPVersion(const Aws::String& value) { m_hTTPVersionHasBeenSet = true; m_hTTPVersion = value; }
284 
289  inline void SetHTTPVersion(Aws::String&& value) { m_hTTPVersionHasBeenSet = true; m_hTTPVersion = value; }
290 
295  inline void SetHTTPVersion(const char* value) { m_hTTPVersionHasBeenSet = true; m_hTTPVersion.assign(value); }
296 
301  inline HTTPRequest& WithHTTPVersion(const Aws::String& value) { SetHTTPVersion(value); return *this;}
302 
307  inline HTTPRequest& WithHTTPVersion(Aws::String&& value) { SetHTTPVersion(value); return *this;}
308 
313  inline HTTPRequest& WithHTTPVersion(const char* value) { SetHTTPVersion(value); return *this;}
314 
319  inline const Aws::Vector<HTTPHeader>& GetHeaders() const{ return m_headers; }
320 
325  inline void SetHeaders(const Aws::Vector<HTTPHeader>& value) { m_headersHasBeenSet = true; m_headers = value; }
326 
331  inline void SetHeaders(Aws::Vector<HTTPHeader>&& value) { m_headersHasBeenSet = true; m_headers = value; }
332 
337  inline HTTPRequest& WithHeaders(const Aws::Vector<HTTPHeader>& value) { SetHeaders(value); return *this;}
338 
343  inline HTTPRequest& WithHeaders(Aws::Vector<HTTPHeader>&& value) { SetHeaders(value); return *this;}
344 
349  inline HTTPRequest& AddHeaders(const HTTPHeader& value) { m_headersHasBeenSet = true; m_headers.push_back(value); return *this; }
350 
355  inline HTTPRequest& AddHeaders(HTTPHeader&& value) { m_headersHasBeenSet = true; m_headers.push_back(value); return *this; }
356 
357  private:
358  Aws::String m_clientIP;
359  bool m_clientIPHasBeenSet;
360  Aws::String m_country;
361  bool m_countryHasBeenSet;
362  Aws::String m_uRI;
363  bool m_uRIHasBeenSet;
364  Aws::String m_method;
365  bool m_methodHasBeenSet;
366  Aws::String m_hTTPVersion;
367  bool m_hTTPVersionHasBeenSet;
368  Aws::Vector<HTTPHeader> m_headers;
369  bool m_headersHasBeenSet;
370  };
371 
372 } // namespace Model
373 } // namespace WAF
374 } // namespace Aws
const Aws::Vector< HTTPHeader > & GetHeaders() const
Definition: HTTPRequest.h:319
void SetURI(const Aws::String &value)
Definition: HTTPRequest.h:185
HTTPRequest & WithURI(const char *value)
Definition: HTTPRequest.h:215
HTTPRequest & WithHTTPVersion(const Aws::String &value)
Definition: HTTPRequest.h:301
const Aws::String & GetURI() const
Definition: HTTPRequest.h:179
HTTPRequest & WithHTTPVersion(const char *value)
Definition: HTTPRequest.h:313
void SetClientIP(Aws::String &&value)
Definition: HTTPRequest.h:77
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
HTTPRequest & WithCountry(const Aws::String &value)
Definition: HTTPRequest.h:157
void SetClientIP(const char *value)
Definition: HTTPRequest.h:87
HTTPRequest & AddHeaders(const HTTPHeader &value)
Definition: HTTPRequest.h:349
void SetMethod(const Aws::String &value)
Definition: HTTPRequest.h:231
HTTPRequest & WithURI(Aws::String &&value)
Definition: HTTPRequest.h:209
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:37
HTTPRequest & WithCountry(Aws::String &&value)
Definition: HTTPRequest.h:165
HTTPRequest & WithHTTPVersion(Aws::String &&value)
Definition: HTTPRequest.h:307
HTTPRequest & AddHeaders(HTTPHeader &&value)
Definition: HTTPRequest.h:355
void SetHTTPVersion(const char *value)
Definition: HTTPRequest.h:295
HTTPRequest & WithClientIP(Aws::String &&value)
Definition: HTTPRequest.h:107
void SetClientIP(const Aws::String &value)
Definition: HTTPRequest.h:67
void SetCountry(const Aws::String &value)
Definition: HTTPRequest.h:133
const Aws::String & GetHTTPVersion() const
Definition: HTTPRequest.h:277
HTTPRequest & WithHeaders(const Aws::Vector< HTTPHeader > &value)
Definition: HTTPRequest.h:337
void SetMethod(const char *value)
Definition: HTTPRequest.h:247
const Aws::String & GetCountry() const
Definition: HTTPRequest.h:125
void SetHeaders(Aws::Vector< HTTPHeader > &&value)
Definition: HTTPRequest.h:331
void SetHTTPVersion(const Aws::String &value)
Definition: HTTPRequest.h:283
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetCountry(const char *value)
Definition: HTTPRequest.h:149
HTTPRequest & WithURI(const Aws::String &value)
Definition: HTTPRequest.h:203
HTTPRequest & WithMethod(const Aws::String &value)
Definition: HTTPRequest.h:255
void SetHeaders(const Aws::Vector< HTTPHeader > &value)
Definition: HTTPRequest.h:325
HTTPRequest & WithHeaders(Aws::Vector< HTTPHeader > &&value)
Definition: HTTPRequest.h:343
const Aws::String & GetClientIP() const
Definition: HTTPRequest.h:57
HTTPRequest & WithMethod(Aws::String &&value)
Definition: HTTPRequest.h:263
void SetCountry(Aws::String &&value)
Definition: HTTPRequest.h:141
HTTPRequest & WithMethod(const char *value)
Definition: HTTPRequest.h:271
void SetMethod(Aws::String &&value)
Definition: HTTPRequest.h:239
void SetURI(const char *value)
Definition: HTTPRequest.h:197
HTTPRequest & WithClientIP(const char *value)
Definition: HTTPRequest.h:117
HTTPRequest & WithCountry(const char *value)
Definition: HTTPRequest.h:173
const Aws::String & GetMethod() const
Definition: HTTPRequest.h:223
void SetURI(Aws::String &&value)
Definition: HTTPRequest.h:191
JSON (JavaScript Object Notation).
HTTPRequest & WithClientIP(const Aws::String &value)
Definition: HTTPRequest.h:97
void SetHTTPVersion(Aws::String &&value)
Definition: HTTPRequest.h:289