AWS SDK for C++  0.12.9
AWS SDK for C++
CreateBucketRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
17 #include <aws/s3/S3Request.h>
21 
22 namespace Aws
23 {
24 namespace S3
25 {
26 namespace Model
27 {
28 
32  {
33  public:
35  Aws::String SerializePayload() const override;
36 
37  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
42  inline const BucketCannedACL& GetACL() const{ return m_aCL; }
43 
47  inline void SetACL(const BucketCannedACL& value) { m_aCLHasBeenSet = true; m_aCL = value; }
48 
52  inline void SetACL(BucketCannedACL&& value) { m_aCLHasBeenSet = true; m_aCL = value; }
53 
57  inline CreateBucketRequest& WithACL(const BucketCannedACL& value) { SetACL(value); return *this;}
58 
62  inline CreateBucketRequest& WithACL(BucketCannedACL&& value) { SetACL(value); return *this;}
63 
64 
65  inline const Aws::String& GetBucket() const{ return m_bucket; }
66 
67 
68  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
69 
70 
71  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
72 
73 
74  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
75 
76 
77  inline CreateBucketRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
78 
79 
80  inline CreateBucketRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
81 
82 
83  inline CreateBucketRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
84 
85 
86  inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const{ return m_createBucketConfiguration; }
87 
88 
89  inline void SetCreateBucketConfiguration(const CreateBucketConfiguration& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = value; }
90 
91 
92  inline void SetCreateBucketConfiguration(CreateBucketConfiguration&& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = value; }
93 
94 
95  inline CreateBucketRequest& WithCreateBucketConfiguration(const CreateBucketConfiguration& value) { SetCreateBucketConfiguration(value); return *this;}
96 
97 
98  inline CreateBucketRequest& WithCreateBucketConfiguration(CreateBucketConfiguration&& value) { SetCreateBucketConfiguration(value); return *this;}
99 
104  inline const Aws::String& GetGrantFullControl() const{ return m_grantFullControl; }
105 
110  inline void SetGrantFullControl(const Aws::String& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
111 
116  inline void SetGrantFullControl(Aws::String&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
117 
122  inline void SetGrantFullControl(const char* value) { m_grantFullControlHasBeenSet = true; m_grantFullControl.assign(value); }
123 
128  inline CreateBucketRequest& WithGrantFullControl(const Aws::String& value) { SetGrantFullControl(value); return *this;}
129 
134  inline CreateBucketRequest& WithGrantFullControl(Aws::String&& value) { SetGrantFullControl(value); return *this;}
135 
140  inline CreateBucketRequest& WithGrantFullControl(const char* value) { SetGrantFullControl(value); return *this;}
141 
145  inline const Aws::String& GetGrantRead() const{ return m_grantRead; }
146 
150  inline void SetGrantRead(const Aws::String& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
151 
155  inline void SetGrantRead(Aws::String&& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
156 
160  inline void SetGrantRead(const char* value) { m_grantReadHasBeenSet = true; m_grantRead.assign(value); }
161 
165  inline CreateBucketRequest& WithGrantRead(const Aws::String& value) { SetGrantRead(value); return *this;}
166 
170  inline CreateBucketRequest& WithGrantRead(Aws::String&& value) { SetGrantRead(value); return *this;}
171 
175  inline CreateBucketRequest& WithGrantRead(const char* value) { SetGrantRead(value); return *this;}
176 
180  inline const Aws::String& GetGrantReadACP() const{ return m_grantReadACP; }
181 
185  inline void SetGrantReadACP(const Aws::String& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
186 
190  inline void SetGrantReadACP(Aws::String&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
191 
195  inline void SetGrantReadACP(const char* value) { m_grantReadACPHasBeenSet = true; m_grantReadACP.assign(value); }
196 
200  inline CreateBucketRequest& WithGrantReadACP(const Aws::String& value) { SetGrantReadACP(value); return *this;}
201 
205  inline CreateBucketRequest& WithGrantReadACP(Aws::String&& value) { SetGrantReadACP(value); return *this;}
206 
210  inline CreateBucketRequest& WithGrantReadACP(const char* value) { SetGrantReadACP(value); return *this;}
211 
215  inline const Aws::String& GetGrantWrite() const{ return m_grantWrite; }
216 
220  inline void SetGrantWrite(const Aws::String& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
221 
225  inline void SetGrantWrite(Aws::String&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
226 
230  inline void SetGrantWrite(const char* value) { m_grantWriteHasBeenSet = true; m_grantWrite.assign(value); }
231 
235  inline CreateBucketRequest& WithGrantWrite(const Aws::String& value) { SetGrantWrite(value); return *this;}
236 
240  inline CreateBucketRequest& WithGrantWrite(Aws::String&& value) { SetGrantWrite(value); return *this;}
241 
245  inline CreateBucketRequest& WithGrantWrite(const char* value) { SetGrantWrite(value); return *this;}
246 
250  inline const Aws::String& GetGrantWriteACP() const{ return m_grantWriteACP; }
251 
255  inline void SetGrantWriteACP(const Aws::String& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
256 
260  inline void SetGrantWriteACP(Aws::String&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
261 
265  inline void SetGrantWriteACP(const char* value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP.assign(value); }
266 
270  inline CreateBucketRequest& WithGrantWriteACP(const Aws::String& value) { SetGrantWriteACP(value); return *this;}
271 
275  inline CreateBucketRequest& WithGrantWriteACP(Aws::String&& value) { SetGrantWriteACP(value); return *this;}
276 
280  inline CreateBucketRequest& WithGrantWriteACP(const char* value) { SetGrantWriteACP(value); return *this;}
281 
282  private:
283  BucketCannedACL m_aCL;
284  bool m_aCLHasBeenSet;
285  Aws::String m_bucket;
286  bool m_bucketHasBeenSet;
287  CreateBucketConfiguration m_createBucketConfiguration;
288  bool m_createBucketConfigurationHasBeenSet;
289  Aws::String m_grantFullControl;
290  bool m_grantFullControlHasBeenSet;
291  Aws::String m_grantRead;
292  bool m_grantReadHasBeenSet;
293  Aws::String m_grantReadACP;
294  bool m_grantReadACPHasBeenSet;
295  Aws::String m_grantWrite;
296  bool m_grantWriteHasBeenSet;
297  Aws::String m_grantWriteACP;
298  bool m_grantWriteACPHasBeenSet;
299  };
300 
301 } // namespace Model
302 } // namespace S3
303 } // namespace Aws
void SetCreateBucketConfiguration(const CreateBucketConfiguration &value)
const Aws::String & GetGrantReadACP() const
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)
void SetACL(BucketCannedACL &&value)
CreateBucketRequest & WithGrantReadACP(const char *value)
void SetBucket(const Aws::String &value)
void SetGrantFullControl(const Aws::String &value)
CreateBucketRequest & WithCreateBucketConfiguration(const CreateBucketConfiguration &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
CreateBucketRequest & WithGrantReadACP(Aws::String &&value)
void SetGrantWrite(Aws::String &&value)
const Aws::String & GetGrantFullControl() const
void SetGrantWriteACP(Aws::String &&value)
CreateBucketRequest & WithGrantReadACP(const Aws::String &value)
void SetCreateBucketConfiguration(CreateBucketConfiguration &&value)
void SetGrantWrite(const Aws::String &value)
const Aws::String & GetBucket() const
const Aws::String & GetGrantRead() const
CreateBucketRequest & WithGrantWriteACP(Aws::String &&value)
CreateBucketRequest & WithGrantRead(Aws::String &&value)
CreateBucketRequest & WithBucket(const char *value)
void SetGrantReadACP(Aws::String &&value)
CreateBucketRequest & WithGrantWrite(const Aws::String &value)
void SetGrantFullControl(const char *value)
const Aws::String & GetGrantWrite() const
const BucketCannedACL & GetACL() const
CreateBucketRequest & WithGrantFullControl(const Aws::String &value)
CreateBucketRequest & WithGrantRead(const char *value)
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfiguration &&value)
CreateBucketRequest & WithBucket(const Aws::String &value)
const CreateBucketConfiguration & GetCreateBucketConfiguration() 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 & WithGrantWriteACP(const Aws::String &value)
const Aws::String & GetGrantWriteACP() const
void SetGrantWriteACP(const Aws::String &value)
CreateBucketRequest & WithGrantRead(const Aws::String &value)
CreateBucketRequest & WithGrantFullControl(const char *value)
CreateBucketRequest & WithGrantFullControl(Aws::String &&value)
JSON (JavaScript Object Notation).
CreateBucketRequest & WithGrantWriteACP(const char *value)
void SetGrantReadACP(const Aws::String &value)