AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutBucketAclRequest.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/AccessControlPolicy.h>
12#include <aws/s3-crt/model/BucketCannedACL.h>
13#include <aws/s3-crt/model/ChecksumAlgorithm.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Http {
19class URI;
20} // namespace Http
21namespace S3Crt {
22namespace Model {
23
27 public:
28 AWS_S3CRT_API PutBucketAclRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "PutBucketAcl"; }
35
36 AWS_S3CRT_API Aws::String SerializePayload() const override;
37
38 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
42 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
43 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
44 AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override;
45 inline bool RequestChecksumRequired() const override { return true; };
46
50 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
51
53
56 inline BucketCannedACL GetACL() const { return m_aCL; }
57 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
58 inline void SetACL(BucketCannedACL value) {
59 m_aCLHasBeenSet = true;
60 m_aCL = value;
61 }
63 SetACL(value);
64 return *this;
65 }
67
69
73 inline const AccessControlPolicy& GetAccessControlPolicy() const { return m_accessControlPolicy; }
74 inline bool AccessControlPolicyHasBeenSet() const { return m_accessControlPolicyHasBeenSet; }
75 template <typename AccessControlPolicyT = AccessControlPolicy>
76 void SetAccessControlPolicy(AccessControlPolicyT&& value) {
77 m_accessControlPolicyHasBeenSet = true;
78 m_accessControlPolicy = std::forward<AccessControlPolicyT>(value);
79 }
80 template <typename AccessControlPolicyT = AccessControlPolicy>
81 PutBucketAclRequest& WithAccessControlPolicy(AccessControlPolicyT&& value) {
82 SetAccessControlPolicy(std::forward<AccessControlPolicyT>(value));
83 return *this;
84 }
86
88
91 inline const Aws::String& GetBucket() const { return m_bucket; }
92 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
93 template <typename BucketT = Aws::String>
94 void SetBucket(BucketT&& value) {
95 m_bucketHasBeenSet = true;
96 m_bucket = std::forward<BucketT>(value);
97 }
98 template <typename BucketT = Aws::String>
99 PutBucketAclRequest& WithBucket(BucketT&& value) {
100 SetBucket(std::forward<BucketT>(value));
101 return *this;
102 }
104
106
114 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
115 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
116 template <typename ContentMD5T = Aws::String>
117 void SetContentMD5(ContentMD5T&& value) {
118 m_contentMD5HasBeenSet = true;
119 m_contentMD5 = std::forward<ContentMD5T>(value);
120 }
121 template <typename ContentMD5T = Aws::String>
122 PutBucketAclRequest& WithContentMD5(ContentMD5T&& value) {
123 SetContentMD5(std::forward<ContentMD5T>(value));
124 return *this;
125 }
127
129
141 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
142 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
144 m_checksumAlgorithmHasBeenSet = true;
145 m_checksumAlgorithm = value;
146 }
149 return *this;
150 }
152
154
158 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
159 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
160 template <typename GrantFullControlT = Aws::String>
161 void SetGrantFullControl(GrantFullControlT&& value) {
162 m_grantFullControlHasBeenSet = true;
163 m_grantFullControl = std::forward<GrantFullControlT>(value);
164 }
165 template <typename GrantFullControlT = Aws::String>
166 PutBucketAclRequest& WithGrantFullControl(GrantFullControlT&& value) {
167 SetGrantFullControl(std::forward<GrantFullControlT>(value));
168 return *this;
169 }
171
173
176 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
177 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
178 template <typename GrantReadT = Aws::String>
179 void SetGrantRead(GrantReadT&& value) {
180 m_grantReadHasBeenSet = true;
181 m_grantRead = std::forward<GrantReadT>(value);
182 }
183 template <typename GrantReadT = Aws::String>
184 PutBucketAclRequest& WithGrantRead(GrantReadT&& value) {
185 SetGrantRead(std::forward<GrantReadT>(value));
186 return *this;
187 }
189
191
194 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
195 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
196 template <typename GrantReadACPT = Aws::String>
197 void SetGrantReadACP(GrantReadACPT&& value) {
198 m_grantReadACPHasBeenSet = true;
199 m_grantReadACP = std::forward<GrantReadACPT>(value);
200 }
201 template <typename GrantReadACPT = Aws::String>
202 PutBucketAclRequest& WithGrantReadACP(GrantReadACPT&& value) {
203 SetGrantReadACP(std::forward<GrantReadACPT>(value));
204 return *this;
205 }
207
209
214 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
215 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
216 template <typename GrantWriteT = Aws::String>
217 void SetGrantWrite(GrantWriteT&& value) {
218 m_grantWriteHasBeenSet = true;
219 m_grantWrite = std::forward<GrantWriteT>(value);
220 }
221 template <typename GrantWriteT = Aws::String>
222 PutBucketAclRequest& WithGrantWrite(GrantWriteT&& value) {
223 SetGrantWrite(std::forward<GrantWriteT>(value));
224 return *this;
225 }
227
229
232 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
233 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
234 template <typename GrantWriteACPT = Aws::String>
235 void SetGrantWriteACP(GrantWriteACPT&& value) {
236 m_grantWriteACPHasBeenSet = true;
237 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
238 }
239 template <typename GrantWriteACPT = Aws::String>
240 PutBucketAclRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
241 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
242 return *this;
243 }
245
247
252 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
253 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
254 template <typename ExpectedBucketOwnerT = Aws::String>
255 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
256 m_expectedBucketOwnerHasBeenSet = true;
257 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
258 }
259 template <typename ExpectedBucketOwnerT = Aws::String>
260 PutBucketAclRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
261 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
262 return *this;
263 }
265
267
268 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
269 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
270 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
271 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
272 m_customizedAccessLogTagHasBeenSet = true;
273 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
274 }
275 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
276 PutBucketAclRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
277 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
278 return *this;
279 }
280 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
281 PutBucketAclRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
282 m_customizedAccessLogTagHasBeenSet = true;
283 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
284 return *this;
285 }
287 private:
289
290 AccessControlPolicy m_accessControlPolicy;
291
292 Aws::String m_bucket;
293
294 Aws::String m_contentMD5;
295
297
298 Aws::String m_grantFullControl;
299
300 Aws::String m_grantRead;
301
302 Aws::String m_grantReadACP;
303
304 Aws::String m_grantWrite;
305
306 Aws::String m_grantWriteACP;
307
308 Aws::String m_expectedBucketOwner;
309
310 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
311 bool m_aCLHasBeenSet = false;
312 bool m_accessControlPolicyHasBeenSet = false;
313 bool m_bucketHasBeenSet = false;
314 bool m_contentMD5HasBeenSet = false;
315 bool m_checksumAlgorithmHasBeenSet = false;
316 bool m_grantFullControlHasBeenSet = false;
317 bool m_grantReadHasBeenSet = false;
318 bool m_grantReadACPHasBeenSet = false;
319 bool m_grantWriteHasBeenSet = false;
320 bool m_grantWriteACPHasBeenSet = false;
321 bool m_expectedBucketOwnerHasBeenSet = false;
322 bool m_customizedAccessLogTagHasBeenSet = false;
323};
324
325} // namespace Model
326} // namespace S3Crt
327} // namespace Aws
void SetGrantReadACP(GrantReadACPT &&value)
PutBucketAclRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
PutBucketAclRequest & WithGrantWriteACP(GrantWriteACPT &&value)
const AccessControlPolicy & GetAccessControlPolicy() const
PutBucketAclRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ChecksumAlgorithm GetChecksumAlgorithm() const
PutBucketAclRequest & WithGrantFullControl(GrantFullControlT &&value)
PutBucketAclRequest & WithBucket(BucketT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetAccessControlPolicy(AccessControlPolicyT &&value)
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
const Aws::String & GetGrantReadACP() const
PutBucketAclRequest & WithGrantWrite(GrantWriteT &&value)
const Aws::String & GetContentMD5() const
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutBucketAclRequest & WithGrantRead(GrantReadT &&value)
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutBucketAclRequest & WithGrantReadACP(GrantReadACPT &&value)
PutBucketAclRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3CRT_API Aws::String SerializePayload() const override
void SetGrantFullControl(GrantFullControlT &&value)
AWS_S3CRT_API PutBucketAclRequest()=default
PutBucketAclRequest & WithACL(BucketCannedACL value)
const Aws::String & GetGrantFullControl() const
const Aws::String & GetGrantWrite() const
AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override
void SetChecksumAlgorithm(ChecksumAlgorithm value)
void SetGrantWriteACP(GrantWriteACPT &&value)
PutBucketAclRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
const Aws::String & GetExpectedBucketOwner() const
PutBucketAclRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketAclRequest & WithAccessControlPolicy(AccessControlPolicyT &&value)
const Aws::String & GetGrantWriteACP() const
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
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