AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutObjectAclRequest.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/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/AccessControlPolicy.h>
12#include <aws/s3/model/ChecksumAlgorithm.h>
13#include <aws/s3/model/ObjectCannedACL.h>
14#include <aws/s3/model/RequestPayer.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Http {
20class URI;
21} // namespace Http
22namespace S3 {
23namespace Model {
24
28 public:
29 AWS_S3_API PutObjectAclRequest() = 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 "PutObjectAcl"; }
36
37 AWS_S3_API Aws::String SerializePayload() const override;
38
39 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
40
42
43 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
44 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
45 AWS_S3_API bool ChecksumAlgorithmIsSet() const override;
46 inline bool RequestChecksumRequired() const override { return true; };
47
51 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
52
54
59 inline ObjectCannedACL GetACL() const { return m_aCL; }
60 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
61 inline void SetACL(ObjectCannedACL value) {
62 m_aCLHasBeenSet = true;
63 m_aCL = value;
64 }
66 SetACL(value);
67 return *this;
68 }
70
72
76 inline const AccessControlPolicy& GetAccessControlPolicy() const { return m_accessControlPolicy; }
77 inline bool AccessControlPolicyHasBeenSet() const { return m_accessControlPolicyHasBeenSet; }
78 template <typename AccessControlPolicyT = AccessControlPolicy>
79 void SetAccessControlPolicy(AccessControlPolicyT&& value) {
80 m_accessControlPolicyHasBeenSet = true;
81 m_accessControlPolicy = std::forward<AccessControlPolicyT>(value);
82 }
83 template <typename AccessControlPolicyT = AccessControlPolicy>
84 PutObjectAclRequest& WithAccessControlPolicy(AccessControlPolicyT&& value) {
85 SetAccessControlPolicy(std::forward<AccessControlPolicyT>(value));
86 return *this;
87 }
89
91
116 inline const Aws::String& GetBucket() const { return m_bucket; }
117 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
118 template <typename BucketT = Aws::String>
119 void SetBucket(BucketT&& value) {
120 m_bucketHasBeenSet = true;
121 m_bucket = std::forward<BucketT>(value);
122 }
123 template <typename BucketT = Aws::String>
124 PutObjectAclRequest& WithBucket(BucketT&& value) {
125 SetBucket(std::forward<BucketT>(value));
126 return *this;
127 }
129
131
139 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
140 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
141 template <typename ContentMD5T = Aws::String>
142 void SetContentMD5(ContentMD5T&& value) {
143 m_contentMD5HasBeenSet = true;
144 m_contentMD5 = std::forward<ContentMD5T>(value);
145 }
146 template <typename ContentMD5T = Aws::String>
147 PutObjectAclRequest& WithContentMD5(ContentMD5T&& value) {
148 SetContentMD5(std::forward<ContentMD5T>(value));
149 return *this;
150 }
152
154
166 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
167 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
169 m_checksumAlgorithmHasBeenSet = true;
170 m_checksumAlgorithm = value;
171 }
174 return *this;
175 }
177
179
184 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
185 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
186 template <typename GrantFullControlT = Aws::String>
187 void SetGrantFullControl(GrantFullControlT&& value) {
188 m_grantFullControlHasBeenSet = true;
189 m_grantFullControl = std::forward<GrantFullControlT>(value);
190 }
191 template <typename GrantFullControlT = Aws::String>
192 PutObjectAclRequest& WithGrantFullControl(GrantFullControlT&& value) {
193 SetGrantFullControl(std::forward<GrantFullControlT>(value));
194 return *this;
195 }
197
199
203 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
204 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
205 template <typename GrantReadT = Aws::String>
206 void SetGrantRead(GrantReadT&& value) {
207 m_grantReadHasBeenSet = true;
208 m_grantRead = std::forward<GrantReadT>(value);
209 }
210 template <typename GrantReadT = Aws::String>
211 PutObjectAclRequest& WithGrantRead(GrantReadT&& value) {
212 SetGrantRead(std::forward<GrantReadT>(value));
213 return *this;
214 }
216
218
222 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
223 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
224 template <typename GrantReadACPT = Aws::String>
225 void SetGrantReadACP(GrantReadACPT&& value) {
226 m_grantReadACPHasBeenSet = true;
227 m_grantReadACP = std::forward<GrantReadACPT>(value);
228 }
229 template <typename GrantReadACPT = Aws::String>
230 PutObjectAclRequest& WithGrantReadACP(GrantReadACPT&& value) {
231 SetGrantReadACP(std::forward<GrantReadACPT>(value));
232 return *this;
233 }
235
237
242 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
243 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
244 template <typename GrantWriteT = Aws::String>
245 void SetGrantWrite(GrantWriteT&& value) {
246 m_grantWriteHasBeenSet = true;
247 m_grantWrite = std::forward<GrantWriteT>(value);
248 }
249 template <typename GrantWriteT = Aws::String>
250 PutObjectAclRequest& WithGrantWrite(GrantWriteT&& value) {
251 SetGrantWrite(std::forward<GrantWriteT>(value));
252 return *this;
253 }
255
257
261 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
262 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
263 template <typename GrantWriteACPT = Aws::String>
264 void SetGrantWriteACP(GrantWriteACPT&& value) {
265 m_grantWriteACPHasBeenSet = true;
266 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
267 }
268 template <typename GrantWriteACPT = Aws::String>
269 PutObjectAclRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
270 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
271 return *this;
272 }
274
276
279 inline const Aws::String& GetKey() const { return m_key; }
280 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
281 template <typename KeyT = Aws::String>
282 void SetKey(KeyT&& value) {
283 m_keyHasBeenSet = true;
284 m_key = std::forward<KeyT>(value);
285 }
286 template <typename KeyT = Aws::String>
288 SetKey(std::forward<KeyT>(value));
289 return *this;
290 }
292
294
295 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
296 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
297 inline void SetRequestPayer(RequestPayer value) {
298 m_requestPayerHasBeenSet = true;
299 m_requestPayer = value;
300 }
302 SetRequestPayer(value);
303 return *this;
304 }
306
308
312 inline const Aws::String& GetVersionId() const { return m_versionId; }
313 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
314 template <typename VersionIdT = Aws::String>
315 void SetVersionId(VersionIdT&& value) {
316 m_versionIdHasBeenSet = true;
317 m_versionId = std::forward<VersionIdT>(value);
318 }
319 template <typename VersionIdT = Aws::String>
320 PutObjectAclRequest& WithVersionId(VersionIdT&& value) {
321 SetVersionId(std::forward<VersionIdT>(value));
322 return *this;
323 }
325
327
332 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
333 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
334 template <typename ExpectedBucketOwnerT = Aws::String>
335 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
336 m_expectedBucketOwnerHasBeenSet = true;
337 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
338 }
339 template <typename ExpectedBucketOwnerT = Aws::String>
340 PutObjectAclRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
341 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
342 return *this;
343 }
345
347
348 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
349 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
350 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
351 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
352 m_customizedAccessLogTagHasBeenSet = true;
353 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
354 }
355 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
356 PutObjectAclRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
357 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
358 return *this;
359 }
360 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
361 PutObjectAclRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
362 m_customizedAccessLogTagHasBeenSet = true;
363 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
364 return *this;
365 }
367 private:
369
370 AccessControlPolicy m_accessControlPolicy;
371
372 Aws::String m_bucket;
373
374 Aws::String m_contentMD5;
375
377
378 Aws::String m_grantFullControl;
379
380 Aws::String m_grantRead;
381
382 Aws::String m_grantReadACP;
383
384 Aws::String m_grantWrite;
385
386 Aws::String m_grantWriteACP;
387
388 Aws::String m_key;
389
390 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
391
392 Aws::String m_versionId;
393
394 Aws::String m_expectedBucketOwner;
395
396 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
397 bool m_aCLHasBeenSet = false;
398 bool m_accessControlPolicyHasBeenSet = false;
399 bool m_bucketHasBeenSet = false;
400 bool m_contentMD5HasBeenSet = false;
401 bool m_checksumAlgorithmHasBeenSet = false;
402 bool m_grantFullControlHasBeenSet = false;
403 bool m_grantReadHasBeenSet = false;
404 bool m_grantReadACPHasBeenSet = false;
405 bool m_grantWriteHasBeenSet = false;
406 bool m_grantWriteACPHasBeenSet = false;
407 bool m_keyHasBeenSet = false;
408 bool m_requestPayerHasBeenSet = false;
409 bool m_versionIdHasBeenSet = false;
410 bool m_expectedBucketOwnerHasBeenSet = false;
411 bool m_customizedAccessLogTagHasBeenSet = false;
412};
413
414} // namespace Model
415} // namespace S3
416} // namespace Aws
const Aws::String & GetGrantWriteACP() const
AWS_S3_API bool ChecksumAlgorithmIsSet() const override
PutObjectAclRequest & WithAccessControlPolicy(AccessControlPolicyT &&value)
PutObjectAclRequest & WithGrantWrite(GrantWriteT &&value)
ChecksumAlgorithm GetChecksumAlgorithm() const
PutObjectAclRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetContentMD5(ContentMD5T &&value)
PutObjectAclRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetGrantWrite() const
bool RequestChecksumRequired() const override
void SetGrantWriteACP(GrantWriteACPT &&value)
void SetGrantWrite(GrantWriteT &&value)
void SetGrantFullControl(GrantFullControlT &&value)
PutObjectAclRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetExpectedBucketOwner() const
const Aws::String & GetGrantFullControl() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutObjectAclRequest & WithBucket(BucketT &&value)
PutObjectAclRequest & WithGrantReadACP(GrantReadACPT &&value)
void SetGrantReadACP(GrantReadACPT &&value)
PutObjectAclRequest & WithRequestPayer(RequestPayer value)
const Aws::String & GetBucket() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API PutObjectAclRequest()=default
void SetChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
const AccessControlPolicy & GetAccessControlPolicy() const
virtual const char * GetServiceRequestName() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutObjectAclRequest & WithGrantWriteACP(GrantWriteACPT &&value)
void SetAccessControlPolicy(AccessControlPolicyT &&value)
PutObjectAclRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectAclRequest & WithGrantRead(GrantReadT &&value)
PutObjectAclRequest & WithKey(KeyT &&value)
const Aws::String & GetVersionId() const
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
void SetACL(ObjectCannedACL value)
PutObjectAclRequest & WithGrantFullControl(GrantFullControlT &&value)
PutObjectAclRequest & WithContentMD5(ContentMD5T &&value)
const Aws::String & GetGrantReadACP() const
PutObjectAclRequest & WithACL(ObjectCannedACL value)
const Aws::String & GetGrantRead() const
const Aws::String & GetContentMD5() const
PutObjectAclRequest & WithVersionId(VersionIdT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:19
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