AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PutObjectRetentionRequest.h
1
6#pragma once
7#include <aws/s3-crt/S3Crt_EXPORTS.h>
8#include <aws/s3-crt/S3CrtRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3-crt/model/ObjectLockRetention.h>
11#include <aws/s3-crt/model/RequestPayer.h>
12#include <aws/s3-crt/model/ChecksumAlgorithm.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace S3Crt
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
40 AWS_S3CRT_API Aws::String SerializePayload() const override;
41
42 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
45
46 AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
47 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
48
52 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
53
55
69 inline const Aws::String& GetBucket() const{ return m_bucket; }
70 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
71 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
72 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
73 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
74 inline PutObjectRetentionRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
75 inline PutObjectRetentionRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
76 inline PutObjectRetentionRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
78
80
84 inline const Aws::String& GetKey() const{ return m_key; }
85 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
86 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
87 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
88 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
89 inline PutObjectRetentionRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
90 inline PutObjectRetentionRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
91 inline PutObjectRetentionRequest& WithKey(const char* value) { SetKey(value); return *this;}
93
95
98 inline const ObjectLockRetention& GetRetention() const{ return m_retention; }
99 inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
100 inline void SetRetention(const ObjectLockRetention& value) { m_retentionHasBeenSet = true; m_retention = value; }
101 inline void SetRetention(ObjectLockRetention&& value) { m_retentionHasBeenSet = true; m_retention = std::move(value); }
102 inline PutObjectRetentionRequest& WithRetention(const ObjectLockRetention& value) { SetRetention(value); return *this;}
103 inline PutObjectRetentionRequest& WithRetention(ObjectLockRetention&& value) { SetRetention(std::move(value)); return *this;}
105
107
108 inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
109 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
110 inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
111 inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
112 inline PutObjectRetentionRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
113 inline PutObjectRetentionRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
115
117
121 inline const Aws::String& GetVersionId() const{ return m_versionId; }
122 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
123 inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
124 inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
125 inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
126 inline PutObjectRetentionRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
127 inline PutObjectRetentionRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
128 inline PutObjectRetentionRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
130
132
135 inline bool GetBypassGovernanceRetention() const{ return m_bypassGovernanceRetention; }
136 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
137 inline void SetBypassGovernanceRetention(bool value) { m_bypassGovernanceRetentionHasBeenSet = true; m_bypassGovernanceRetention = value; }
140
142
147 inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
148 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
149 inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
150 inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::move(value); }
151 inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
152 inline PutObjectRetentionRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
153 inline PutObjectRetentionRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(std::move(value)); return *this;}
154 inline PutObjectRetentionRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
156
158
170 inline const ChecksumAlgorithm& GetChecksumAlgorithm() const{ return m_checksumAlgorithm; }
171 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
172 inline void SetChecksumAlgorithm(const ChecksumAlgorithm& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
173 inline void SetChecksumAlgorithm(ChecksumAlgorithm&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::move(value); }
177
179
184 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
185 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
186 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
187 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
188 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
190 inline PutObjectRetentionRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
191 inline PutObjectRetentionRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
193
195
196 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
197 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
198 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
199 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
202 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
203 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
204 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
205 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
206 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
207 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
208 inline PutObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
210 private:
211
212 Aws::String m_bucket;
213 bool m_bucketHasBeenSet = false;
214
215 Aws::String m_key;
216 bool m_keyHasBeenSet = false;
217
218 ObjectLockRetention m_retention;
219 bool m_retentionHasBeenSet = false;
220
221 RequestPayer m_requestPayer;
222 bool m_requestPayerHasBeenSet = false;
223
224 Aws::String m_versionId;
225 bool m_versionIdHasBeenSet = false;
226
227 bool m_bypassGovernanceRetention;
228 bool m_bypassGovernanceRetentionHasBeenSet = false;
229
230 Aws::String m_contentMD5;
231 bool m_contentMD5HasBeenSet = false;
232
233 ChecksumAlgorithm m_checksumAlgorithm;
234 bool m_checksumAlgorithmHasBeenSet = false;
235
236 Aws::String m_expectedBucketOwner;
237 bool m_expectedBucketOwnerHasBeenSet = false;
238
239 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
240 bool m_customizedAccessLogTagHasBeenSet = false;
241 };
242
243} // namespace Model
244} // namespace S3Crt
245} // namespace Aws
void SetChecksumAlgorithm(const ChecksumAlgorithm &value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
PutObjectRetentionRequest & WithRequestPayer(const RequestPayer &value)
const ObjectLockRetention & GetRetention() const
PutObjectRetentionRequest & WithExpectedBucketOwner(const char *value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
PutObjectRetentionRequest & WithRetention(const ObjectLockRetention &value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
PutObjectRetentionRequest & WithContentMD5(const Aws::String &value)
PutObjectRetentionRequest & WithKey(const char *value)
PutObjectRetentionRequest & WithBypassGovernanceRetention(bool value)
PutObjectRetentionRequest & WithExpectedBucketOwner(const Aws::String &value)
PutObjectRetentionRequest & WithRetention(ObjectLockRetention &&value)
AWS_S3CRT_API Aws::String SerializePayload() const override
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
PutObjectRetentionRequest & WithVersionId(const char *value)
virtual const char * GetServiceRequestName() const override
PutObjectRetentionRequest & WithRequestPayer(RequestPayer &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
PutObjectRetentionRequest & WithChecksumAlgorithm(const ChecksumAlgorithm &value)
PutObjectRetentionRequest & WithKey(Aws::String &&value)
void SetRetention(const ObjectLockRetention &value)
PutObjectRetentionRequest & WithBucket(const char *value)
PutObjectRetentionRequest & WithContentMD5(Aws::String &&value)
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutObjectRetentionRequest & WithBucket(const Aws::String &value)
PutObjectRetentionRequest & WithExpectedBucketOwner(Aws::String &&value)
PutObjectRetentionRequest & WithChecksumAlgorithm(ChecksumAlgorithm &&value)
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
PutObjectRetentionRequest & WithVersionId(const Aws::String &value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
PutObjectRetentionRequest & WithKey(const Aws::String &value)
PutObjectRetentionRequest & WithVersionId(Aws::String &&value)
const ChecksumAlgorithm & GetChecksumAlgorithm() const
PutObjectRetentionRequest & WithContentMD5(const char *value)
PutObjectRetentionRequest & WithBucket(Aws::String &&value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PutObjectRetentionRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
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