AWS SDK for C++

AWS SDK for C++ Version 1.11.783

Loading...
Searching...
No Matches
CreateBucketRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/s3-crt/S3CrtRequest.h>
10#include <aws/s3-crt/S3Crt_EXPORTS.h>
11#include <aws/s3-crt/model/BucketCannedACL.h>
12#include <aws/s3-crt/model/BucketNamespace.h>
13#include <aws/s3-crt/model/CreateBucketConfiguration.h>
14#include <aws/s3-crt/model/ObjectOwnership.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Http {
20class URI;
21} // namespace Http
22namespace S3Crt {
23namespace Model {
24
28 public:
29 AWS_S3CRT_API CreateBucketRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateBucket"; }
36
37 AWS_S3CRT_API Aws::String SerializePayload() const override;
38
39 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
40
42
43 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
47 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
48
50
54 inline BucketCannedACL GetACL() const { return m_aCL; }
55 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
56 inline void SetACL(BucketCannedACL value) {
57 m_aCLHasBeenSet = true;
58 m_aCL = value;
59 }
61 SetACL(value);
62 return *this;
63 }
65
67
84 inline const Aws::String& GetBucket() const { return m_bucket; }
85 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
86 template <typename BucketT = Aws::String>
87 void SetBucket(BucketT&& value) {
88 m_bucketHasBeenSet = true;
89 m_bucket = std::forward<BucketT>(value);
90 }
91 template <typename BucketT = Aws::String>
92 CreateBucketRequest& WithBucket(BucketT&& value) {
93 SetBucket(std::forward<BucketT>(value));
94 return *this;
95 }
97
99
102 inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const { return m_createBucketConfiguration; }
103 inline bool CreateBucketConfigurationHasBeenSet() const { return m_createBucketConfigurationHasBeenSet; }
104 template <typename CreateBucketConfigurationT = CreateBucketConfiguration>
105 void SetCreateBucketConfiguration(CreateBucketConfigurationT&& value) {
106 m_createBucketConfigurationHasBeenSet = true;
107 m_createBucketConfiguration = std::forward<CreateBucketConfigurationT>(value);
108 }
109 template <typename CreateBucketConfigurationT = CreateBucketConfiguration>
110 CreateBucketRequest& WithCreateBucketConfiguration(CreateBucketConfigurationT&& value) {
111 SetCreateBucketConfiguration(std::forward<CreateBucketConfigurationT>(value));
112 return *this;
113 }
115
117
122 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
123 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
124 template <typename GrantFullControlT = Aws::String>
125 void SetGrantFullControl(GrantFullControlT&& value) {
126 m_grantFullControlHasBeenSet = true;
127 m_grantFullControl = std::forward<GrantFullControlT>(value);
128 }
129 template <typename GrantFullControlT = Aws::String>
130 CreateBucketRequest& WithGrantFullControl(GrantFullControlT&& value) {
131 SetGrantFullControl(std::forward<GrantFullControlT>(value));
132 return *this;
133 }
135
137
141 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
142 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
143 template <typename GrantReadT = Aws::String>
144 void SetGrantRead(GrantReadT&& value) {
145 m_grantReadHasBeenSet = true;
146 m_grantRead = std::forward<GrantReadT>(value);
147 }
148 template <typename GrantReadT = Aws::String>
149 CreateBucketRequest& WithGrantRead(GrantReadT&& value) {
150 SetGrantRead(std::forward<GrantReadT>(value));
151 return *this;
152 }
154
156
160 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
161 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
162 template <typename GrantReadACPT = Aws::String>
163 void SetGrantReadACP(GrantReadACPT&& value) {
164 m_grantReadACPHasBeenSet = true;
165 m_grantReadACP = std::forward<GrantReadACPT>(value);
166 }
167 template <typename GrantReadACPT = Aws::String>
168 CreateBucketRequest& WithGrantReadACP(GrantReadACPT&& value) {
169 SetGrantReadACP(std::forward<GrantReadACPT>(value));
170 return *this;
171 }
173
175
181 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
182 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
183 template <typename GrantWriteT = Aws::String>
184 void SetGrantWrite(GrantWriteT&& value) {
185 m_grantWriteHasBeenSet = true;
186 m_grantWrite = std::forward<GrantWriteT>(value);
187 }
188 template <typename GrantWriteT = Aws::String>
189 CreateBucketRequest& WithGrantWrite(GrantWriteT&& value) {
190 SetGrantWrite(std::forward<GrantWriteT>(value));
191 return *this;
192 }
194
196
200 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
201 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
202 template <typename GrantWriteACPT = Aws::String>
203 void SetGrantWriteACP(GrantWriteACPT&& value) {
204 m_grantWriteACPHasBeenSet = true;
205 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
206 }
207 template <typename GrantWriteACPT = Aws::String>
208 CreateBucketRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
209 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
210 return *this;
211 }
213
215
220 inline bool GetObjectLockEnabledForBucket() const { return m_objectLockEnabledForBucket; }
221 inline bool ObjectLockEnabledForBucketHasBeenSet() const { return m_objectLockEnabledForBucketHasBeenSet; }
222 inline void SetObjectLockEnabledForBucket(bool value) {
223 m_objectLockEnabledForBucketHasBeenSet = true;
224 m_objectLockEnabledForBucket = value;
225 }
228 return *this;
229 }
231
233
234 inline ObjectOwnership GetObjectOwnership() const { return m_objectOwnership; }
235 inline bool ObjectOwnershipHasBeenSet() const { return m_objectOwnershipHasBeenSet; }
237 m_objectOwnershipHasBeenSet = true;
238 m_objectOwnership = value;
239 }
241 SetObjectOwnership(value);
242 return *this;
243 }
245
247
267 inline BucketNamespace GetBucketNamespace() const { return m_bucketNamespace; }
268 inline bool BucketNamespaceHasBeenSet() const { return m_bucketNamespaceHasBeenSet; }
270 m_bucketNamespaceHasBeenSet = true;
271 m_bucketNamespace = value;
272 }
274 SetBucketNamespace(value);
275 return *this;
276 }
278
280
281 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
282 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
283 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
284 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
285 m_customizedAccessLogTagHasBeenSet = true;
286 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
287 }
288 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
289 CreateBucketRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
290 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
291 return *this;
292 }
293 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
294 CreateBucketRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
295 m_customizedAccessLogTagHasBeenSet = true;
296 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
297 return *this;
298 }
300 private:
302
303 Aws::String m_bucket;
304
305 CreateBucketConfiguration m_createBucketConfiguration;
306
307 Aws::String m_grantFullControl;
308
309 Aws::String m_grantRead;
310
311 Aws::String m_grantReadACP;
312
313 Aws::String m_grantWrite;
314
315 Aws::String m_grantWriteACP;
316
317 bool m_objectLockEnabledForBucket{false};
318
319 ObjectOwnership m_objectOwnership{ObjectOwnership::NOT_SET};
320
321 BucketNamespace m_bucketNamespace{BucketNamespace::NOT_SET};
322
323 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
324 bool m_aCLHasBeenSet = false;
325 bool m_bucketHasBeenSet = false;
326 bool m_createBucketConfigurationHasBeenSet = false;
327 bool m_grantFullControlHasBeenSet = false;
328 bool m_grantReadHasBeenSet = false;
329 bool m_grantReadACPHasBeenSet = false;
330 bool m_grantWriteHasBeenSet = false;
331 bool m_grantWriteACPHasBeenSet = false;
332 bool m_objectLockEnabledForBucketHasBeenSet = false;
333 bool m_objectOwnershipHasBeenSet = false;
334 bool m_bucketNamespaceHasBeenSet = false;
335 bool m_customizedAccessLogTagHasBeenSet = false;
336};
337
338} // namespace Model
339} // namespace S3Crt
340} // namespace Aws
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
CreateBucketRequest & WithGrantWrite(GrantWriteT &&value)
AWS_S3CRT_API CreateBucketRequest()=default
CreateBucketRequest & WithGrantWriteACP(GrantWriteACPT &&value)
virtual const char * GetServiceRequestName() const override
void SetBucketNamespace(BucketNamespace value)
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
CreateBucketRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
const Aws::String & GetGrantFullControl() const
CreateBucketRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetGrantWriteACP() const
const CreateBucketConfiguration & GetCreateBucketConfiguration() const
void SetCreateBucketConfiguration(CreateBucketConfigurationT &&value)
CreateBucketRequest & WithGrantReadACP(GrantReadACPT &&value)
CreateBucketRequest & WithBucket(BucketT &&value)
const Aws::String & GetGrantReadACP() const
CreateBucketRequest & WithGrantRead(GrantReadT &&value)
void SetGrantReadACP(GrantReadACPT &&value)
CreateBucketRequest & WithObjectOwnership(ObjectOwnership value)
AWS_S3CRT_API Aws::String SerializePayload() const override
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetGrantFullControl(GrantFullControlT &&value)
void SetGrantWriteACP(GrantWriteACPT &&value)
CreateBucketRequest & WithACL(BucketCannedACL value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfigurationT &&value)
CreateBucketRequest & WithGrantFullControl(GrantFullControlT &&value)
CreateBucketRequest & WithBucketNamespace(BucketNamespace value)
CreateBucketRequest & WithObjectLockEnabledForBucket(bool value)
void SetObjectOwnership(ObjectOwnership value)
const Aws::String & GetGrantWrite() const
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
Aws::Endpoint::EndpointParameters EndpointParameters
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String