AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
PutObjectRetentionRequest.h
Go to the documentation of this file.
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace S3
23{
24namespace Model
25{
26
30 {
31 public:
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "PutObjectRetention"; }
39
41
43
45
47
52
65 inline const Aws::String& GetBucket() const{ return m_bucket; }
66
79 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
80
93 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
94
107 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
108
121 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
122
135 inline PutObjectRetentionRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
136
149 inline PutObjectRetentionRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
150
163 inline PutObjectRetentionRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
164
165
170 inline const Aws::String& GetKey() const{ return m_key; }
171
176 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
177
182 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
183
188 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
189
194 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
195
200 inline PutObjectRetentionRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
201
206 inline PutObjectRetentionRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
207
212 inline PutObjectRetentionRequest& WithKey(const char* value) { SetKey(value); return *this;}
213
214
218 inline const ObjectLockRetention& GetRetention() const{ return m_retention; }
219
223 inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
224
228 inline void SetRetention(const ObjectLockRetention& value) { m_retentionHasBeenSet = true; m_retention = value; }
229
233 inline void SetRetention(ObjectLockRetention&& value) { m_retentionHasBeenSet = true; m_retention = std::move(value); }
234
238 inline PutObjectRetentionRequest& WithRetention(const ObjectLockRetention& value) { SetRetention(value); return *this;}
239
243 inline PutObjectRetentionRequest& WithRetention(ObjectLockRetention&& value) { SetRetention(std::move(value)); return *this;}
244
245
246
247 inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
248
249
250 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
251
252
253 inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
254
255
256 inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
257
258
259 inline PutObjectRetentionRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
260
261
262 inline PutObjectRetentionRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
263
264
269 inline const Aws::String& GetVersionId() const{ return m_versionId; }
270
275 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
276
281 inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
282
287 inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
288
293 inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
294
299 inline PutObjectRetentionRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
300
305 inline PutObjectRetentionRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
306
311 inline PutObjectRetentionRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
312
313
317 inline bool GetBypassGovernanceRetention() const{ return m_bypassGovernanceRetention; }
318
322 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
323
327 inline void SetBypassGovernanceRetention(bool value) { m_bypassGovernanceRetentionHasBeenSet = true; m_bypassGovernanceRetention = value; }
328
333
334
340 inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
341
347 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
348
354 inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
355
361 inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::move(value); }
362
368 inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
369
375 inline PutObjectRetentionRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
376
382 inline PutObjectRetentionRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(std::move(value)); return *this;}
383
389 inline PutObjectRetentionRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
390
391
404 inline const ChecksumAlgorithm& GetChecksumAlgorithm() const{ return m_checksumAlgorithm; }
405
418 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
419
432 inline void SetChecksumAlgorithm(const ChecksumAlgorithm& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
433
446 inline void SetChecksumAlgorithm(ChecksumAlgorithm&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::move(value); }
447
461
475
476
482 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
483
489 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
490
496 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
497
503 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
504
510 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
511
518
524 inline PutObjectRetentionRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
525
531 inline PutObjectRetentionRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
532
533
534
535 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
536
537
538 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
539
540
541 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
542
543
544 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
545
546
548
549
551
552
553 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
554
555
556 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
557
558
559 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
560
561
562 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
563
564
565 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
566
567
568 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
569
570
571 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
572
573 private:
574
575 Aws::String m_bucket;
576 bool m_bucketHasBeenSet = false;
577
578 Aws::String m_key;
579 bool m_keyHasBeenSet = false;
580
581 ObjectLockRetention m_retention;
582 bool m_retentionHasBeenSet = false;
583
584 RequestPayer m_requestPayer;
585 bool m_requestPayerHasBeenSet = false;
586
587 Aws::String m_versionId;
588 bool m_versionIdHasBeenSet = false;
589
590 bool m_bypassGovernanceRetention;
591 bool m_bypassGovernanceRetentionHasBeenSet = false;
592
593 Aws::String m_contentMD5;
594 bool m_contentMD5HasBeenSet = false;
595
596 ChecksumAlgorithm m_checksumAlgorithm;
597 bool m_checksumAlgorithmHasBeenSet = false;
598
599 Aws::String m_expectedBucketOwner;
600 bool m_expectedBucketOwnerHasBeenSet = false;
601
602 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
603 bool m_customizedAccessLogTagHasBeenSet = false;
604 };
605
606} // namespace Model
607} // namespace S3
608} // namespace Aws
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
PutObjectRetentionRequest & WithContentMD5(const char *value)
PutObjectRetentionRequest & WithRequestPayer(RequestPayer &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
PutObjectRetentionRequest & WithRetention(ObjectLockRetention &&value)
PutObjectRetentionRequest & WithKey(const char *value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
PutObjectRetentionRequest & WithContentMD5(Aws::String &&value)
PutObjectRetentionRequest & WithVersionId(const char *value)
AWS_S3_API Aws::String SerializePayload() const override
void SetChecksumAlgorithm(const ChecksumAlgorithm &value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
PutObjectRetentionRequest & WithBucket(const char *value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PutObjectRetentionRequest & WithVersionId(const Aws::String &value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
PutObjectRetentionRequest & WithChecksumAlgorithm(ChecksumAlgorithm &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutObjectRetentionRequest & WithExpectedBucketOwner(const char *value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
PutObjectRetentionRequest & WithVersionId(Aws::String &&value)
PutObjectRetentionRequest & WithExpectedBucketOwner(const Aws::String &value)
void SetExpectedBucketOwner(const Aws::String &value)
PutObjectRetentionRequest & WithBucket(Aws::String &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
PutObjectRetentionRequest & WithRequestPayer(const RequestPayer &value)
PutObjectRetentionRequest & WithChecksumAlgorithm(const ChecksumAlgorithm &value)
void SetRetention(ObjectLockRetention &&value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
PutObjectRetentionRequest & WithBucket(const Aws::String &value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
void SetChecksumAlgorithm(ChecksumAlgorithm &&value)
const ObjectLockRetention & GetRetention() const
PutObjectRetentionRequest & WithKey(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
const ChecksumAlgorithm & GetChecksumAlgorithm() const
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectRetentionRequest & WithBypassGovernanceRetention(bool value)
PutObjectRetentionRequest & WithKey(const Aws::String &value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & WithRetention(const ObjectLockRetention &value)
void SetRetention(const ObjectLockRetention &value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
PutObjectRetentionRequest & WithContentMD5(const Aws::String &value)
PutObjectRetentionRequest & WithExpectedBucketOwner(Aws::String &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Definition: S3Request.h:22
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String