AWS SDK for C++  1.8.71
AWS SDK for C++
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>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Http
18 {
19  class URI;
20 } //namespace Http
21 namespace S3
22 {
23 namespace Model
24 {
25 
29  {
30  public:
32 
33  // Service request name is the Operation name which will send this request out,
34  // each operation should has unique request name, so that we can get operation's name from this request.
35  // Note: this is not true for response, multiple operations may have the same response name,
36  // so we can not get operation's name from response.
37  inline virtual const char* GetServiceRequestName() const override { return "PutObjectRetention"; }
38 
39  Aws::String SerializePayload() const override;
40 
41  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42 
43  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
44 
45  inline bool ShouldComputeContentMd5() const override { return true; }
46 
47 
61  inline const Aws::String& GetBucket() const{ return m_bucket; }
62 
76  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
77 
91  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
92 
106  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
107 
121  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
122 
136  inline PutObjectRetentionRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
137 
151  inline PutObjectRetentionRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
152 
166  inline PutObjectRetentionRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
167 
168 
173  inline const Aws::String& GetKey() const{ return m_key; }
174 
179  inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
180 
185  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
186 
191  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
192 
197  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
198 
203  inline PutObjectRetentionRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
204 
209  inline PutObjectRetentionRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
210 
215  inline PutObjectRetentionRequest& WithKey(const char* value) { SetKey(value); return *this;}
216 
217 
221  inline const ObjectLockRetention& GetRetention() const{ return m_retention; }
222 
226  inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
227 
231  inline void SetRetention(const ObjectLockRetention& value) { m_retentionHasBeenSet = true; m_retention = value; }
232 
236  inline void SetRetention(ObjectLockRetention&& value) { m_retentionHasBeenSet = true; m_retention = std::move(value); }
237 
241  inline PutObjectRetentionRequest& WithRetention(const ObjectLockRetention& value) { SetRetention(value); return *this;}
242 
246  inline PutObjectRetentionRequest& WithRetention(ObjectLockRetention&& value) { SetRetention(std::move(value)); return *this;}
247 
248 
249 
250  inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
251 
252 
253  inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
254 
255 
256  inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
257 
258 
259  inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
260 
261 
262  inline PutObjectRetentionRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
263 
264 
265  inline PutObjectRetentionRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
266 
267 
272  inline const Aws::String& GetVersionId() const{ return m_versionId; }
273 
278  inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
279 
284  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
285 
290  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
291 
296  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
297 
302  inline PutObjectRetentionRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
303 
308  inline PutObjectRetentionRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
309 
314  inline PutObjectRetentionRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
315 
316 
321  inline bool GetBypassGovernanceRetention() const{ return m_bypassGovernanceRetention; }
322 
327  inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
328 
333  inline void SetBypassGovernanceRetention(bool value) { m_bypassGovernanceRetentionHasBeenSet = true; m_bypassGovernanceRetention = value; }
334 
339  inline PutObjectRetentionRequest& WithBypassGovernanceRetention(bool value) { SetBypassGovernanceRetention(value); return *this;}
340 
341 
347  inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
348 
354  inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
355 
361  inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
362 
368  inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
369 
375  inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
376 
382  inline PutObjectRetentionRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
383 
389  inline PutObjectRetentionRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
390 
396  inline PutObjectRetentionRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
397 
398 
399 
400  inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
401 
402 
403  inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
404 
405 
406  inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
407 
408 
409  inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
410 
411 
412  inline PutObjectRetentionRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
413 
414 
415  inline PutObjectRetentionRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
416 
417 
418  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
419 
420 
421  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
422 
423 
424  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
425 
426 
427  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
428 
429 
430  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
431 
432 
433  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
434 
435 
436  inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
437 
438  private:
439 
440  Aws::String m_bucket;
441  bool m_bucketHasBeenSet;
442 
443  Aws::String m_key;
444  bool m_keyHasBeenSet;
445 
446  ObjectLockRetention m_retention;
447  bool m_retentionHasBeenSet;
448 
449  RequestPayer m_requestPayer;
450  bool m_requestPayerHasBeenSet;
451 
452  Aws::String m_versionId;
453  bool m_versionIdHasBeenSet;
454 
455  bool m_bypassGovernanceRetention;
456  bool m_bypassGovernanceRetentionHasBeenSet;
457 
458  Aws::String m_expectedBucketOwner;
459  bool m_expectedBucketOwnerHasBeenSet;
460 
461  Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
462  bool m_customizedAccessLogTagHasBeenSet;
463  };
464 
465 } // namespace Model
466 } // namespace S3
467 } // namespace Aws
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
PutObjectRetentionRequest & WithExpectedBucketOwner(const Aws::String &value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectRetentionRequest & WithBypassGovernanceRetention(bool value)
void SetRetention(ObjectLockRetention &&value)
PutObjectRetentionRequest & WithVersionId(Aws::String &&value)
PutObjectRetentionRequest & WithKey(const Aws::String &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
PutObjectRetentionRequest & WithBucket(const Aws::String &value)
PutObjectRetentionRequest & WithVersionId(const char *value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
PutObjectRetentionRequest & WithVersionId(const Aws::String &value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
void SetRetention(const ObjectLockRetention &value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
PutObjectRetentionRequest & WithKey(Aws::String &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
PutObjectRetentionRequest & WithRequestPayer(RequestPayer &&value)
const ObjectLockRetention & GetRetention() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PutObjectRetentionRequest & WithExpectedBucketOwner(Aws::String &&value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & WithRetention(ObjectLockRetention &&value)
PutObjectRetentionRequest & WithBucket(Aws::String &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
PutObjectRetentionRequest & WithRetention(const ObjectLockRetention &value)
PutObjectRetentionRequest & WithBucket(const char *value)
PutObjectRetentionRequest & WithExpectedBucketOwner(const char *value)
PutObjectRetentionRequest & WithKey(const char *value)
void SetExpectedBucketOwner(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
PutObjectRetentionRequest & WithRequestPayer(const RequestPayer &value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)