AWS SDK for C++

AWS SDK for C++ Version 1.11.844

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-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/ObjectLockLegalHold.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 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_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
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
106 inline const ObjectLockLegalHold& GetLegalHold() const { return m_legalHold; }
107 inline bool LegalHoldHasBeenSet() const { return m_legalHoldHasBeenSet; }
108 template <typename LegalHoldT = ObjectLockLegalHold>
109 void SetLegalHold(LegalHoldT&& value) {
110 m_legalHoldHasBeenSet = true;
111 m_legalHold = std::forward<LegalHoldT>(value);
112 }
113 template <typename LegalHoldT = ObjectLockLegalHold>
115 SetLegalHold(std::forward<LegalHoldT>(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
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
158 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
159 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
160 template <typename ContentMD5T = Aws::String>
161 void SetContentMD5(ContentMD5T&& value) {
162 m_contentMD5HasBeenSet = true;
163 m_contentMD5 = std::forward<ContentMD5T>(value);
164 }
165 template <typename ContentMD5T = Aws::String>
167 SetContentMD5(std::forward<ContentMD5T>(value));
168 return *this;
169 }
171
173
185 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
186 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
188 m_checksumAlgorithmHasBeenSet = true;
189 m_checksumAlgorithm = value;
190 }
193 return *this;
194 }
196
198
203 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
204 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
205 template <typename ExpectedBucketOwnerT = Aws::String>
206 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
207 m_expectedBucketOwnerHasBeenSet = true;
208 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
209 }
210 template <typename ExpectedBucketOwnerT = Aws::String>
211 PutObjectLegalHoldRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
212 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
213 return *this;
214 }
216
218
219 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
220 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
221 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
222 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
223 m_customizedAccessLogTagHasBeenSet = true;
224 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
225 }
226 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
227 PutObjectLegalHoldRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
228 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
229 return *this;
230 }
231 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
232 PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
233 m_customizedAccessLogTagHasBeenSet = true;
234 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
235 return *this;
236 }
238 private:
239 Aws::String m_bucket;
240
241 Aws::String m_key;
242
243 ObjectLockLegalHold m_legalHold;
244
245 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
246
247 Aws::String m_versionId;
248
249 Aws::String m_contentMD5;
250
252
253 Aws::String m_expectedBucketOwner;
254
255 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
256 bool m_bucketHasBeenSet = false;
257 bool m_keyHasBeenSet = false;
258 bool m_legalHoldHasBeenSet = false;
259 bool m_requestPayerHasBeenSet = false;
260 bool m_versionIdHasBeenSet = false;
261 bool m_contentMD5HasBeenSet = false;
262 bool m_checksumAlgorithmHasBeenSet = false;
263 bool m_expectedBucketOwnerHasBeenSet = false;
264 bool m_customizedAccessLogTagHasBeenSet = false;
265};
266
267} // namespace Model
268} // namespace S3Crt
269} // namespace Aws
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