AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutObjectRetentionRequest.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-crt/S3CrtRequest.h>
10#include <aws/s3-crt/S3Crt_EXPORTS.h>
11#include <aws/s3-crt/model/ChecksumAlgorithm.h>
12#include <aws/s3-crt/model/ObjectLockRetention.h>
13#include <aws/s3-crt/model/RequestPayer.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Http {
19class URI;
20} // namespace Http
21namespace S3Crt {
22namespace Model {
23
27 public:
28 AWS_S3CRT_API PutObjectRetentionRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "PutObjectRetention"; }
35
36 AWS_S3CRT_API Aws::String SerializePayload() const override;
37
38 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
42 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
43 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
44 AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override;
45 inline bool RequestChecksumRequired() const override { return true; };
46
50 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
51
53
69 inline const Aws::String& GetBucket() const { return m_bucket; }
70 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
71 template <typename BucketT = Aws::String>
72 void SetBucket(BucketT&& value) {
73 m_bucketHasBeenSet = true;
74 m_bucket = std::forward<BucketT>(value);
75 }
76 template <typename BucketT = Aws::String>
78 SetBucket(std::forward<BucketT>(value));
79 return *this;
80 }
82
84
88 inline const Aws::String& GetKey() const { return m_key; }
89 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
90 template <typename KeyT = Aws::String>
91 void SetKey(KeyT&& value) {
92 m_keyHasBeenSet = true;
93 m_key = std::forward<KeyT>(value);
94 }
95 template <typename KeyT = Aws::String>
97 SetKey(std::forward<KeyT>(value));
98 return *this;
99 }
101
103
106 inline const ObjectLockRetention& GetRetention() const { return m_retention; }
107 inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
108 template <typename RetentionT = ObjectLockRetention>
109 void SetRetention(RetentionT&& value) {
110 m_retentionHasBeenSet = true;
111 m_retention = std::forward<RetentionT>(value);
112 }
113 template <typename RetentionT = ObjectLockRetention>
115 SetRetention(std::forward<RetentionT>(value));
116 return *this;
117 }
119
121
122 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
123 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
124 inline void SetRequestPayer(RequestPayer value) {
125 m_requestPayerHasBeenSet = true;
126 m_requestPayer = value;
127 }
129 SetRequestPayer(value);
130 return *this;
131 }
133
135
139 inline const Aws::String& GetVersionId() const { return m_versionId; }
140 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
141 template <typename VersionIdT = Aws::String>
142 void SetVersionId(VersionIdT&& value) {
143 m_versionIdHasBeenSet = true;
144 m_versionId = std::forward<VersionIdT>(value);
145 }
146 template <typename VersionIdT = Aws::String>
148 SetVersionId(std::forward<VersionIdT>(value));
149 return *this;
150 }
152
154
157 inline bool GetBypassGovernanceRetention() const { return m_bypassGovernanceRetention; }
158 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
159 inline void SetBypassGovernanceRetention(bool value) {
160 m_bypassGovernanceRetentionHasBeenSet = true;
161 m_bypassGovernanceRetention = value;
162 }
165 return *this;
166 }
168
170
175 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
176 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
177 template <typename ContentMD5T = Aws::String>
178 void SetContentMD5(ContentMD5T&& value) {
179 m_contentMD5HasBeenSet = true;
180 m_contentMD5 = std::forward<ContentMD5T>(value);
181 }
182 template <typename ContentMD5T = Aws::String>
184 SetContentMD5(std::forward<ContentMD5T>(value));
185 return *this;
186 }
188
190
202 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
203 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
205 m_checksumAlgorithmHasBeenSet = true;
206 m_checksumAlgorithm = value;
207 }
210 return *this;
211 }
213
215
220 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
221 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
222 template <typename ExpectedBucketOwnerT = Aws::String>
223 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
224 m_expectedBucketOwnerHasBeenSet = true;
225 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
226 }
227 template <typename ExpectedBucketOwnerT = Aws::String>
228 PutObjectRetentionRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
229 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
230 return *this;
231 }
233
235
236 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
237 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
238 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
239 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
240 m_customizedAccessLogTagHasBeenSet = true;
241 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
242 }
243 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
244 PutObjectRetentionRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
245 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
246 return *this;
247 }
248 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
249 PutObjectRetentionRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
250 m_customizedAccessLogTagHasBeenSet = true;
251 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
252 return *this;
253 }
255 private:
256 Aws::String m_bucket;
257
258 Aws::String m_key;
259
260 ObjectLockRetention m_retention;
261
262 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
263
264 Aws::String m_versionId;
265
266 bool m_bypassGovernanceRetention{false};
267
268 Aws::String m_contentMD5;
269
271
272 Aws::String m_expectedBucketOwner;
273
274 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
275 bool m_bucketHasBeenSet = false;
276 bool m_keyHasBeenSet = false;
277 bool m_retentionHasBeenSet = false;
278 bool m_requestPayerHasBeenSet = false;
279 bool m_versionIdHasBeenSet = false;
280 bool m_bypassGovernanceRetentionHasBeenSet = false;
281 bool m_contentMD5HasBeenSet = false;
282 bool m_checksumAlgorithmHasBeenSet = false;
283 bool m_expectedBucketOwnerHasBeenSet = false;
284 bool m_customizedAccessLogTagHasBeenSet = false;
285};
286
287} // namespace Model
288} // namespace S3Crt
289} // namespace Aws
PutObjectRetentionRequest & WithVersionId(VersionIdT &&value)
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
PutObjectRetentionRequest & WithKey(KeyT &&value)
PutObjectRetentionRequest & WithBypassGovernanceRetention(bool value)
AWS_S3CRT_API Aws::String SerializePayload() const override
PutObjectRetentionRequest & WithBucket(BucketT &&value)
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3CRT_API PutObjectRetentionRequest()=default
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectRetentionRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutObjectRetentionRequest & WithRetention(RetentionT &&value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
virtual const char * GetServiceRequestName() const override
PutObjectRetentionRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutObjectRetentionRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
PutObjectRetentionRequest & WithContentMD5(ContentMD5T &&value)
PutObjectRetentionRequest & WithRequestPayer(RequestPayer value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
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