AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CorsRule.h
1
6#pragma once
7#include <aws/mediastore/MediaStore_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/mediastore/model/MethodName.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 MediaStore
24{
25namespace Model
26{
27
36 {
37 public:
38 AWS_MEDIASTORE_API CorsRule();
39 AWS_MEDIASTORE_API CorsRule(Aws::Utils::Json::JsonView jsonValue);
40 AWS_MEDIASTORE_API CorsRule& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_MEDIASTORE_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
54 inline const Aws::Vector<Aws::String>& GetAllowedOrigins() const{ return m_allowedOrigins; }
55 inline bool AllowedOriginsHasBeenSet() const { return m_allowedOriginsHasBeenSet; }
56 inline void SetAllowedOrigins(const Aws::Vector<Aws::String>& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins = value; }
57 inline void SetAllowedOrigins(Aws::Vector<Aws::String>&& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins = std::move(value); }
58 inline CorsRule& WithAllowedOrigins(const Aws::Vector<Aws::String>& value) { SetAllowedOrigins(value); return *this;}
59 inline CorsRule& WithAllowedOrigins(Aws::Vector<Aws::String>&& value) { SetAllowedOrigins(std::move(value)); return *this;}
60 inline CorsRule& AddAllowedOrigins(const Aws::String& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(value); return *this; }
61 inline CorsRule& AddAllowedOrigins(Aws::String&& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(std::move(value)); return *this; }
62 inline CorsRule& AddAllowedOrigins(const char* value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(value); return *this; }
64
66
71 inline const Aws::Vector<MethodName>& GetAllowedMethods() const{ return m_allowedMethods; }
72 inline bool AllowedMethodsHasBeenSet() const { return m_allowedMethodsHasBeenSet; }
73 inline void SetAllowedMethods(const Aws::Vector<MethodName>& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = value; }
74 inline void SetAllowedMethods(Aws::Vector<MethodName>&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = std::move(value); }
75 inline CorsRule& WithAllowedMethods(const Aws::Vector<MethodName>& value) { SetAllowedMethods(value); return *this;}
76 inline CorsRule& WithAllowedMethods(Aws::Vector<MethodName>&& value) { SetAllowedMethods(std::move(value)); return *this;}
77 inline CorsRule& AddAllowedMethods(const MethodName& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods.push_back(value); return *this; }
78 inline CorsRule& AddAllowedMethods(MethodName&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods.push_back(std::move(value)); return *this; }
80
82
90 inline const Aws::Vector<Aws::String>& GetAllowedHeaders() const{ return m_allowedHeaders; }
91 inline bool AllowedHeadersHasBeenSet() const { return m_allowedHeadersHasBeenSet; }
92 inline void SetAllowedHeaders(const Aws::Vector<Aws::String>& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders = value; }
93 inline void SetAllowedHeaders(Aws::Vector<Aws::String>&& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders = std::move(value); }
94 inline CorsRule& WithAllowedHeaders(const Aws::Vector<Aws::String>& value) { SetAllowedHeaders(value); return *this;}
95 inline CorsRule& WithAllowedHeaders(Aws::Vector<Aws::String>&& value) { SetAllowedHeaders(std::move(value)); return *this;}
96 inline CorsRule& AddAllowedHeaders(const Aws::String& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(value); return *this; }
97 inline CorsRule& AddAllowedHeaders(Aws::String&& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(std::move(value)); return *this; }
98 inline CorsRule& AddAllowedHeaders(const char* value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(value); return *this; }
100
102
107 inline int GetMaxAgeSeconds() const{ return m_maxAgeSeconds; }
108 inline bool MaxAgeSecondsHasBeenSet() const { return m_maxAgeSecondsHasBeenSet; }
109 inline void SetMaxAgeSeconds(int value) { m_maxAgeSecondsHasBeenSet = true; m_maxAgeSeconds = value; }
110 inline CorsRule& WithMaxAgeSeconds(int value) { SetMaxAgeSeconds(value); return *this;}
112
114
120 inline const Aws::Vector<Aws::String>& GetExposeHeaders() const{ return m_exposeHeaders; }
121 inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; }
122 inline void SetExposeHeaders(const Aws::Vector<Aws::String>& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = value; }
123 inline void SetExposeHeaders(Aws::Vector<Aws::String>&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = std::move(value); }
124 inline CorsRule& WithExposeHeaders(const Aws::Vector<Aws::String>& value) { SetExposeHeaders(value); return *this;}
125 inline CorsRule& WithExposeHeaders(Aws::Vector<Aws::String>&& value) { SetExposeHeaders(std::move(value)); return *this;}
126 inline CorsRule& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
127 inline CorsRule& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; }
128 inline CorsRule& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
130 private:
131
132 Aws::Vector<Aws::String> m_allowedOrigins;
133 bool m_allowedOriginsHasBeenSet = false;
134
135 Aws::Vector<MethodName> m_allowedMethods;
136 bool m_allowedMethodsHasBeenSet = false;
137
138 Aws::Vector<Aws::String> m_allowedHeaders;
139 bool m_allowedHeadersHasBeenSet = false;
140
141 int m_maxAgeSeconds;
142 bool m_maxAgeSecondsHasBeenSet = false;
143
144 Aws::Vector<Aws::String> m_exposeHeaders;
145 bool m_exposeHeadersHasBeenSet = false;
146 };
147
148} // namespace Model
149} // namespace MediaStore
150} // namespace Aws
CorsRule & AddAllowedOrigins(const char *value)
Definition CorsRule.h:62
bool AllowedHeadersHasBeenSet() const
Definition CorsRule.h:91
void SetAllowedMethods(const Aws::Vector< MethodName > &value)
Definition CorsRule.h:73
void SetAllowedOrigins(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:57
CorsRule & AddAllowedHeaders(Aws::String &&value)
Definition CorsRule.h:97
CorsRule & WithAllowedMethods(const Aws::Vector< MethodName > &value)
Definition CorsRule.h:75
CorsRule & AddAllowedOrigins(const Aws::String &value)
Definition CorsRule.h:60
void SetAllowedHeaders(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:92
CorsRule & AddAllowedMethods(MethodName &&value)
Definition CorsRule.h:78
CorsRule & WithAllowedOrigins(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:59
void SetAllowedMethods(Aws::Vector< MethodName > &&value)
Definition CorsRule.h:74
const Aws::Vector< Aws::String > & GetAllowedHeaders() const
Definition CorsRule.h:90
AWS_MEDIASTORE_API CorsRule()
CorsRule & AddExposeHeaders(const Aws::String &value)
Definition CorsRule.h:126
void SetExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:123
void SetMaxAgeSeconds(int value)
Definition CorsRule.h:109
CorsRule & WithAllowedHeaders(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:94
bool AllowedOriginsHasBeenSet() const
Definition CorsRule.h:55
CorsRule & AddAllowedHeaders(const char *value)
Definition CorsRule.h:98
CorsRule & WithAllowedOrigins(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:58
CorsRule & WithMaxAgeSeconds(int value)
Definition CorsRule.h:110
CorsRule & WithAllowedMethods(Aws::Vector< MethodName > &&value)
Definition CorsRule.h:76
void SetAllowedOrigins(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:56
CorsRule & AddAllowedHeaders(const Aws::String &value)
Definition CorsRule.h:96
void SetExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:122
CorsRule & WithExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:125
CorsRule & AddExposeHeaders(const char *value)
Definition CorsRule.h:128
CorsRule & WithExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition CorsRule.h:124
void SetAllowedHeaders(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:93
CorsRule & AddAllowedMethods(const MethodName &value)
Definition CorsRule.h:77
AWS_MEDIASTORE_API CorsRule & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetExposeHeaders() const
Definition CorsRule.h:120
AWS_MEDIASTORE_API CorsRule(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetAllowedOrigins() const
Definition CorsRule.h:54
CorsRule & AddExposeHeaders(Aws::String &&value)
Definition CorsRule.h:127
const Aws::Vector< MethodName > & GetAllowedMethods() const
Definition CorsRule.h:71
AWS_MEDIASTORE_API Aws::Utils::Json::JsonValue Jsonize() const
CorsRule & WithAllowedHeaders(Aws::Vector< Aws::String > &&value)
Definition CorsRule.h:95
CorsRule & AddAllowedOrigins(Aws::String &&value)
Definition CorsRule.h:61
bool AllowedMethodsHasBeenSet() const
Definition CorsRule.h:72
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue