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/lambda/Lambda_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 Lambda
23{
24namespace Model
25{
26
37 class Cors
38 {
39 public:
40 AWS_LAMBDA_API Cors();
41 AWS_LAMBDA_API Cors(Aws::Utils::Json::JsonView jsonValue);
42 AWS_LAMBDA_API Cors& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_LAMBDA_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
51 inline bool GetAllowCredentials() const{ return m_allowCredentials; }
52 inline bool AllowCredentialsHasBeenSet() const { return m_allowCredentialsHasBeenSet; }
53 inline void SetAllowCredentials(bool value) { m_allowCredentialsHasBeenSet = true; m_allowCredentials = value; }
54 inline Cors& WithAllowCredentials(bool value) { SetAllowCredentials(value); return *this;}
56
58
63 inline const Aws::Vector<Aws::String>& GetAllowHeaders() const{ return m_allowHeaders; }
64 inline bool AllowHeadersHasBeenSet() const { return m_allowHeadersHasBeenSet; }
65 inline void SetAllowHeaders(const Aws::Vector<Aws::String>& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = value; }
66 inline void SetAllowHeaders(Aws::Vector<Aws::String>&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = std::move(value); }
67 inline Cors& WithAllowHeaders(const Aws::Vector<Aws::String>& value) { SetAllowHeaders(value); return *this;}
68 inline Cors& WithAllowHeaders(Aws::Vector<Aws::String>&& value) { SetAllowHeaders(std::move(value)); return *this;}
69 inline Cors& AddAllowHeaders(const Aws::String& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
70 inline Cors& AddAllowHeaders(Aws::String&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(std::move(value)); return *this; }
71 inline Cors& AddAllowHeaders(const char* value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
73
75
80 inline const Aws::Vector<Aws::String>& GetAllowMethods() const{ return m_allowMethods; }
81 inline bool AllowMethodsHasBeenSet() const { return m_allowMethodsHasBeenSet; }
82 inline void SetAllowMethods(const Aws::Vector<Aws::String>& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = value; }
83 inline void SetAllowMethods(Aws::Vector<Aws::String>&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = std::move(value); }
84 inline Cors& WithAllowMethods(const Aws::Vector<Aws::String>& value) { SetAllowMethods(value); return *this;}
85 inline Cors& WithAllowMethods(Aws::Vector<Aws::String>&& value) { SetAllowMethods(std::move(value)); return *this;}
86 inline Cors& AddAllowMethods(const Aws::String& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
87 inline Cors& AddAllowMethods(Aws::String&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(std::move(value)); return *this; }
88 inline Cors& AddAllowMethods(const char* value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
90
92
99 inline const Aws::Vector<Aws::String>& GetAllowOrigins() const{ return m_allowOrigins; }
100 inline bool AllowOriginsHasBeenSet() const { return m_allowOriginsHasBeenSet; }
101 inline void SetAllowOrigins(const Aws::Vector<Aws::String>& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = value; }
102 inline void SetAllowOrigins(Aws::Vector<Aws::String>&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = std::move(value); }
103 inline Cors& WithAllowOrigins(const Aws::Vector<Aws::String>& value) { SetAllowOrigins(value); return *this;}
104 inline Cors& WithAllowOrigins(Aws::Vector<Aws::String>&& value) { SetAllowOrigins(std::move(value)); return *this;}
105 inline Cors& AddAllowOrigins(const Aws::String& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
106 inline Cors& AddAllowOrigins(Aws::String&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(std::move(value)); return *this; }
107 inline Cors& AddAllowOrigins(const char* value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
109
111
116 inline const Aws::Vector<Aws::String>& GetExposeHeaders() const{ return m_exposeHeaders; }
117 inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; }
118 inline void SetExposeHeaders(const Aws::Vector<Aws::String>& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = value; }
119 inline void SetExposeHeaders(Aws::Vector<Aws::String>&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = std::move(value); }
120 inline Cors& WithExposeHeaders(const Aws::Vector<Aws::String>& value) { SetExposeHeaders(value); return *this;}
121 inline Cors& WithExposeHeaders(Aws::Vector<Aws::String>&& value) { SetExposeHeaders(std::move(value)); return *this;}
122 inline Cors& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
123 inline Cors& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; }
124 inline Cors& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
126
128
133 inline int GetMaxAge() const{ return m_maxAge; }
134 inline bool MaxAgeHasBeenSet() const { return m_maxAgeHasBeenSet; }
135 inline void SetMaxAge(int value) { m_maxAgeHasBeenSet = true; m_maxAge = value; }
136 inline Cors& WithMaxAge(int value) { SetMaxAge(value); return *this;}
138 private:
139
140 bool m_allowCredentials;
141 bool m_allowCredentialsHasBeenSet = false;
142
143 Aws::Vector<Aws::String> m_allowHeaders;
144 bool m_allowHeadersHasBeenSet = false;
145
146 Aws::Vector<Aws::String> m_allowMethods;
147 bool m_allowMethodsHasBeenSet = false;
148
149 Aws::Vector<Aws::String> m_allowOrigins;
150 bool m_allowOriginsHasBeenSet = false;
151
152 Aws::Vector<Aws::String> m_exposeHeaders;
153 bool m_exposeHeadersHasBeenSet = false;
154
155 int m_maxAge;
156 bool m_maxAgeHasBeenSet = false;
157 };
158
159} // namespace Model
160} // namespace Lambda
161} // namespace Aws
Cors & AddAllowOrigins(Aws::String &&value)
Definition Cors.h:106
Cors & WithAllowHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:68
const Aws::Vector< Aws::String > & GetAllowMethods() const
Definition Cors.h:80
Cors & WithAllowHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:67
bool ExposeHeadersHasBeenSet() const
Definition Cors.h:117
Cors & WithExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:121
void SetExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:119
Cors & AddAllowHeaders(const Aws::String &value)
Definition Cors.h:69
AWS_LAMBDA_API Aws::Utils::Json::JsonValue Jsonize() const
int GetMaxAge() const
Definition Cors.h:133
bool AllowMethodsHasBeenSet() const
Definition Cors.h:81
Cors & WithAllowOrigins(Aws::Vector< Aws::String > &&value)
Definition Cors.h:104
const Aws::Vector< Aws::String > & GetExposeHeaders() const
Definition Cors.h:116
void SetExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:118
void SetAllowHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:65
Cors & WithAllowOrigins(const Aws::Vector< Aws::String > &value)
Definition Cors.h:103
bool AllowOriginsHasBeenSet() const
Definition Cors.h:100
void SetAllowMethods(const Aws::Vector< Aws::String > &value)
Definition Cors.h:82
Cors & AddAllowMethods(const Aws::String &value)
Definition Cors.h:86
const Aws::Vector< Aws::String > & GetAllowHeaders() const
Definition Cors.h:63
AWS_LAMBDA_API Cors & operator=(Aws::Utils::Json::JsonView jsonValue)
Cors & AddExposeHeaders(const char *value)
Definition Cors.h:124
void SetAllowOrigins(Aws::Vector< Aws::String > &&value)
Definition Cors.h:102
void SetAllowCredentials(bool value)
Definition Cors.h:53
Cors & AddAllowHeaders(Aws::String &&value)
Definition Cors.h:70
const Aws::Vector< Aws::String > & GetAllowOrigins() const
Definition Cors.h:99
Cors & WithAllowMethods(const Aws::Vector< Aws::String > &value)
Definition Cors.h:84
bool GetAllowCredentials() const
Definition Cors.h:51
bool AllowHeadersHasBeenSet() const
Definition Cors.h:64
Cors & AddAllowOrigins(const Aws::String &value)
Definition Cors.h:105
Cors & AddExposeHeaders(Aws::String &&value)
Definition Cors.h:123
void SetMaxAge(int value)
Definition Cors.h:135
Cors & AddAllowMethods(const char *value)
Definition Cors.h:88
Cors & AddExposeHeaders(const Aws::String &value)
Definition Cors.h:122
bool MaxAgeHasBeenSet() const
Definition Cors.h:134
Cors & AddAllowHeaders(const char *value)
Definition Cors.h:71
Cors & WithMaxAge(int value)
Definition Cors.h:136
void SetAllowMethods(Aws::Vector< Aws::String > &&value)
Definition Cors.h:83
Cors & WithAllowCredentials(bool value)
Definition Cors.h:54
void SetAllowOrigins(const Aws::Vector< Aws::String > &value)
Definition Cors.h:101
Cors & WithAllowMethods(Aws::Vector< Aws::String > &&value)
Definition Cors.h:85
Cors & WithExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition Cors.h:120
void SetAllowHeaders(Aws::Vector< Aws::String > &&value)
Definition Cors.h:66
Cors & AddAllowMethods(Aws::String &&value)
Definition Cors.h:87
bool AllowCredentialsHasBeenSet() const
Definition Cors.h:52
AWS_LAMBDA_API Cors()
Cors & AddAllowOrigins(const char *value)
Definition Cors.h:107
AWS_LAMBDA_API Cors(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