AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutObjectRetentionRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3/model/ObjectLockRetention.h>
11#include <aws/s3/model/RequestPayer.h>
12#include <aws/s3/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 S3
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_S3_API PutObjectRetentionRequest() = default;
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_S3_API Aws::String SerializePayload() const override;
41
42 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
45
46 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
47 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
48 inline bool RequestChecksumRequired() const override { return true; };
49
53 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
54
56
72 inline const Aws::String& GetBucket() const { return m_bucket; }
73 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
74 template<typename BucketT = Aws::String>
75 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
76 template<typename BucketT = Aws::String>
77 PutObjectRetentionRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
79
81
85 inline const Aws::String& GetKey() const { return m_key; }
86 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
87 template<typename KeyT = Aws::String>
88 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
89 template<typename KeyT = Aws::String>
90 PutObjectRetentionRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
92
94
97 inline const ObjectLockRetention& GetRetention() const { return m_retention; }
98 inline bool RetentionHasBeenSet() const { return m_retentionHasBeenSet; }
99 template<typename RetentionT = ObjectLockRetention>
100 void SetRetention(RetentionT&& value) { m_retentionHasBeenSet = true; m_retention = std::forward<RetentionT>(value); }
101 template<typename RetentionT = ObjectLockRetention>
102 PutObjectRetentionRequest& WithRetention(RetentionT&& value) { SetRetention(std::forward<RetentionT>(value)); return *this;}
104
106
107 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
108 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
109 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
112
114
118 inline const Aws::String& GetVersionId() const { return m_versionId; }
119 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
120 template<typename VersionIdT = Aws::String>
121 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
122 template<typename VersionIdT = Aws::String>
123 PutObjectRetentionRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
125
127
130 inline bool GetBypassGovernanceRetention() const { return m_bypassGovernanceRetention; }
131 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
132 inline void SetBypassGovernanceRetention(bool value) { m_bypassGovernanceRetentionHasBeenSet = true; m_bypassGovernanceRetention = value; }
135
137
142 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
143 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
144 template<typename ContentMD5T = Aws::String>
145 void SetContentMD5(ContentMD5T&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
146 template<typename ContentMD5T = Aws::String>
147 PutObjectRetentionRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
149
151
163 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
164 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
165 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
168
170
175 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
176 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
177 template<typename ExpectedBucketOwnerT = Aws::String>
178 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
179 template<typename ExpectedBucketOwnerT = Aws::String>
180 PutObjectRetentionRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
182
184
185 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
186 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
187 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
188 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
189 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
190 PutObjectRetentionRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
191 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
192 PutObjectRetentionRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
193 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
194 }
196 private:
197
198 Aws::String m_bucket;
199 bool m_bucketHasBeenSet = false;
200
201 Aws::String m_key;
202 bool m_keyHasBeenSet = false;
203
204 ObjectLockRetention m_retention;
205 bool m_retentionHasBeenSet = false;
206
207 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
208 bool m_requestPayerHasBeenSet = false;
209
210 Aws::String m_versionId;
211 bool m_versionIdHasBeenSet = false;
212
213 bool m_bypassGovernanceRetention{false};
214 bool m_bypassGovernanceRetentionHasBeenSet = false;
215
216 Aws::String m_contentMD5;
217 bool m_contentMD5HasBeenSet = false;
218
220 bool m_checksumAlgorithmHasBeenSet = false;
221
222 Aws::String m_expectedBucketOwner;
223 bool m_expectedBucketOwnerHasBeenSet = false;
224
225 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
226 bool m_customizedAccessLogTagHasBeenSet = false;
227 };
228
229} // namespace Model
230} // namespace S3
231} // 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: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_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String