AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CustomResponse.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/CustomHTTPHeader.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
39 {
40 public:
41 AWS_WAFV2_API CustomResponse();
44 AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
54 inline int GetResponseCode() const{ return m_responseCode; }
55 inline bool ResponseCodeHasBeenSet() const { return m_responseCodeHasBeenSet; }
56 inline void SetResponseCode(int value) { m_responseCodeHasBeenSet = true; m_responseCode = value; }
57 inline CustomResponse& WithResponseCode(int value) { SetResponseCode(value); return *this;}
59
61
70 inline const Aws::String& GetCustomResponseBodyKey() const{ return m_customResponseBodyKey; }
71 inline bool CustomResponseBodyKeyHasBeenSet() const { return m_customResponseBodyKeyHasBeenSet; }
72 inline void SetCustomResponseBodyKey(const Aws::String& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = value; }
73 inline void SetCustomResponseBodyKey(Aws::String&& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = std::move(value); }
74 inline void SetCustomResponseBodyKey(const char* value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey.assign(value); }
76 inline CustomResponse& WithCustomResponseBodyKey(Aws::String&& value) { SetCustomResponseBodyKey(std::move(value)); return *this;}
77 inline CustomResponse& WithCustomResponseBodyKey(const char* value) { SetCustomResponseBodyKey(value); return *this;}
79
81
89 inline const Aws::Vector<CustomHTTPHeader>& GetResponseHeaders() const{ return m_responseHeaders; }
90 inline bool ResponseHeadersHasBeenSet() const { return m_responseHeadersHasBeenSet; }
91 inline void SetResponseHeaders(const Aws::Vector<CustomHTTPHeader>& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders = value; }
92 inline void SetResponseHeaders(Aws::Vector<CustomHTTPHeader>&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders = std::move(value); }
94 inline CustomResponse& WithResponseHeaders(Aws::Vector<CustomHTTPHeader>&& value) { SetResponseHeaders(std::move(value)); return *this;}
95 inline CustomResponse& AddResponseHeaders(const CustomHTTPHeader& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(value); return *this; }
96 inline CustomResponse& AddResponseHeaders(CustomHTTPHeader&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(std::move(value)); return *this; }
98 private:
99
100 int m_responseCode;
101 bool m_responseCodeHasBeenSet = false;
102
103 Aws::String m_customResponseBodyKey;
104 bool m_customResponseBodyKeyHasBeenSet = false;
105
106 Aws::Vector<CustomHTTPHeader> m_responseHeaders;
107 bool m_responseHeadersHasBeenSet = false;
108 };
109
110} // namespace Model
111} // namespace WAFV2
112} // namespace Aws
CustomResponse & AddResponseHeaders(const CustomHTTPHeader &value)
const Aws::String & GetCustomResponseBodyKey() const
CustomResponse & WithResponseHeaders(const Aws::Vector< CustomHTTPHeader > &value)
CustomResponse & WithCustomResponseBodyKey(const char *value)
void SetCustomResponseBodyKey(const Aws::String &value)
void SetCustomResponseBodyKey(const char *value)
void SetResponseHeaders(const Aws::Vector< CustomHTTPHeader > &value)
CustomResponse & WithCustomResponseBodyKey(Aws::String &&value)
const Aws::Vector< CustomHTTPHeader > & GetResponseHeaders() const
void SetResponseHeaders(Aws::Vector< CustomHTTPHeader > &&value)
CustomResponse & WithResponseHeaders(Aws::Vector< CustomHTTPHeader > &&value)
CustomResponse & WithCustomResponseBodyKey(const Aws::String &value)
AWS_WAFV2_API CustomResponse & operator=(Aws::Utils::Json::JsonView jsonValue)
CustomResponse & AddResponseHeaders(CustomHTTPHeader &&value)
void SetCustomResponseBodyKey(Aws::String &&value)
CustomResponse & WithResponseCode(int value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_WAFV2_API CustomResponse(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue