AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Cors.h
1
6#pragma once
7#include <aws/apigatewayv2/ApiGatewayV2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace ApiGatewayV2
23{
24namespace Model
25{
26
34 class Cors
35 {
36 public:
37 AWS_APIGATEWAYV2_API Cors();
38 AWS_APIGATEWAYV2_API Cors(Aws::Utils::Json::JsonView jsonValue);
39 AWS_APIGATEWAYV2_API Cors& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_APIGATEWAYV2_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
48 inline bool GetAllowCredentials() const{ return m_allowCredentials; }
49 inline bool AllowCredentialsHasBeenSet() const { return m_allowCredentialsHasBeenSet; }
50 inline void SetAllowCredentials(bool value) { m_allowCredentialsHasBeenSet = true; m_allowCredentials = value; }
51 inline Cors& WithAllowCredentials(bool value) { SetAllowCredentials(value); return *this;}
53
55
58 inline const Aws::Vector<Aws::String>& GetAllowHeaders() const{ return m_allowHeaders; }
59 inline bool AllowHeadersHasBeenSet() const { return m_allowHeadersHasBeenSet; }
60 inline void SetAllowHeaders(const Aws::Vector<Aws::String>& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = value; }
61 inline void SetAllowHeaders(Aws::Vector<Aws::String>&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = std::move(value); }
62 inline Cors& WithAllowHeaders(const Aws::Vector<Aws::String>& value) { SetAllowHeaders(value); return *this;}
63 inline Cors& WithAllowHeaders(Aws::Vector<Aws::String>&& value) { SetAllowHeaders(std::move(value)); return *this;}
64 inline Cors& AddAllowHeaders(const Aws::String& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
65 inline Cors& AddAllowHeaders(Aws::String&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(std::move(value)); return *this; }
66 inline Cors& AddAllowHeaders(const char* value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
68
70
74 inline const Aws::Vector<Aws::String>& GetAllowMethods() const{ return m_allowMethods; }
75 inline bool AllowMethodsHasBeenSet() const { return m_allowMethodsHasBeenSet; }
76 inline void SetAllowMethods(const Aws::Vector<Aws::String>& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = value; }
77 inline void SetAllowMethods(Aws::Vector<Aws::String>&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = std::move(value); }
78 inline Cors& WithAllowMethods(const Aws::Vector<Aws::String>& value) { SetAllowMethods(value); return *this;}
79 inline Cors& WithAllowMethods(Aws::Vector<Aws::String>&& value) { SetAllowMethods(std::move(value)); return *this;}
80 inline Cors& AddAllowMethods(const Aws::String& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
81 inline Cors& AddAllowMethods(Aws::String&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(std::move(value)); return *this; }
82 inline Cors& AddAllowMethods(const char* value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
84
86
89 inline const Aws::Vector<Aws::String>& GetAllowOrigins() const{ return m_allowOrigins; }
90 inline bool AllowOriginsHasBeenSet() const { return m_allowOriginsHasBeenSet; }
91 inline void SetAllowOrigins(const Aws::Vector<Aws::String>& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = value; }
92 inline void SetAllowOrigins(Aws::Vector<Aws::String>&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = std::move(value); }
93 inline Cors& WithAllowOrigins(const Aws::Vector<Aws::String>& value) { SetAllowOrigins(value); return *this;}
94 inline Cors& WithAllowOrigins(Aws::Vector<Aws::String>&& value) { SetAllowOrigins(std::move(value)); return *this;}
95 inline Cors& AddAllowOrigins(const Aws::String& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
96 inline Cors& AddAllowOrigins(Aws::String&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(std::move(value)); return *this; }
97 inline Cors& AddAllowOrigins(const char* value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
99
101
104 inline const Aws::Vector<Aws::String>& GetExposeHeaders() const{ return m_exposeHeaders; }
105 inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; }
106 inline void SetExposeHeaders(const Aws::Vector<Aws::String>& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = value; }
107 inline void SetExposeHeaders(Aws::Vector<Aws::String>&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = std::move(value); }
108 inline Cors& WithExposeHeaders(const Aws::Vector<Aws::String>& value) { SetExposeHeaders(value); return *this;}
109 inline Cors& WithExposeHeaders(Aws::Vector<Aws::String>&& value) { SetExposeHeaders(std::move(value)); return *this;}
110 inline Cors& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
111 inline Cors& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; }
112 inline Cors& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
114
116
120 inline int GetMaxAge() const{ return m_maxAge; }
121 inline bool MaxAgeHasBeenSet() const { return m_maxAgeHasBeenSet; }
122 inline void SetMaxAge(int value) { m_maxAgeHasBeenSet = true; m_maxAge = value; }
123 inline Cors& WithMaxAge(int value) { SetMaxAge(value); return *this;}
125 private:
126
127 bool m_allowCredentials;
128 bool m_allowCredentialsHasBeenSet = false;
129
130 Aws::Vector<Aws::String> m_allowHeaders;
131 bool m_allowHeadersHasBeenSet = false;
132
133 Aws::Vector<Aws::String> m_allowMethods;
134 bool m_allowMethodsHasBeenSet = false;
135
136 Aws::Vector<Aws::String> m_allowOrigins;
137 bool m_allowOriginsHasBeenSet = false;
138
139 Aws::Vector<Aws::String> m_exposeHeaders;
140 bool m_exposeHeadersHasBeenSet = false;
141
142 int m_maxAge;
143 bool m_maxAgeHasBeenSet = false;
144 };
145
146} // namespace Model
147} // namespace ApiGatewayV2
148} // namespace Aws
Cors & WithAllowMethods(Aws::Vector< Aws::String > &&value)
Definition Cors.h:79
Cors & AddAllowHeaders(const Aws::String &value)
Definition Cors.h:64
AWS_APIGATEWAYV2_API Cors & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetAllowCredentials(bool value)
Definition Cors.h:50
Cors & WithAllowHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:62
AWS_APIGATEWAYV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_APIGATEWAYV2_API Cors(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetAllowMethods() const
Definition Cors.h:74
bool MaxAgeHasBeenSet() const
Definition Cors.h:121
Cors & AddAllowOrigins(Aws::String &&value)
Definition Cors.h:96
void SetExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:107
bool AllowCredentialsHasBeenSet() const
Definition Cors.h:49
const Aws::Vector< Aws::String > & GetExposeHeaders() const
Definition Cors.h:104
Cors & AddAllowMethods(Aws::String &&value)
Definition Cors.h:81
const Aws::Vector< Aws::String > & GetAllowOrigins() const
Definition Cors.h:89
bool ExposeHeadersHasBeenSet() const
Definition Cors.h:105
Cors & WithAllowHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:63
bool AllowOriginsHasBeenSet() const
Definition Cors.h:90
void SetAllowHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:60
Cors & WithExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:108
void SetMaxAge(int value)
Definition Cors.h:122
void SetAllowMethods(const Aws::Vector< Aws::String > &value)
Definition Cors.h:76
void SetAllowOrigins(Aws::Vector< Aws::String > &&value)
Definition Cors.h:92
void SetAllowHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:61
Cors & AddExposeHeaders(const Aws::String &value)
Definition Cors.h:110
Cors & WithAllowMethods(const Aws::Vector< Aws::String > &value)
Definition Cors.h:78
bool GetAllowCredentials() const
Definition Cors.h:48
void SetAllowOrigins(const Aws::Vector< Aws::String > &value)
Definition Cors.h:91
Cors & AddAllowMethods(const char *value)
Definition Cors.h:82
Cors & AddAllowHeaders(Aws::String &&value)
Definition Cors.h:65
AWS_APIGATEWAYV2_API Cors()
bool AllowMethodsHasBeenSet() const
Definition Cors.h:75
Cors & AddAllowOrigins(const Aws::String &value)
Definition Cors.h:95
void SetExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:106
Cors & AddAllowHeaders(const char *value)
Definition Cors.h:66
Cors & AddExposeHeaders(Aws::String &&value)
Definition Cors.h:111
void SetAllowMethods(Aws::Vector< Aws::String > &&value)
Definition Cors.h:77
Cors & WithAllowOrigins(const Aws::Vector< Aws::String > &value)
Definition Cors.h:93
Cors & AddAllowOrigins(const char *value)
Definition Cors.h:97
Cors & WithExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:109
Cors & WithMaxAge(int value)
Definition Cors.h:123
Cors & WithAllowCredentials(bool value)
Definition Cors.h:51
Cors & WithAllowOrigins(Aws::Vector< Aws::String > &&value)
Definition Cors.h:94
bool AllowHeadersHasBeenSet() const
Definition Cors.h:59
const Aws::Vector< Aws::String > & GetAllowHeaders() const
Definition Cors.h:58
Cors & AddExposeHeaders(const char *value)
Definition Cors.h:112
Cors & AddAllowMethods(const Aws::String &value)
Definition Cors.h:80
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue