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/s3/S3_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Xml
17{
18 class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace S3
22{
23namespace Model
24{
25
33 {
34 public:
35 AWS_S3_API CORSRule();
36 AWS_S3_API CORSRule(const Aws::Utils::Xml::XmlNode& xmlNode);
37 AWS_S3_API CORSRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
40
41
43
47 inline const Aws::String& GetID() const{ return m_iD; }
48 inline bool IDHasBeenSet() const { return m_iDHasBeenSet; }
49 inline void SetID(const Aws::String& value) { m_iDHasBeenSet = true; m_iD = value; }
50 inline void SetID(Aws::String&& value) { m_iDHasBeenSet = true; m_iD = std::move(value); }
51 inline void SetID(const char* value) { m_iDHasBeenSet = true; m_iD.assign(value); }
52 inline CORSRule& WithID(const Aws::String& value) { SetID(value); return *this;}
53 inline CORSRule& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;}
54 inline CORSRule& WithID(const char* value) { SetID(value); return *this;}
56
58
64 inline const Aws::Vector<Aws::String>& GetAllowedHeaders() const{ return m_allowedHeaders; }
65 inline bool AllowedHeadersHasBeenSet() const { return m_allowedHeadersHasBeenSet; }
66 inline void SetAllowedHeaders(const Aws::Vector<Aws::String>& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders = value; }
67 inline void SetAllowedHeaders(Aws::Vector<Aws::String>&& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders = std::move(value); }
68 inline CORSRule& WithAllowedHeaders(const Aws::Vector<Aws::String>& value) { SetAllowedHeaders(value); return *this;}
69 inline CORSRule& WithAllowedHeaders(Aws::Vector<Aws::String>&& value) { SetAllowedHeaders(std::move(value)); return *this;}
70 inline CORSRule& AddAllowedHeaders(const Aws::String& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(value); return *this; }
71 inline CORSRule& AddAllowedHeaders(Aws::String&& value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(std::move(value)); return *this; }
72 inline CORSRule& AddAllowedHeaders(const char* value) { m_allowedHeadersHasBeenSet = true; m_allowedHeaders.push_back(value); return *this; }
74
76
81 inline const Aws::Vector<Aws::String>& GetAllowedMethods() const{ return m_allowedMethods; }
82 inline bool AllowedMethodsHasBeenSet() const { return m_allowedMethodsHasBeenSet; }
83 inline void SetAllowedMethods(const Aws::Vector<Aws::String>& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = value; }
84 inline void SetAllowedMethods(Aws::Vector<Aws::String>&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = std::move(value); }
85 inline CORSRule& WithAllowedMethods(const Aws::Vector<Aws::String>& value) { SetAllowedMethods(value); return *this;}
86 inline CORSRule& WithAllowedMethods(Aws::Vector<Aws::String>&& value) { SetAllowedMethods(std::move(value)); return *this;}
87 inline CORSRule& AddAllowedMethods(const Aws::String& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods.push_back(value); return *this; }
88 inline CORSRule& AddAllowedMethods(Aws::String&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods.push_back(std::move(value)); return *this; }
89 inline CORSRule& AddAllowedMethods(const char* value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods.push_back(value); return *this; }
91
93
97 inline const Aws::Vector<Aws::String>& GetAllowedOrigins() const{ return m_allowedOrigins; }
98 inline bool AllowedOriginsHasBeenSet() const { return m_allowedOriginsHasBeenSet; }
99 inline void SetAllowedOrigins(const Aws::Vector<Aws::String>& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins = value; }
100 inline void SetAllowedOrigins(Aws::Vector<Aws::String>&& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins = std::move(value); }
101 inline CORSRule& WithAllowedOrigins(const Aws::Vector<Aws::String>& value) { SetAllowedOrigins(value); return *this;}
102 inline CORSRule& WithAllowedOrigins(Aws::Vector<Aws::String>&& value) { SetAllowedOrigins(std::move(value)); return *this;}
103 inline CORSRule& AddAllowedOrigins(const Aws::String& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(value); return *this; }
104 inline CORSRule& AddAllowedOrigins(Aws::String&& value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(std::move(value)); return *this; }
105 inline CORSRule& AddAllowedOrigins(const char* value) { m_allowedOriginsHasBeenSet = true; m_allowedOrigins.push_back(value); return *this; }
107
109
114 inline const Aws::Vector<Aws::String>& GetExposeHeaders() const{ return m_exposeHeaders; }
115 inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; }
116 inline void SetExposeHeaders(const Aws::Vector<Aws::String>& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = value; }
117 inline void SetExposeHeaders(Aws::Vector<Aws::String>&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders = std::move(value); }
118 inline CORSRule& WithExposeHeaders(const Aws::Vector<Aws::String>& value) { SetExposeHeaders(value); return *this;}
119 inline CORSRule& WithExposeHeaders(Aws::Vector<Aws::String>&& value) { SetExposeHeaders(std::move(value)); return *this;}
120 inline CORSRule& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
121 inline CORSRule& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; }
122 inline CORSRule& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; }
124
126
130 inline int GetMaxAgeSeconds() const{ return m_maxAgeSeconds; }
131 inline bool MaxAgeSecondsHasBeenSet() const { return m_maxAgeSecondsHasBeenSet; }
132 inline void SetMaxAgeSeconds(int value) { m_maxAgeSecondsHasBeenSet = true; m_maxAgeSeconds = value; }
133 inline CORSRule& WithMaxAgeSeconds(int value) { SetMaxAgeSeconds(value); return *this;}
135 private:
136
137 Aws::String m_iD;
138 bool m_iDHasBeenSet = false;
139
140 Aws::Vector<Aws::String> m_allowedHeaders;
141 bool m_allowedHeadersHasBeenSet = false;
142
143 Aws::Vector<Aws::String> m_allowedMethods;
144 bool m_allowedMethodsHasBeenSet = false;
145
146 Aws::Vector<Aws::String> m_allowedOrigins;
147 bool m_allowedOriginsHasBeenSet = false;
148
149 Aws::Vector<Aws::String> m_exposeHeaders;
150 bool m_exposeHeadersHasBeenSet = false;
151
152 int m_maxAgeSeconds;
153 bool m_maxAgeSecondsHasBeenSet = false;
154 };
155
156} // namespace Model
157} // namespace S3
158} // namespace Aws
void SetID(const Aws::String &value)
Definition CORSRule.h:49
bool AllowedHeadersHasBeenSet() const
Definition CORSRule.h:65
CORSRule & WithAllowedMethods(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:85
CORSRule & AddAllowedOrigins(Aws::String &&value)
Definition CORSRule.h:104
AWS_S3_API CORSRule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetAllowedHeaders(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:67
CORSRule & WithID(const Aws::String &value)
Definition CORSRule.h:52
void SetExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:116
void SetID(const char *value)
Definition CORSRule.h:51
void SetAllowedOrigins(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:99
CORSRule & AddAllowedOrigins(const char *value)
Definition CORSRule.h:105
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
bool AllowedMethodsHasBeenSet() const
Definition CORSRule.h:82
const Aws::Vector< Aws::String > & GetAllowedHeaders() const
Definition CORSRule.h:64
CORSRule & WithAllowedHeaders(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:69
CORSRule & WithAllowedMethods(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:86
int GetMaxAgeSeconds() const
Definition CORSRule.h:130
bool MaxAgeSecondsHasBeenSet() const
Definition CORSRule.h:131
void SetAllowedHeaders(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:66
CORSRule & AddAllowedMethods(const char *value)
Definition CORSRule.h:89
void SetAllowedMethods(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:83
void SetExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:117
CORSRule & AddExposeHeaders(const char *value)
Definition CORSRule.h:122
CORSRule & WithAllowedHeaders(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:68
void SetID(Aws::String &&value)
Definition CORSRule.h:50
bool AllowedOriginsHasBeenSet() const
Definition CORSRule.h:98
AWS_S3_API CORSRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
CORSRule & AddAllowedHeaders(const char *value)
Definition CORSRule.h:72
bool ExposeHeadersHasBeenSet() const
Definition CORSRule.h:115
void SetAllowedOrigins(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:100
const Aws::String & GetID() const
Definition CORSRule.h:47
CORSRule & AddExposeHeaders(Aws::String &&value)
Definition CORSRule.h:121
const Aws::Vector< Aws::String > & GetAllowedOrigins() const
Definition CORSRule.h:97
CORSRule & AddAllowedMethods(Aws::String &&value)
Definition CORSRule.h:88
CORSRule & WithAllowedOrigins(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:101
const Aws::Vector< Aws::String > & GetExposeHeaders() const
Definition CORSRule.h:114
CORSRule & WithID(const char *value)
Definition CORSRule.h:54
CORSRule & WithID(Aws::String &&value)
Definition CORSRule.h:53
void SetAllowedMethods(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:84
const Aws::Vector< Aws::String > & GetAllowedMethods() const
Definition CORSRule.h:81
CORSRule & WithExposeHeaders(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:119
CORSRule & AddAllowedMethods(const Aws::String &value)
Definition CORSRule.h:87
void SetMaxAgeSeconds(int value)
Definition CORSRule.h:132
CORSRule & AddAllowedHeaders(const Aws::String &value)
Definition CORSRule.h:70
CORSRule & WithExposeHeaders(const Aws::Vector< Aws::String > &value)
Definition CORSRule.h:118
CORSRule & AddAllowedOrigins(const Aws::String &value)
Definition CORSRule.h:103
CORSRule & AddExposeHeaders(const Aws::String &value)
Definition CORSRule.h:120
CORSRule & WithAllowedOrigins(Aws::Vector< Aws::String > &&value)
Definition CORSRule.h:102
bool IDHasBeenSet() const
Definition CORSRule.h:48
CORSRule & AddAllowedHeaders(Aws::String &&value)
Definition CORSRule.h:71
CORSRule & WithMaxAgeSeconds(int value)
Definition CORSRule.h:133
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector