AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AwsCorsConfiguration.h
1
6#pragma once
7#include <aws/securityhub/SecurityHub_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 SecurityHub
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_SECURITYHUB_API AwsCorsConfiguration();
37 AWS_SECURITYHUB_API AwsCorsConfiguration(Aws::Utils::Json::JsonView jsonValue);
39 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Aws::Vector<Aws::String>& GetAllowOrigins() const{ return m_allowOrigins; }
47 inline bool AllowOriginsHasBeenSet() const { return m_allowOriginsHasBeenSet; }
48 inline void SetAllowOrigins(const Aws::Vector<Aws::String>& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = value; }
49 inline void SetAllowOrigins(Aws::Vector<Aws::String>&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins = std::move(value); }
51 inline AwsCorsConfiguration& WithAllowOrigins(Aws::Vector<Aws::String>&& value) { SetAllowOrigins(std::move(value)); return *this;}
52 inline AwsCorsConfiguration& AddAllowOrigins(const Aws::String& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
53 inline AwsCorsConfiguration& AddAllowOrigins(Aws::String&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(std::move(value)); return *this; }
54 inline AwsCorsConfiguration& AddAllowOrigins(const char* value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; }
56
58
61 inline bool GetAllowCredentials() const{ return m_allowCredentials; }
62 inline bool AllowCredentialsHasBeenSet() const { return m_allowCredentialsHasBeenSet; }
63 inline void SetAllowCredentials(bool value) { m_allowCredentialsHasBeenSet = true; m_allowCredentials = value; }
64 inline AwsCorsConfiguration& WithAllowCredentials(bool value) { SetAllowCredentials(value); return *this;}
66
68
71 inline const Aws::Vector<Aws::String>& GetExposeHeaders() const{ return m_exposeHeaders; }
72 inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; }
73 inline void SetExposeHeaders(const Aws::Vector<Aws::String>& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = value; }
74 inline void SetExposeHeaders(Aws::Vector<Aws::String>&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = std::move(value); }
76 inline AwsCorsConfiguration& WithExposeHeaders(Aws::Vector<Aws::String>&& value) { SetExposeHeaders(std::move(value)); return *this;}
77 inline AwsCorsConfiguration& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
78 inline AwsCorsConfiguration& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; }
79 inline AwsCorsConfiguration& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
81
83
87 inline int GetMaxAge() const{ return m_maxAge; }
88 inline bool MaxAgeHasBeenSet() const { return m_maxAgeHasBeenSet; }
89 inline void SetMaxAge(int value) { m_maxAgeHasBeenSet = true; m_maxAge = value; }
90 inline AwsCorsConfiguration& WithMaxAge(int value) { SetMaxAge(value); return *this;}
92
94
97 inline const Aws::Vector<Aws::String>& GetAllowMethods() const{ return m_allowMethods; }
98 inline bool AllowMethodsHasBeenSet() const { return m_allowMethodsHasBeenSet; }
99 inline void SetAllowMethods(const Aws::Vector<Aws::String>& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = value; }
100 inline void SetAllowMethods(Aws::Vector<Aws::String>&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods = std::move(value); }
102 inline AwsCorsConfiguration& WithAllowMethods(Aws::Vector<Aws::String>&& value) { SetAllowMethods(std::move(value)); return *this;}
103 inline AwsCorsConfiguration& AddAllowMethods(const Aws::String& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
104 inline AwsCorsConfiguration& AddAllowMethods(Aws::String&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(std::move(value)); return *this; }
105 inline AwsCorsConfiguration& AddAllowMethods(const char* value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; }
107
109
112 inline const Aws::Vector<Aws::String>& GetAllowHeaders() const{ return m_allowHeaders; }
113 inline bool AllowHeadersHasBeenSet() const { return m_allowHeadersHasBeenSet; }
114 inline void SetAllowHeaders(const Aws::Vector<Aws::String>& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = value; }
115 inline void SetAllowHeaders(Aws::Vector<Aws::String>&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders = std::move(value); }
117 inline AwsCorsConfiguration& WithAllowHeaders(Aws::Vector<Aws::String>&& value) { SetAllowHeaders(std::move(value)); return *this;}
118 inline AwsCorsConfiguration& AddAllowHeaders(const Aws::String& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
119 inline AwsCorsConfiguration& AddAllowHeaders(Aws::String&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(std::move(value)); return *this; }
120 inline AwsCorsConfiguration& AddAllowHeaders(const char* value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; }
122 private:
123
124 Aws::Vector<Aws::String> m_allowOrigins;
125 bool m_allowOriginsHasBeenSet = false;
126
127 bool m_allowCredentials;
128 bool m_allowCredentialsHasBeenSet = false;
129
130 Aws::Vector<Aws::String> m_exposeHeaders;
131 bool m_exposeHeadersHasBeenSet = false;
132
133 int m_maxAge;
134 bool m_maxAgeHasBeenSet = false;
135
136 Aws::Vector<Aws::String> m_allowMethods;
137 bool m_allowMethodsHasBeenSet = false;
138
139 Aws::Vector<Aws::String> m_allowHeaders;
140 bool m_allowHeadersHasBeenSet = false;
141 };
142
143} // namespace Model
144} // namespace SecurityHub
145} // namespace Aws
AWS_SECURITYHUB_API AwsCorsConfiguration(Aws::Utils::Json::JsonView jsonValue)
AwsCorsConfiguration & WithAllowMethods(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & AddAllowOrigins(const char *value)
AwsCorsConfiguration & WithAllowOrigins(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetAllowMethods() const
void SetAllowHeaders(Aws::Vector< Aws::String > &&value)
void SetAllowOrigins(const Aws::Vector< Aws::String > &value)
AwsCorsConfiguration & AddAllowHeaders(const Aws::String &value)
const Aws::Vector< Aws::String > & GetExposeHeaders() const
AwsCorsConfiguration & WithAllowHeaders(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & AddExposeHeaders(Aws::String &&value)
AwsCorsConfiguration & AddAllowMethods(Aws::String &&value)
AwsCorsConfiguration & AddAllowOrigins(Aws::String &&value)
AWS_SECURITYHUB_API AwsCorsConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetAllowOrigins() const
AwsCorsConfiguration & WithMaxAge(int value)
void SetAllowHeaders(const Aws::Vector< Aws::String > &value)
void SetExposeHeaders(const Aws::Vector< Aws::String > &value)
AwsCorsConfiguration & AddExposeHeaders(const char *value)
AwsCorsConfiguration & WithAllowMethods(const Aws::Vector< Aws::String > &value)
AwsCorsConfiguration & WithExposeHeaders(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & WithExposeHeaders(const Aws::Vector< Aws::String > &value)
void SetAllowOrigins(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & AddAllowOrigins(const Aws::String &value)
AwsCorsConfiguration & WithAllowCredentials(bool value)
void SetAllowMethods(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & AddAllowHeaders(const char *value)
AwsCorsConfiguration & AddAllowMethods(const Aws::String &value)
AwsCorsConfiguration & AddAllowHeaders(Aws::String &&value)
AwsCorsConfiguration & WithAllowOrigins(Aws::Vector< Aws::String > &&value)
AwsCorsConfiguration & AddAllowMethods(const char *value)
AwsCorsConfiguration & WithAllowHeaders(const Aws::Vector< Aws::String > &value)
AwsCorsConfiguration & AddExposeHeaders(const Aws::String &value)
void SetAllowMethods(const Aws::Vector< Aws::String > &value)
void SetExposeHeaders(Aws::Vector< Aws::String > &&value)
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetAllowHeaders() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue