AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
HTTPRequest.h
1
6#pragma once
7#include <aws/wafv2/WAFV2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/wafv2/model/HTTPHeader.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace WAFV2
24{
25namespace Model
26{
27
37 {
38 public:
39 AWS_WAFV2_API HTTPRequest() = default;
40 AWS_WAFV2_API HTTPRequest(Aws::Utils::Json::JsonView jsonValue);
42 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
54 inline const Aws::String& GetClientIP() const { return m_clientIP; }
55 inline bool ClientIPHasBeenSet() const { return m_clientIPHasBeenSet; }
56 template<typename ClientIPT = Aws::String>
57 void SetClientIP(ClientIPT&& value) { m_clientIPHasBeenSet = true; m_clientIP = std::forward<ClientIPT>(value); }
58 template<typename ClientIPT = Aws::String>
59 HTTPRequest& WithClientIP(ClientIPT&& value) { SetClientIP(std::forward<ClientIPT>(value)); return *this;}
61
63
69 inline const Aws::String& GetCountry() const { return m_country; }
70 inline bool CountryHasBeenSet() const { return m_countryHasBeenSet; }
71 template<typename CountryT = Aws::String>
72 void SetCountry(CountryT&& value) { m_countryHasBeenSet = true; m_country = std::forward<CountryT>(value); }
73 template<typename CountryT = Aws::String>
74 HTTPRequest& WithCountry(CountryT&& value) { SetCountry(std::forward<CountryT>(value)); return *this;}
76
78
82 inline const Aws::String& GetURI() const { return m_uRI; }
83 inline bool URIHasBeenSet() const { return m_uRIHasBeenSet; }
84 template<typename URIT = Aws::String>
85 void SetURI(URIT&& value) { m_uRIHasBeenSet = true; m_uRI = std::forward<URIT>(value); }
86 template<typename URIT = Aws::String>
87 HTTPRequest& WithURI(URIT&& value) { SetURI(std::forward<URIT>(value)); return *this;}
89
91
94 inline const Aws::String& GetMethod() const { return m_method; }
95 inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; }
96 template<typename MethodT = Aws::String>
97 void SetMethod(MethodT&& value) { m_methodHasBeenSet = true; m_method = std::forward<MethodT>(value); }
98 template<typename MethodT = Aws::String>
99 HTTPRequest& WithMethod(MethodT&& value) { SetMethod(std::forward<MethodT>(value)); return *this;}
101
103
107 inline const Aws::String& GetHTTPVersion() const { return m_hTTPVersion; }
108 inline bool HTTPVersionHasBeenSet() const { return m_hTTPVersionHasBeenSet; }
109 template<typename HTTPVersionT = Aws::String>
110 void SetHTTPVersion(HTTPVersionT&& value) { m_hTTPVersionHasBeenSet = true; m_hTTPVersion = std::forward<HTTPVersionT>(value); }
111 template<typename HTTPVersionT = Aws::String>
112 HTTPRequest& WithHTTPVersion(HTTPVersionT&& value) { SetHTTPVersion(std::forward<HTTPVersionT>(value)); return *this;}
114
116
120 inline const Aws::Vector<HTTPHeader>& GetHeaders() const { return m_headers; }
121 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
122 template<typename HeadersT = Aws::Vector<HTTPHeader>>
123 void SetHeaders(HeadersT&& value) { m_headersHasBeenSet = true; m_headers = std::forward<HeadersT>(value); }
124 template<typename HeadersT = Aws::Vector<HTTPHeader>>
125 HTTPRequest& WithHeaders(HeadersT&& value) { SetHeaders(std::forward<HeadersT>(value)); return *this;}
126 template<typename HeadersT = HTTPHeader>
127 HTTPRequest& AddHeaders(HeadersT&& value) { m_headersHasBeenSet = true; m_headers.emplace_back(std::forward<HeadersT>(value)); return *this; }
129 private:
130
131 Aws::String m_clientIP;
132 bool m_clientIPHasBeenSet = false;
133
134 Aws::String m_country;
135 bool m_countryHasBeenSet = false;
136
137 Aws::String m_uRI;
138 bool m_uRIHasBeenSet = false;
139
140 Aws::String m_method;
141 bool m_methodHasBeenSet = false;
142
143 Aws::String m_hTTPVersion;
144 bool m_hTTPVersionHasBeenSet = false;
145
146 Aws::Vector<HTTPHeader> m_headers;
147 bool m_headersHasBeenSet = false;
148 };
149
150} // namespace Model
151} // namespace WAFV2
152} // namespace Aws
HTTPRequest & AddHeaders(HeadersT &&value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
HTTPRequest & WithClientIP(ClientIPT &&value)
Definition HTTPRequest.h:59
void SetClientIP(ClientIPT &&value)
Definition HTTPRequest.h:57
HTTPRequest & WithCountry(CountryT &&value)
Definition HTTPRequest.h:74
void SetCountry(CountryT &&value)
Definition HTTPRequest.h:72
void SetHeaders(HeadersT &&value)
HTTPRequest & WithHTTPVersion(HTTPVersionT &&value)
const Aws::String & GetHTTPVersion() const
void SetHTTPVersion(HTTPVersionT &&value)
HTTPRequest & WithURI(URIT &&value)
Definition HTTPRequest.h:87
HTTPRequest & WithMethod(MethodT &&value)
Definition HTTPRequest.h:99
AWS_WAFV2_API HTTPRequest & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_WAFV2_API HTTPRequest(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< HTTPHeader > & GetHeaders() const
const Aws::String & GetMethod() const
Definition HTTPRequest.h:94
void SetMethod(MethodT &&value)
Definition HTTPRequest.h:97
const Aws::String & GetCountry() const
Definition HTTPRequest.h:69
HTTPRequest & WithHeaders(HeadersT &&value)
void SetURI(URIT &&value)
Definition HTTPRequest.h:85
const Aws::String & GetURI() const
Definition HTTPRequest.h:82
AWS_WAFV2_API HTTPRequest()=default
const Aws::String & GetClientIP() const
Definition HTTPRequest.h:54
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue