AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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() = default;
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 template<typename CustomResponseBodyKeyT = Aws::String>
73 void SetCustomResponseBodyKey(CustomResponseBodyKeyT&& value) { m_customResponseBodyKeyHasBeenSet = true; m_customResponseBodyKey = std::forward<CustomResponseBodyKeyT>(value); }
74 template<typename CustomResponseBodyKeyT = Aws::String>
75 CustomResponse& WithCustomResponseBodyKey(CustomResponseBodyKeyT&& value) { SetCustomResponseBodyKey(std::forward<CustomResponseBodyKeyT>(value)); return *this;}
77
79
87 inline const Aws::Vector<CustomHTTPHeader>& GetResponseHeaders() const { return m_responseHeaders; }
88 inline bool ResponseHeadersHasBeenSet() const { return m_responseHeadersHasBeenSet; }
89 template<typename ResponseHeadersT = Aws::Vector<CustomHTTPHeader>>
90 void SetResponseHeaders(ResponseHeadersT&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders = std::forward<ResponseHeadersT>(value); }
91 template<typename ResponseHeadersT = Aws::Vector<CustomHTTPHeader>>
92 CustomResponse& WithResponseHeaders(ResponseHeadersT&& value) { SetResponseHeaders(std::forward<ResponseHeadersT>(value)); return *this;}
93 template<typename ResponseHeadersT = CustomHTTPHeader>
94 CustomResponse& AddResponseHeaders(ResponseHeadersT&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.emplace_back(std::forward<ResponseHeadersT>(value)); return *this; }
96 private:
97
98 int m_responseCode{0};
99 bool m_responseCodeHasBeenSet = false;
100
101 Aws::String m_customResponseBodyKey;
102 bool m_customResponseBodyKeyHasBeenSet = false;
103
104 Aws::Vector<CustomHTTPHeader> m_responseHeaders;
105 bool m_responseHeadersHasBeenSet = false;
106 };
107
108} // namespace Model
109} // namespace WAFV2
110} // namespace Aws
const Aws::String & GetCustomResponseBodyKey() const
void SetResponseHeaders(ResponseHeadersT &&value)
CustomResponse & WithResponseHeaders(ResponseHeadersT &&value)
const Aws::Vector< CustomHTTPHeader > & GetResponseHeaders() const
CustomResponse & WithCustomResponseBodyKey(CustomResponseBodyKeyT &&value)
AWS_WAFV2_API CustomResponse & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_WAFV2_API CustomResponse()=default
void SetCustomResponseBodyKey(CustomResponseBodyKeyT &&value)
CustomResponse & WithResponseCode(int value)
AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const
CustomResponse & AddResponseHeaders(ResponseHeadersT &&value)
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