AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
50
52
55 inline BucketCannedACL GetACL() const { return m_aCL; }
56 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
57 inline void SetACL(BucketCannedACL value) {
58 m_aCLHasBeenSet = true;
59 m_aCL = value;
60 }
62 SetACL(value);
63 return *this;
64 }
66
68
72 inline const AccessControlPolicy& GetAccessControlPolicy() const { return m_accessControlPolicy; }
73 inline bool AccessControlPolicyHasBeenSet() const { return m_accessControlPolicyHasBeenSet; }
74 template <typename AccessControlPolicyT = AccessControlPolicy>
75 void SetAccessControlPolicy(AccessControlPolicyT&& value) {
76 m_accessControlPolicyHasBeenSet = true;
77 m_accessControlPolicy = std::forward<AccessControlPolicyT>(value);
78 }
79 template <typename AccessControlPolicyT = AccessControlPolicy>
80 PutBucketAclRequest& WithAccessControlPolicy(AccessControlPolicyT&& value) {
81 SetAccessControlPolicy(std::forward<AccessControlPolicyT>(value));
82 return *this;
83 }
85
87
90 inline const Aws::String& GetBucket() const { return m_bucket; }
91 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
92 template <typename BucketT = Aws::String>
93 void SetBucket(BucketT&& value) {
94 m_bucketHasBeenSet = true;
95 m_bucket = std::forward<BucketT>(value);
96 }
97 template <typename BucketT = Aws::String>
98 PutBucketAclRequest& WithBucket(BucketT&& value) {
99 SetBucket(std::forward<BucketT>(value));
100 return *this;
101 }
103
105
113 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
114 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
115 template <typename ContentMD5T = Aws::String>
116 void SetContentMD5(ContentMD5T&& value) {
117 m_contentMD5HasBeenSet = true;
118 m_contentMD5 = std::forward<ContentMD5T>(value);
119 }
120 template <typename ContentMD5T = Aws::String>
121 PutBucketAclRequest& WithContentMD5(ContentMD5T&& value) {
122 SetContentMD5(std::forward<ContentMD5T>(value));
123 return *this;
124 }
126
128
140 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
141 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
143 m_checksumAlgorithmHasBeenSet = true;
144 m_checksumAlgorithm = value;
145 }
148 return *this;
149 }
151
153
157 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
158 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
159 template <typename GrantFullControlT = Aws::String>
160 void SetGrantFullControl(GrantFullControlT&& value) {
161 m_grantFullControlHasBeenSet = true;
162 m_grantFullControl = std::forward<GrantFullControlT>(value);
163 }
164 template <typename GrantFullControlT = Aws::String>
165 PutBucketAclRequest& WithGrantFullControl(GrantFullControlT&& value) {
166 SetGrantFullControl(std::forward<GrantFullControlT>(value));
167 return *this;
168 }
170
172
175 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
176 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
177 template <typename GrantReadT = Aws::String>
178 void SetGrantRead(GrantReadT&& value) {
179 m_grantReadHasBeenSet = true;
180 m_grantRead = std::forward<GrantReadT>(value);
181 }
182 template <typename GrantReadT = Aws::String>
183 PutBucketAclRequest& WithGrantRead(GrantReadT&& value) {
184 SetGrantRead(std::forward<GrantReadT>(value));
185 return *this;
186 }
188
190
193 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
194 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
195 template <typename GrantReadACPT = Aws::String>
196 void SetGrantReadACP(GrantReadACPT&& value) {
197 m_grantReadACPHasBeenSet = true;
198 m_grantReadACP = std::forward<GrantReadACPT>(value);
199 }
200 template <typename GrantReadACPT = Aws::String>
201 PutBucketAclRequest& WithGrantReadACP(GrantReadACPT&& value) {
202 SetGrantReadACP(std::forward<GrantReadACPT>(value));
203 return *this;
204 }
206
208
213 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
214 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
215 template <typename GrantWriteT = Aws::String>
216 void SetGrantWrite(GrantWriteT&& value) {
217 m_grantWriteHasBeenSet = true;
218 m_grantWrite = std::forward<GrantWriteT>(value);
219 }
220 template <typename GrantWriteT = Aws::String>
221 PutBucketAclRequest& WithGrantWrite(GrantWriteT&& value) {
222 SetGrantWrite(std::forward<GrantWriteT>(value));
223 return *this;
224 }
226
228
231 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
232 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
233 template <typename GrantWriteACPT = Aws::String>
234 void SetGrantWriteACP(GrantWriteACPT&& value) {
235 m_grantWriteACPHasBeenSet = true;
236 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
237 }
238 template <typename GrantWriteACPT = Aws::String>
239 PutBucketAclRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
240 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
241 return *this;
242 }
244
246
251 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
252 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
253 template <typename ExpectedBucketOwnerT = Aws::String>
254 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
255 m_expectedBucketOwnerHasBeenSet = true;
256 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
257 }
258 template <typename ExpectedBucketOwnerT = Aws::String>
259 PutBucketAclRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
260 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
261 return *this;
262 }
264
266
267 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
268 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
269 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
270 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
271 m_customizedAccessLogTagHasBeenSet = true;
272 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
273 }
274 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
275 PutBucketAclRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
276 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
277 return *this;
278 }
279 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
280 PutBucketAclRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
281 m_customizedAccessLogTagHasBeenSet = true;
282 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
283 return *this;
284 }
286 private:
288 bool m_aCLHasBeenSet = false;
289
290 AccessControlPolicy m_accessControlPolicy;
291 bool m_accessControlPolicyHasBeenSet = false;
292
293 Aws::String m_bucket;
294 bool m_bucketHasBeenSet = false;
295
296 Aws::String m_contentMD5;
297 bool m_contentMD5HasBeenSet = false;
298
300 bool m_checksumAlgorithmHasBeenSet = false;
301
302 Aws::String m_grantFullControl;
303 bool m_grantFullControlHasBeenSet = false;
304
305 Aws::String m_grantRead;
306 bool m_grantReadHasBeenSet = false;
307
308 Aws::String m_grantReadACP;
309 bool m_grantReadACPHasBeenSet = false;
310
311 Aws::String m_grantWrite;
312 bool m_grantWriteHasBeenSet = false;
313
314 Aws::String m_grantWriteACP;
315 bool m_grantWriteACPHasBeenSet = false;
316
317 Aws::String m_expectedBucketOwner;
318 bool m_expectedBucketOwnerHasBeenSet = false;
319
320 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
321 bool m_customizedAccessLogTagHasBeenSet = false;
322};
323
324} // namespace Model
325} // namespace S3Crt
326} // 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
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