AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
PutObjectLegalHoldRequest.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/ObjectLockLegalHold.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 PutObjectLegalHoldRequest() = 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 "PutObjectLegalHold"; }
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
86 inline const Aws::String& GetKey() const { return m_key; }
87 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
88 template <typename KeyT = Aws::String>
89 void SetKey(KeyT&& value) {
90 m_keyHasBeenSet = true;
91 m_key = std::forward<KeyT>(value);
92 }
93 template <typename KeyT = Aws::String>
95 SetKey(std::forward<KeyT>(value));
96 return *this;
97 }
99
101
105 inline const ObjectLockLegalHold& GetLegalHold() const { return m_legalHold; }
106 inline bool LegalHoldHasBeenSet() const { return m_legalHoldHasBeenSet; }
107 template <typename LegalHoldT = ObjectLockLegalHold>
108 void SetLegalHold(LegalHoldT&& value) {
109 m_legalHoldHasBeenSet = true;
110 m_legalHold = std::forward<LegalHoldT>(value);
111 }
112 template <typename LegalHoldT = ObjectLockLegalHold>
114 SetLegalHold(std::forward<LegalHoldT>(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
137 inline const Aws::String& GetVersionId() const { return m_versionId; }
138 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
139 template <typename VersionIdT = Aws::String>
140 void SetVersionId(VersionIdT&& value) {
141 m_versionIdHasBeenSet = true;
142 m_versionId = std::forward<VersionIdT>(value);
143 }
144 template <typename VersionIdT = Aws::String>
146 SetVersionId(std::forward<VersionIdT>(value));
147 return *this;
148 }
150
152
157 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
158 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
159 template <typename ContentMD5T = Aws::String>
160 void SetContentMD5(ContentMD5T&& value) {
161 m_contentMD5HasBeenSet = true;
162 m_contentMD5 = std::forward<ContentMD5T>(value);
163 }
164 template <typename ContentMD5T = Aws::String>
166 SetContentMD5(std::forward<ContentMD5T>(value));
167 return *this;
168 }
170
172
184 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
185 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
187 m_checksumAlgorithmHasBeenSet = true;
188 m_checksumAlgorithm = value;
189 }
192 return *this;
193 }
195
197
202 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
203 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
204 template <typename ExpectedBucketOwnerT = Aws::String>
205 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
206 m_expectedBucketOwnerHasBeenSet = true;
207 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
208 }
209 template <typename ExpectedBucketOwnerT = Aws::String>
210 PutObjectLegalHoldRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
211 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
212 return *this;
213 }
215
217
218 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
219 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
220 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
221 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
222 m_customizedAccessLogTagHasBeenSet = true;
223 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
224 }
225 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
226 PutObjectLegalHoldRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
227 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
228 return *this;
229 }
230 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
231 PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
232 m_customizedAccessLogTagHasBeenSet = true;
233 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
234 return *this;
235 }
237 private:
238 Aws::String m_bucket;
239 bool m_bucketHasBeenSet = false;
240
241 Aws::String m_key;
242 bool m_keyHasBeenSet = false;
243
244 ObjectLockLegalHold m_legalHold;
245 bool m_legalHoldHasBeenSet = false;
246
247 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
248 bool m_requestPayerHasBeenSet = false;
249
250 Aws::String m_versionId;
251 bool m_versionIdHasBeenSet = false;
252
253 Aws::String m_contentMD5;
254 bool m_contentMD5HasBeenSet = false;
255
257 bool m_checksumAlgorithmHasBeenSet = false;
258
259 Aws::String m_expectedBucketOwner;
260 bool m_expectedBucketOwnerHasBeenSet = false;
261
262 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
263 bool m_customizedAccessLogTagHasBeenSet = false;
264};
265
266} // namespace Model
267} // namespace S3
268} // namespace Aws
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