AWS SDK for C++

AWS SDK for C++ Version 1.11.932

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/wafv2/WAFV2_EXPORTS.h>
10#include <aws/wafv2/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 WAFV2 {
22namespace Model {
23
33 public:
34 AWS_WAFV2_API HTTPRequest() = default;
35 AWS_WAFV2_API HTTPRequest(Aws::Utils::Json::JsonView jsonValue);
37 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
48 inline const Aws::String& GetClientIP() const { return m_clientIP; }
49 inline bool ClientIPHasBeenSet() const { return m_clientIPHasBeenSet; }
50 template <typename ClientIPT = Aws::String>
51 void SetClientIP(ClientIPT&& value) {
52 m_clientIPHasBeenSet = true;
53 m_clientIP = std::forward<ClientIPT>(value);
54 }
55 template <typename ClientIPT = Aws::String>
56 HTTPRequest& WithClientIP(ClientIPT&& value) {
57 SetClientIP(std::forward<ClientIPT>(value));
58 return *this;
59 }
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) {
73 m_countryHasBeenSet = true;
74 m_country = std::forward<CountryT>(value);
75 }
76 template <typename CountryT = Aws::String>
77 HTTPRequest& WithCountry(CountryT&& value) {
78 SetCountry(std::forward<CountryT>(value));
79 return *this;
80 }
82
84
88 inline const Aws::String& GetURI() const { return m_uRI; }
89 inline bool URIHasBeenSet() const { return m_uRIHasBeenSet; }
90 template <typename URIT = Aws::String>
91 void SetURI(URIT&& value) {
92 m_uRIHasBeenSet = true;
93 m_uRI = std::forward<URIT>(value);
94 }
95 template <typename URIT = Aws::String>
96 HTTPRequest& WithURI(URIT&& value) {
97 SetURI(std::forward<URIT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::String& GetMethod() const { return m_method; }
107 inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; }
108 template <typename MethodT = Aws::String>
109 void SetMethod(MethodT&& value) {
110 m_methodHasBeenSet = true;
111 m_method = std::forward<MethodT>(value);
112 }
113 template <typename MethodT = Aws::String>
114 HTTPRequest& WithMethod(MethodT&& value) {
115 SetMethod(std::forward<MethodT>(value));
116 return *this;
117 }
119
121
125 inline const Aws::String& GetHTTPVersion() const { return m_hTTPVersion; }
126 inline bool HTTPVersionHasBeenSet() const { return m_hTTPVersionHasBeenSet; }
127 template <typename HTTPVersionT = Aws::String>
128 void SetHTTPVersion(HTTPVersionT&& value) {
129 m_hTTPVersionHasBeenSet = true;
130 m_hTTPVersion = std::forward<HTTPVersionT>(value);
131 }
132 template <typename HTTPVersionT = Aws::String>
133 HTTPRequest& WithHTTPVersion(HTTPVersionT&& value) {
134 SetHTTPVersion(std::forward<HTTPVersionT>(value));
135 return *this;
136 }
138
140
144 inline const Aws::Vector<HTTPHeader>& GetHeaders() const { return m_headers; }
145 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
146 template <typename HeadersT = Aws::Vector<HTTPHeader>>
147 void SetHeaders(HeadersT&& value) {
148 m_headersHasBeenSet = true;
149 m_headers = std::forward<HeadersT>(value);
150 }
151 template <typename HeadersT = Aws::Vector<HTTPHeader>>
152 HTTPRequest& WithHeaders(HeadersT&& value) {
153 SetHeaders(std::forward<HeadersT>(value));
154 return *this;
155 }
156 template <typename HeadersT = HTTPHeader>
157 HTTPRequest& AddHeaders(HeadersT&& value) {
158 m_headersHasBeenSet = true;
159 m_headers.emplace_back(std::forward<HeadersT>(value));
160 return *this;
161 }
163 private:
164 Aws::String m_clientIP;
165
166 Aws::String m_country;
167
168 Aws::String m_uRI;
169
170 Aws::String m_method;
171
172 Aws::String m_hTTPVersion;
173
174 Aws::Vector<HTTPHeader> m_headers;
175 bool m_clientIPHasBeenSet = false;
176 bool m_countryHasBeenSet = false;
177 bool m_uRIHasBeenSet = false;
178 bool m_methodHasBeenSet = false;
179 bool m_hTTPVersionHasBeenSet = false;
180 bool m_headersHasBeenSet = false;
181};
182
183} // namespace Model
184} // namespace WAFV2
185} // namespace Aws
HTTPRequest & AddHeaders(HeadersT &&value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
HTTPRequest & WithClientIP(ClientIPT &&value)
Definition HTTPRequest.h:56
void SetClientIP(ClientIPT &&value)
Definition HTTPRequest.h:51
HTTPRequest & WithCountry(CountryT &&value)
Definition HTTPRequest.h:77
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:96
HTTPRequest & WithMethod(MethodT &&value)
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
void SetMethod(MethodT &&value)
const Aws::String & GetCountry() const
Definition HTTPRequest.h:69
HTTPRequest & WithHeaders(HeadersT &&value)
void SetURI(URIT &&value)
Definition HTTPRequest.h:91
const Aws::String & GetURI() const
Definition HTTPRequest.h:88
AWS_WAFV2_API HTTPRequest()=default
const Aws::String & GetClientIP() const
Definition HTTPRequest.h:48
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue