AWS SDK for C++  1.9.108
AWS SDK for C++
CustomResponse.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19  class JsonValue;
20  class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace WAFV2
24 {
25 namespace Model
26 {
27 
40  {
41  public:
46 
47 
56  inline int GetResponseCode() const{ return m_responseCode; }
57 
66  inline bool ResponseCodeHasBeenSet() const { return m_responseCodeHasBeenSet; }
67 
76  inline void SetResponseCode(int value) { m_responseCodeHasBeenSet = true; m_responseCode = value; }
77 
86  inline CustomResponse& WithResponseCode(int value) { SetResponseCode(value); return *this;}
87 
88 
98  inline const Aws::String& GetCustomResponseBodyKey() const{ return m_customResponseBodyKey; }
99 
109  inline bool CustomResponseBodyKeyHasBeenSet() const { return m_customResponseBodyKeyHasBeenSet; }
110 
120  inline void SetCustomResponseBodyKey(const Aws::String& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = value; }
121 
131  inline void SetCustomResponseBodyKey(Aws::String&& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = std::move(value); }
132 
142  inline void SetCustomResponseBodyKey(const char* value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey.assign(value); }
143 
153  inline CustomResponse& WithCustomResponseBodyKey(const Aws::String& value) { SetCustomResponseBodyKey(value); return *this;}
154 
164  inline CustomResponse& WithCustomResponseBodyKey(Aws::String&& value) { SetCustomResponseBodyKey(std::move(value)); return *this;}
165 
175  inline CustomResponse& WithCustomResponseBodyKey(const char* value) { SetCustomResponseBodyKey(value); return *this;}
176 
177 
187  inline const Aws::Vector<CustomHTTPHeader>& GetResponseHeaders() const{ return m_responseHeaders; }
188 
198  inline bool ResponseHeadersHasBeenSet() const { return m_responseHeadersHasBeenSet; }
199 
209  inline void SetResponseHeaders(const Aws::Vector<CustomHTTPHeader>& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders = value; }
210 
220  inline void SetResponseHeaders(Aws::Vector<CustomHTTPHeader>&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders = std::move(value); }
221 
231  inline CustomResponse& WithResponseHeaders(const Aws::Vector<CustomHTTPHeader>& value) { SetResponseHeaders(value); return *this;}
232 
242  inline CustomResponse& WithResponseHeaders(Aws::Vector<CustomHTTPHeader>&& value) { SetResponseHeaders(std::move(value)); return *this;}
243 
253  inline CustomResponse& AddResponseHeaders(const CustomHTTPHeader& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(value); return *this; }
254 
264  inline CustomResponse& AddResponseHeaders(CustomHTTPHeader&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(std::move(value)); return *this; }
265 
266  private:
267 
268  int m_responseCode;
269  bool m_responseCodeHasBeenSet;
270 
271  Aws::String m_customResponseBodyKey;
272  bool m_customResponseBodyKeyHasBeenSet;
273 
274  Aws::Vector<CustomHTTPHeader> m_responseHeaders;
275  bool m_responseHeadersHasBeenSet;
276  };
277 
278 } // namespace Model
279 } // namespace WAFV2
280 } // namespace Aws
Aws::WAFV2::Model::CustomResponse::WithCustomResponseBodyKey
CustomResponse & WithCustomResponseBodyKey(Aws::String &&value)
Definition: CustomResponse.h:164
Aws::WAFV2::Model::CustomResponse::ResponseHeadersHasBeenSet
bool ResponseHeadersHasBeenSet() const
Definition: CustomResponse.h:198
Aws::WAFV2::Model::CustomResponse::AddResponseHeaders
CustomResponse & AddResponseHeaders(CustomHTTPHeader &&value)
Definition: CustomResponse.h:264
CustomHTTPHeader.h
Aws::WAFV2::Model::CustomResponse::GetCustomResponseBodyKey
const Aws::String & GetCustomResponseBodyKey() const
Definition: CustomResponse.h:98
Aws::WAFV2::Model::CustomResponse::SetResponseHeaders
void SetResponseHeaders(const Aws::Vector< CustomHTTPHeader > &value)
Definition: CustomResponse.h:209
Aws::WAFV2::Model::CustomResponse::WithCustomResponseBodyKey
CustomResponse & WithCustomResponseBodyKey(const char *value)
Definition: CustomResponse.h:175
Aws::WAFV2::Model::CustomResponse::WithResponseHeaders
CustomResponse & WithResponseHeaders(Aws::Vector< CustomHTTPHeader > &&value)
Definition: CustomResponse.h:242
Aws::WAFV2::Model::CustomResponse::GetResponseHeaders
const Aws::Vector< CustomHTTPHeader > & GetResponseHeaders() const
Definition: CustomResponse.h:187
Aws::WAFV2::Model::CustomResponse::GetResponseCode
int GetResponseCode() const
Definition: CustomResponse.h:56
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWS_WAFV2_API
#define AWS_WAFV2_API
Definition: WAFV2_EXPORTS.h:28
Aws::WAFV2::Model::CustomResponse::SetCustomResponseBodyKey
void SetCustomResponseBodyKey(Aws::String &&value)
Definition: CustomResponse.h:131
AWSVector.h
Aws::WAFV2::Model::CustomResponse::CustomResponse
CustomResponse()
WAFV2_EXPORTS.h
Aws::WAFV2::Model::CustomResponse::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::WAFV2::Model::CustomResponse::WithCustomResponseBodyKey
CustomResponse & WithCustomResponseBodyKey(const Aws::String &value)
Definition: CustomResponse.h:153
Aws::WAFV2::Model::CustomResponse::WithResponseHeaders
CustomResponse & WithResponseHeaders(const Aws::Vector< CustomHTTPHeader > &value)
Definition: CustomResponse.h:231
Aws::WAFV2::Model::CustomResponse::operator=
CustomResponse & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
Aws::WAFV2::Model::CustomResponse::CustomResponse
CustomResponse(Aws::Utils::Json::JsonView jsonValue)
AWSString.h
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::WAFV2::Model::CustomResponse::SetResponseHeaders
void SetResponseHeaders(Aws::Vector< CustomHTTPHeader > &&value)
Definition: CustomResponse.h:220
Aws::WAFV2::Model::CustomResponse::CustomResponseBodyKeyHasBeenSet
bool CustomResponseBodyKeyHasBeenSet() const
Definition: CustomResponse.h:109
Aws::WAFV2::Model::CustomResponse::WithResponseCode
CustomResponse & WithResponseCode(int value)
Definition: CustomResponse.h:86
Aws::WAFV2::Model::CustomResponse
Definition: CustomResponse.h:40
Aws::WAFV2::Model::CustomHTTPHeader
Definition: CustomHTTPHeader.h:34
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAFV2::Model::CustomResponse::SetCustomResponseBodyKey
void SetCustomResponseBodyKey(const char *value)
Definition: CustomResponse.h:142
Aws::WAFV2::Model::CustomResponse::ResponseCodeHasBeenSet
bool ResponseCodeHasBeenSet() const
Definition: CustomResponse.h:66
Aws::WAFV2::Model::CustomResponse::SetCustomResponseBodyKey
void SetCustomResponseBodyKey(const Aws::String &value)
Definition: CustomResponse.h:120
Aws::WAFV2::Model::CustomResponse::SetResponseCode
void SetResponseCode(int value)
Definition: CustomResponse.h:76
Aws::WAFV2::Model::CustomResponse::AddResponseHeaders
CustomResponse & AddResponseHeaders(const CustomHTTPHeader &value)
Definition: CustomResponse.h:253