AWS SDK for C++  1.8.71
AWS SDK for C++
CreateBucketRequest.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>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Http
18 {
19  class URI;
20 } //namespace Http
21 namespace S3
22 {
23 namespace Model
24 {
25 
29  {
30  public:
32 
33  // Service request name is the Operation name which will send this request out,
34  // each operation should has unique request name, so that we can get operation's name from this request.
35  // Note: this is not true for response, multiple operations may have the same response name,
36  // so we can not get operation's name from response.
37  inline virtual const char* GetServiceRequestName() const override { return "CreateBucket"; }
38 
39  Aws::String SerializePayload() const override;
40 
41  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42 
43  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
44 
45 
49  inline const BucketCannedACL& GetACL() const{ return m_aCL; }
50 
54  inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
55 
59  inline void SetACL(const BucketCannedACL& value) { m_aCLHasBeenSet = true; m_aCL = value; }
60 
64  inline void SetACL(BucketCannedACL&& value) { m_aCLHasBeenSet = true; m_aCL = std::move(value); }
65 
69  inline CreateBucketRequest& WithACL(const BucketCannedACL& value) { SetACL(value); return *this;}
70 
74  inline CreateBucketRequest& WithACL(BucketCannedACL&& value) { SetACL(std::move(value)); return *this;}
75 
76 
80  inline const Aws::String& GetBucket() const{ return m_bucket; }
81 
85  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
86 
90  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
91 
95  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
96 
100  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
101 
105  inline CreateBucketRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
106 
110  inline CreateBucketRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
111 
115  inline CreateBucketRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
116 
117 
121  inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const{ return m_createBucketConfiguration; }
122 
126  inline bool CreateBucketConfigurationHasBeenSet() const { return m_createBucketConfigurationHasBeenSet; }
127 
131  inline void SetCreateBucketConfiguration(const CreateBucketConfiguration& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = value; }
132 
136  inline void SetCreateBucketConfiguration(CreateBucketConfiguration&& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = std::move(value); }
137 
141  inline CreateBucketRequest& WithCreateBucketConfiguration(const CreateBucketConfiguration& value) { SetCreateBucketConfiguration(value); return *this;}
142 
146  inline CreateBucketRequest& WithCreateBucketConfiguration(CreateBucketConfiguration&& value) { SetCreateBucketConfiguration(std::move(value)); return *this;}
147 
148 
153  inline const Aws::String& GetGrantFullControl() const{ return m_grantFullControl; }
154 
159  inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
160 
165  inline void SetGrantFullControl(const Aws::String& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
166 
171  inline void SetGrantFullControl(Aws::String&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = std::move(value); }
172 
177  inline void SetGrantFullControl(const char* value) { m_grantFullControlHasBeenSet = true; m_grantFullControl.assign(value); }
178 
183  inline CreateBucketRequest& WithGrantFullControl(const Aws::String& value) { SetGrantFullControl(value); return *this;}
184 
189  inline CreateBucketRequest& WithGrantFullControl(Aws::String&& value) { SetGrantFullControl(std::move(value)); return *this;}
190 
195  inline CreateBucketRequest& WithGrantFullControl(const char* value) { SetGrantFullControl(value); return *this;}
196 
197 
201  inline const Aws::String& GetGrantRead() const{ return m_grantRead; }
202 
206  inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
207 
211  inline void SetGrantRead(const Aws::String& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
212 
216  inline void SetGrantRead(Aws::String&& value) { m_grantReadHasBeenSet = true; m_grantRead = std::move(value); }
217 
221  inline void SetGrantRead(const char* value) { m_grantReadHasBeenSet = true; m_grantRead.assign(value); }
222 
226  inline CreateBucketRequest& WithGrantRead(const Aws::String& value) { SetGrantRead(value); return *this;}
227 
231  inline CreateBucketRequest& WithGrantRead(Aws::String&& value) { SetGrantRead(std::move(value)); return *this;}
232 
236  inline CreateBucketRequest& WithGrantRead(const char* value) { SetGrantRead(value); return *this;}
237 
238 
242  inline const Aws::String& GetGrantReadACP() const{ return m_grantReadACP; }
243 
247  inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
248 
252  inline void SetGrantReadACP(const Aws::String& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
253 
257  inline void SetGrantReadACP(Aws::String&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = std::move(value); }
258 
262  inline void SetGrantReadACP(const char* value) { m_grantReadACPHasBeenSet = true; m_grantReadACP.assign(value); }
263 
267  inline CreateBucketRequest& WithGrantReadACP(const Aws::String& value) { SetGrantReadACP(value); return *this;}
268 
272  inline CreateBucketRequest& WithGrantReadACP(Aws::String&& value) { SetGrantReadACP(std::move(value)); return *this;}
273 
277  inline CreateBucketRequest& WithGrantReadACP(const char* value) { SetGrantReadACP(value); return *this;}
278 
279 
283  inline const Aws::String& GetGrantWrite() const{ return m_grantWrite; }
284 
288  inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
289 
293  inline void SetGrantWrite(const Aws::String& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
294 
298  inline void SetGrantWrite(Aws::String&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = std::move(value); }
299 
303  inline void SetGrantWrite(const char* value) { m_grantWriteHasBeenSet = true; m_grantWrite.assign(value); }
304 
308  inline CreateBucketRequest& WithGrantWrite(const Aws::String& value) { SetGrantWrite(value); return *this;}
309 
313  inline CreateBucketRequest& WithGrantWrite(Aws::String&& value) { SetGrantWrite(std::move(value)); return *this;}
314 
318  inline CreateBucketRequest& WithGrantWrite(const char* value) { SetGrantWrite(value); return *this;}
319 
320 
324  inline const Aws::String& GetGrantWriteACP() const{ return m_grantWriteACP; }
325 
329  inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
330 
334  inline void SetGrantWriteACP(const Aws::String& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
335 
339  inline void SetGrantWriteACP(Aws::String&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = std::move(value); }
340 
344  inline void SetGrantWriteACP(const char* value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP.assign(value); }
345 
349  inline CreateBucketRequest& WithGrantWriteACP(const Aws::String& value) { SetGrantWriteACP(value); return *this;}
350 
354  inline CreateBucketRequest& WithGrantWriteACP(Aws::String&& value) { SetGrantWriteACP(std::move(value)); return *this;}
355 
359  inline CreateBucketRequest& WithGrantWriteACP(const char* value) { SetGrantWriteACP(value); return *this;}
360 
361 
366  inline bool GetObjectLockEnabledForBucket() const{ return m_objectLockEnabledForBucket; }
367 
372  inline bool ObjectLockEnabledForBucketHasBeenSet() const { return m_objectLockEnabledForBucketHasBeenSet; }
373 
378  inline void SetObjectLockEnabledForBucket(bool value) { m_objectLockEnabledForBucketHasBeenSet = true; m_objectLockEnabledForBucket = value; }
379 
384  inline CreateBucketRequest& WithObjectLockEnabledForBucket(bool value) { SetObjectLockEnabledForBucket(value); return *this;}
385 
386 
387 
388  inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
389 
390 
391  inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
392 
393 
394  inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
395 
396 
397  inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
398 
399 
400  inline CreateBucketRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
401 
402 
403  inline CreateBucketRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
404 
405 
406  inline CreateBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
407 
408 
409  inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
410 
411 
412  inline CreateBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
413 
414 
415  inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
416 
417 
418  inline CreateBucketRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
419 
420 
421  inline CreateBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
422 
423 
424  inline CreateBucketRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
425 
426  private:
427 
428  BucketCannedACL m_aCL;
429  bool m_aCLHasBeenSet;
430 
431  Aws::String m_bucket;
432  bool m_bucketHasBeenSet;
433 
434  CreateBucketConfiguration m_createBucketConfiguration;
435  bool m_createBucketConfigurationHasBeenSet;
436 
437  Aws::String m_grantFullControl;
438  bool m_grantFullControlHasBeenSet;
439 
440  Aws::String m_grantRead;
441  bool m_grantReadHasBeenSet;
442 
443  Aws::String m_grantReadACP;
444  bool m_grantReadACPHasBeenSet;
445 
446  Aws::String m_grantWrite;
447  bool m_grantWriteHasBeenSet;
448 
449  Aws::String m_grantWriteACP;
450  bool m_grantWriteACPHasBeenSet;
451 
452  bool m_objectLockEnabledForBucket;
453  bool m_objectLockEnabledForBucketHasBeenSet;
454 
455  Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
456  bool m_customizedAccessLogTagHasBeenSet;
457  };
458 
459 } // namespace Model
460 } // namespace S3
461 } // namespace Aws
void SetCreateBucketConfiguration(const CreateBucketConfiguration &value)
virtual const char * GetServiceRequestName() const override
void SetGrantFullControl(Aws::String &&value)
void SetGrantWriteACP(const char *value)
CreateBucketRequest & WithGrantWrite(const char *value)
CreateBucketRequest & WithACL(const BucketCannedACL &value)
CreateBucketRequest & WithGrantWrite(Aws::String &&value)
void SetGrantRead(Aws::String &&value)
const Aws::String & GetGrantReadACP() const
void SetACL(BucketCannedACL &&value)
CreateBucketRequest & WithGrantReadACP(const char *value)
void SetBucket(const Aws::String &value)
void SetGrantFullControl(const Aws::String &value)
CreateBucketRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
CreateBucketRequest & WithCreateBucketConfiguration(const CreateBucketConfiguration &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
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
CreateBucketRequest & WithGrantReadACP(Aws::String &&value)
void SetGrantWrite(Aws::String &&value)
CreateBucketRequest & WithObjectLockEnabledForBucket(bool value)
void SetGrantWriteACP(Aws::String &&value)
CreateBucketRequest & WithGrantReadACP(const Aws::String &value)
void SetCreateBucketConfiguration(CreateBucketConfiguration &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
CreateBucketRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
void SetGrantWrite(const Aws::String &value)
const Aws::String & GetGrantWrite() const
CreateBucketRequest & WithGrantWriteACP(Aws::String &&value)
CreateBucketRequest & WithGrantRead(Aws::String &&value)
CreateBucketRequest & WithBucket(const char *value)
const CreateBucketConfiguration & GetCreateBucketConfiguration() const
const Aws::String & GetGrantWriteACP() const
void SetGrantReadACP(Aws::String &&value)
CreateBucketRequest & WithGrantWrite(const Aws::String &value)
const BucketCannedACL & GetACL() const
const Aws::String & GetGrantRead() const
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
void SetGrantFullControl(const char *value)
CreateBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
CreateBucketRequest & WithGrantFullControl(const Aws::String &value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
const Aws::String & GetGrantFullControl() const
CreateBucketRequest & WithGrantRead(const char *value)
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfiguration &&value)
CreateBucketRequest & WithBucket(const Aws::String &value)
CreateBucketRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetACL(const BucketCannedACL &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
CreateBucketRequest & WithBucket(Aws::String &&value)
CreateBucketRequest & WithACL(BucketCannedACL &&value)
void SetGrantRead(const Aws::String &value)
void SetBucket(Aws::String &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
CreateBucketRequest & WithGrantWriteACP(const Aws::String &value)
void SetGrantWriteACP(const Aws::String &value)
CreateBucketRequest & WithGrantRead(const Aws::String &value)
const Aws::String & GetBucket() const
CreateBucketRequest & WithGrantFullControl(const char *value)
CreateBucketRequest & WithGrantFullControl(Aws::String &&value)
CreateBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
CreateBucketRequest & WithGrantWriteACP(const char *value)
void SetGrantReadACP(const Aws::String &value)