AWS SDK for C++  1.8.71
AWS SDK for C++
PutBucketCorsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/s3/S3_EXPORTS.h>
8 #include <aws/s3/S3Request.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Http
17 {
18  class URI;
19 } //namespace Http
20 namespace S3
21 {
22 namespace Model
23 {
24 
28  {
29  public:
31 
32  // Service request name is the Operation name which will send this request out,
33  // each operation should has unique request name, so that we can get operation's name from this request.
34  // Note: this is not true for response, multiple operations may have the same response name,
35  // so we can not get operation's name from response.
36  inline virtual const char* GetServiceRequestName() const override { return "PutBucketCors"; }
37 
38  Aws::String SerializePayload() const override;
39 
40  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
41 
42  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
43 
44  inline bool ShouldComputeContentMd5() const override { return true; }
45 
46 
50  inline const Aws::String& GetBucket() const{ return m_bucket; }
51 
55  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
56 
60  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
61 
65  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
66 
70  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
71 
75  inline PutBucketCorsRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
76 
80  inline PutBucketCorsRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
81 
85  inline PutBucketCorsRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
86 
87 
95  inline const CORSConfiguration& GetCORSConfiguration() const{ return m_cORSConfiguration; }
96 
104  inline bool CORSConfigurationHasBeenSet() const { return m_cORSConfigurationHasBeenSet; }
105 
113  inline void SetCORSConfiguration(const CORSConfiguration& value) { m_cORSConfigurationHasBeenSet = true; m_cORSConfiguration = value; }
114 
122  inline void SetCORSConfiguration(CORSConfiguration&& value) { m_cORSConfigurationHasBeenSet = true; m_cORSConfiguration = std::move(value); }
123 
131  inline PutBucketCorsRequest& WithCORSConfiguration(const CORSConfiguration& value) { SetCORSConfiguration(value); return *this;}
132 
140  inline PutBucketCorsRequest& WithCORSConfiguration(CORSConfiguration&& value) { SetCORSConfiguration(std::move(value)); return *this;}
141 
142 
148  inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
149 
155  inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
156 
162  inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
163 
169  inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
170 
176  inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
177 
183  inline PutBucketCorsRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
184 
190  inline PutBucketCorsRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
191 
197  inline PutBucketCorsRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
198 
199 
200 
201  inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
202 
203 
204  inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
205 
206 
207  inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
208 
209 
210  inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
211 
212 
213  inline PutBucketCorsRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
214 
215 
216  inline PutBucketCorsRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
217 
218 
219  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
220 
221 
222  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
223 
224 
225  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
226 
227 
228  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
229 
230 
231  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
232 
233 
234  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
235 
236 
237  inline PutBucketCorsRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
238 
239  private:
240 
241  Aws::String m_bucket;
242  bool m_bucketHasBeenSet;
243 
244  CORSConfiguration m_cORSConfiguration;
245  bool m_cORSConfigurationHasBeenSet;
246 
247  Aws::String m_expectedBucketOwner;
248  bool m_expectedBucketOwnerHasBeenSet;
249 
250  Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
251  bool m_customizedAccessLogTagHasBeenSet;
252  };
253 
254 } // namespace Model
255 } // namespace S3
256 } // namespace Aws
const Aws::String & GetExpectedBucketOwner() const
void SetExpectedBucketOwner(Aws::String &&value)
void SetExpectedBucketOwner(const char *value)
PutBucketCorsRequest & WithBucket(Aws::String &&value)
PutBucketCorsRequest & WithBucket(const char *value)
PutBucketCorsRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
PutBucketCorsRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
virtual const char * GetServiceRequestName() const override
PutBucketCorsRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
PutBucketCorsRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutBucketCorsRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
const Aws::String & GetBucket() const
const CORSConfiguration & GetCORSConfiguration() const
void SetExpectedBucketOwner(const Aws::String &value)
void SetCORSConfiguration(const CORSConfiguration &value)
PutBucketCorsRequest & WithBucket(const Aws::String &value)
void SetBucket(const Aws::String &value)
PutBucketCorsRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PutBucketCorsRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
PutBucketCorsRequest & WithExpectedBucketOwner(const char *value)
void SetCORSConfiguration(CORSConfiguration &&value)
PutBucketCorsRequest & WithExpectedBucketOwner(const Aws::String &value)
PutBucketCorsRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutBucketCorsRequest & WithCORSConfiguration(const CORSConfiguration &value)
PutBucketCorsRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutBucketCorsRequest & WithCORSConfiguration(CORSConfiguration &&value)
PutBucketCorsRequest & WithExpectedBucketOwner(Aws::String &&value)