AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12#include <aws/s3/model/ObjectLockRetention.h>
13#include <aws/s3/model/RequestPayer.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Http {
19class URI;
20} // namespace Http
21namespace S3 {
22namespace Model {
23
27 public:
28 AWS_S3_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_S3_API Aws::String SerializePayload() const override;
37
38 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
42 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
43 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
50
52
68 inline const Aws::String& GetBucket() const { return m_bucket; }
69 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
70 template <typename BucketT = Aws::String>
71 void SetBucket(BucketT&& value) {
72 m_bucketHasBeenSet = true;
73 m_bucket = std::forward<BucketT>(value);
74 }
75 template <typename BucketT = Aws::String>
77 SetBucket(std::forward<BucketT>(value));
78 return *this;
79 }
81
83
87 inline const Aws::String& GetKey() const { return m_key; }
88 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
89 template <typename KeyT = Aws::String>
90 void SetKey(KeyT&& value) {
91 m_keyHasBeenSet = true;
92 m_key = std::forward<KeyT>(value);
93 }
94 template <typename KeyT = Aws::String>
96 SetKey(std::forward<KeyT>(value));
97 return *this;
98 }
100
102
105 inline const ObjectLockRetention& GetRetention() const { return m_retention; }
106 inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
107 template <typename RetentionT = ObjectLockRetention>
108 void SetRetention(RetentionT&& value) {
109 m_retentionHasBeenSet = true;
110 m_retention = std::forward<RetentionT>(value);
111 }
112 template <typename RetentionT = ObjectLockRetention>
114 SetRetention(std::forward<RetentionT>(value));
115 return *this;
116 }
118
120
121 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
122 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
123 inline void SetRequestPayer(RequestPayer value) {
124 m_requestPayerHasBeenSet = true;
125 m_requestPayer = value;
126 }
128 SetRequestPayer(value);
129 return *this;
130 }
132
134
138 inline const Aws::String& GetVersionId() const { return m_versionId; }
139 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
140 template <typename VersionIdT = Aws::String>
141 void SetVersionId(VersionIdT&& value) {
142 m_versionIdHasBeenSet = true;
143 m_versionId = std::forward<VersionIdT>(value);
144 }
145 template <typename VersionIdT = Aws::String>
147 SetVersionId(std::forward<VersionIdT>(value));
148 return *this;
149 }
151
153
156 inline bool GetBypassGovernanceRetention() const { return m_bypassGovernanceRetention; }
157 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
158 inline void SetBypassGovernanceRetention(bool value) {
159 m_bypassGovernanceRetentionHasBeenSet = true;
160 m_bypassGovernanceRetention = value;
161 }
164 return *this;
165 }
167
169
174 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
175 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
176 template <typename ContentMD5T = Aws::String>
177 void SetContentMD5(ContentMD5T&& value) {
178 m_contentMD5HasBeenSet = true;
179 m_contentMD5 = std::forward<ContentMD5T>(value);
180 }
181 template <typename ContentMD5T = Aws::String>
183 SetContentMD5(std::forward<ContentMD5T>(value));
184 return *this;
185 }
187
189
201 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
202 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
204 m_checksumAlgorithmHasBeenSet = true;
205 m_checksumAlgorithm = value;
206 }
209 return *this;
210 }
212
214
219 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
220 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
221 template <typename ExpectedBucketOwnerT = Aws::String>
222 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
223 m_expectedBucketOwnerHasBeenSet = true;
224 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
225 }
226 template <typename ExpectedBucketOwnerT = Aws::String>
227 PutObjectRetentionRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
228 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
229 return *this;
230 }
232
234
235 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
236 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
237 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
238 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
239 m_customizedAccessLogTagHasBeenSet = true;
240 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
241 }
242 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
243 PutObjectRetentionRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
244 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
245 return *this;
246 }
247 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
248 PutObjectRetentionRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
249 m_customizedAccessLogTagHasBeenSet = true;
250 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
251 return *this;
252 }
254 private:
255 Aws::String m_bucket;
256
257 Aws::String m_key;
258
259 ObjectLockRetention m_retention;
260
261 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
262
263 Aws::String m_versionId;
264
265 bool m_bypassGovernanceRetention{false};
266
267 Aws::String m_contentMD5;
268
270
271 Aws::String m_expectedBucketOwner;
272
273 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
274 bool m_bucketHasBeenSet = false;
275 bool m_keyHasBeenSet = false;
276 bool m_retentionHasBeenSet = false;
277 bool m_requestPayerHasBeenSet = false;
278 bool m_versionIdHasBeenSet = false;
279 bool m_bypassGovernanceRetentionHasBeenSet = false;
280 bool m_contentMD5HasBeenSet = false;
281 bool m_checksumAlgorithmHasBeenSet = false;
282 bool m_expectedBucketOwnerHasBeenSet = false;
283 bool m_customizedAccessLogTagHasBeenSet = false;
284};
285
286} // namespace Model
287} // namespace S3
288} // namespace Aws
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutObjectRetentionRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutObjectRetentionRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutObjectRetentionRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String SerializePayload() const override
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutObjectRetentionRequest & WithVersionId(VersionIdT &&value)
PutObjectRetentionRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutObjectRetentionRequest & WithContentMD5(ContentMD5T &&value)
PutObjectRetentionRequest & WithRetention(RetentionT &&value)
PutObjectRetentionRequest & WithBucket(BucketT &&value)
PutObjectRetentionRequest & WithKey(KeyT &&value)
const ObjectLockRetention & GetRetention() const
AWS_S3_API PutObjectRetentionRequest()=default
virtual const char * GetServiceRequestName() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectRetentionRequest & WithBypassGovernanceRetention(bool value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
PutObjectRetentionRequest & WithRequestPayer(RequestPayer 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