AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
46
50 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
51
53
58 inline ObjectCannedACL GetACL() const { return m_aCL; }
59 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
60 inline void SetACL(ObjectCannedACL value) {
61 m_aCLHasBeenSet = true;
62 m_aCL = value;
63 }
65 SetACL(value);
66 return *this;
67 }
69
71
75 inline const AccessControlPolicy& GetAccessControlPolicy() const { return m_accessControlPolicy; }
76 inline bool AccessControlPolicyHasBeenSet() const { return m_accessControlPolicyHasBeenSet; }
77 template <typename AccessControlPolicyT = AccessControlPolicy>
78 void SetAccessControlPolicy(AccessControlPolicyT&& value) {
79 m_accessControlPolicyHasBeenSet = true;
80 m_accessControlPolicy = std::forward<AccessControlPolicyT>(value);
81 }
82 template <typename AccessControlPolicyT = AccessControlPolicy>
83 PutObjectAclRequest& WithAccessControlPolicy(AccessControlPolicyT&& value) {
84 SetAccessControlPolicy(std::forward<AccessControlPolicyT>(value));
85 return *this;
86 }
88
90
115 inline const Aws::String& GetBucket() const { return m_bucket; }
116 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
117 template <typename BucketT = Aws::String>
118 void SetBucket(BucketT&& value) {
119 m_bucketHasBeenSet = true;
120 m_bucket = std::forward<BucketT>(value);
121 }
122 template <typename BucketT = Aws::String>
123 PutObjectAclRequest& WithBucket(BucketT&& value) {
124 SetBucket(std::forward<BucketT>(value));
125 return *this;
126 }
128
130
138 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
139 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
140 template <typename ContentMD5T = Aws::String>
141 void SetContentMD5(ContentMD5T&& value) {
142 m_contentMD5HasBeenSet = true;
143 m_contentMD5 = std::forward<ContentMD5T>(value);
144 }
145 template <typename ContentMD5T = Aws::String>
146 PutObjectAclRequest& WithContentMD5(ContentMD5T&& value) {
147 SetContentMD5(std::forward<ContentMD5T>(value));
148 return *this;
149 }
151
153
165 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
166 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
168 m_checksumAlgorithmHasBeenSet = true;
169 m_checksumAlgorithm = value;
170 }
173 return *this;
174 }
176
178
183 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
184 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
185 template <typename GrantFullControlT = Aws::String>
186 void SetGrantFullControl(GrantFullControlT&& value) {
187 m_grantFullControlHasBeenSet = true;
188 m_grantFullControl = std::forward<GrantFullControlT>(value);
189 }
190 template <typename GrantFullControlT = Aws::String>
191 PutObjectAclRequest& WithGrantFullControl(GrantFullControlT&& value) {
192 SetGrantFullControl(std::forward<GrantFullControlT>(value));
193 return *this;
194 }
196
198
202 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
203 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
204 template <typename GrantReadT = Aws::String>
205 void SetGrantRead(GrantReadT&& value) {
206 m_grantReadHasBeenSet = true;
207 m_grantRead = std::forward<GrantReadT>(value);
208 }
209 template <typename GrantReadT = Aws::String>
210 PutObjectAclRequest& WithGrantRead(GrantReadT&& value) {
211 SetGrantRead(std::forward<GrantReadT>(value));
212 return *this;
213 }
215
217
221 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
222 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
223 template <typename GrantReadACPT = Aws::String>
224 void SetGrantReadACP(GrantReadACPT&& value) {
225 m_grantReadACPHasBeenSet = true;
226 m_grantReadACP = std::forward<GrantReadACPT>(value);
227 }
228 template <typename GrantReadACPT = Aws::String>
229 PutObjectAclRequest& WithGrantReadACP(GrantReadACPT&& value) {
230 SetGrantReadACP(std::forward<GrantReadACPT>(value));
231 return *this;
232 }
234
236
241 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
242 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
243 template <typename GrantWriteT = Aws::String>
244 void SetGrantWrite(GrantWriteT&& value) {
245 m_grantWriteHasBeenSet = true;
246 m_grantWrite = std::forward<GrantWriteT>(value);
247 }
248 template <typename GrantWriteT = Aws::String>
249 PutObjectAclRequest& WithGrantWrite(GrantWriteT&& value) {
250 SetGrantWrite(std::forward<GrantWriteT>(value));
251 return *this;
252 }
254
256
260 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
261 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
262 template <typename GrantWriteACPT = Aws::String>
263 void SetGrantWriteACP(GrantWriteACPT&& value) {
264 m_grantWriteACPHasBeenSet = true;
265 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
266 }
267 template <typename GrantWriteACPT = Aws::String>
268 PutObjectAclRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
269 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
270 return *this;
271 }
273
275
278 inline const Aws::String& GetKey() const { return m_key; }
279 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
280 template <typename KeyT = Aws::String>
281 void SetKey(KeyT&& value) {
282 m_keyHasBeenSet = true;
283 m_key = std::forward<KeyT>(value);
284 }
285 template <typename KeyT = Aws::String>
287 SetKey(std::forward<KeyT>(value));
288 return *this;
289 }
291
293
294 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
295 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
296 inline void SetRequestPayer(RequestPayer value) {
297 m_requestPayerHasBeenSet = true;
298 m_requestPayer = value;
299 }
301 SetRequestPayer(value);
302 return *this;
303 }
305
307
311 inline const Aws::String& GetVersionId() const { return m_versionId; }
312 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
313 template <typename VersionIdT = Aws::String>
314 void SetVersionId(VersionIdT&& value) {
315 m_versionIdHasBeenSet = true;
316 m_versionId = std::forward<VersionIdT>(value);
317 }
318 template <typename VersionIdT = Aws::String>
319 PutObjectAclRequest& WithVersionId(VersionIdT&& value) {
320 SetVersionId(std::forward<VersionIdT>(value));
321 return *this;
322 }
324
326
331 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
332 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
333 template <typename ExpectedBucketOwnerT = Aws::String>
334 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
335 m_expectedBucketOwnerHasBeenSet = true;
336 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
337 }
338 template <typename ExpectedBucketOwnerT = Aws::String>
339 PutObjectAclRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
340 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
341 return *this;
342 }
344
346
347 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
348 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
349 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
350 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
351 m_customizedAccessLogTagHasBeenSet = true;
352 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
353 }
354 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
355 PutObjectAclRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
356 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
357 return *this;
358 }
359 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
360 PutObjectAclRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
361 m_customizedAccessLogTagHasBeenSet = true;
362 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
363 return *this;
364 }
366 private:
368 bool m_aCLHasBeenSet = false;
369
370 AccessControlPolicy m_accessControlPolicy;
371 bool m_accessControlPolicyHasBeenSet = false;
372
373 Aws::String m_bucket;
374 bool m_bucketHasBeenSet = false;
375
376 Aws::String m_contentMD5;
377 bool m_contentMD5HasBeenSet = false;
378
380 bool m_checksumAlgorithmHasBeenSet = false;
381
382 Aws::String m_grantFullControl;
383 bool m_grantFullControlHasBeenSet = false;
384
385 Aws::String m_grantRead;
386 bool m_grantReadHasBeenSet = false;
387
388 Aws::String m_grantReadACP;
389 bool m_grantReadACPHasBeenSet = false;
390
391 Aws::String m_grantWrite;
392 bool m_grantWriteHasBeenSet = false;
393
394 Aws::String m_grantWriteACP;
395 bool m_grantWriteACPHasBeenSet = false;
396
397 Aws::String m_key;
398 bool m_keyHasBeenSet = false;
399
400 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
401 bool m_requestPayerHasBeenSet = false;
402
403 Aws::String m_versionId;
404 bool m_versionIdHasBeenSet = false;
405
406 Aws::String m_expectedBucketOwner;
407 bool m_expectedBucketOwnerHasBeenSet = false;
408
409 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
410 bool m_customizedAccessLogTagHasBeenSet = false;
411};
412
413} // namespace Model
414} // namespace S3
415} // namespace Aws
const Aws::String & GetGrantWriteACP() const
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