AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutObjectAclRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/s3/model/ObjectCannedACL.h>
10#include <aws/s3/model/AccessControlPolicy.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/s3/model/ChecksumAlgorithm.h>
13#include <aws/s3/model/RequestPayer.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Http
20{
21 class URI;
22} //namespace Http
23namespace S3
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_S3_API PutObjectAclRequest() = default;
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "PutObjectAcl"; }
40
41 AWS_S3_API Aws::String SerializePayload() const override;
42
43 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
44
46
47 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
48 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
49 inline bool RequestChecksumRequired() const override { return true; };
50
54 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
55
57
62 inline ObjectCannedACL GetACL() const { return m_aCL; }
63 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
64 inline void SetACL(ObjectCannedACL value) { m_aCLHasBeenSet = true; m_aCL = value; }
65 inline PutObjectAclRequest& WithACL(ObjectCannedACL value) { SetACL(value); return *this;}
67
69
73 inline const AccessControlPolicy& GetAccessControlPolicy() const { return m_accessControlPolicy; }
74 inline bool AccessControlPolicyHasBeenSet() const { return m_accessControlPolicyHasBeenSet; }
75 template<typename AccessControlPolicyT = AccessControlPolicy>
76 void SetAccessControlPolicy(AccessControlPolicyT&& value) { m_accessControlPolicyHasBeenSet = true; m_accessControlPolicy = std::forward<AccessControlPolicyT>(value); }
77 template<typename AccessControlPolicyT = AccessControlPolicy>
78 PutObjectAclRequest& WithAccessControlPolicy(AccessControlPolicyT&& value) { SetAccessControlPolicy(std::forward<AccessControlPolicyT>(value)); return *this;}
80
82
107 inline const Aws::String& GetBucket() const { return m_bucket; }
108 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
109 template<typename BucketT = Aws::String>
110 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
111 template<typename BucketT = Aws::String>
112 PutObjectAclRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
114
116
124 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
125 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
126 template<typename ContentMD5T = Aws::String>
127 void SetContentMD5(ContentMD5T&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
128 template<typename ContentMD5T = Aws::String>
129 PutObjectAclRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
131
133
145 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
146 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
147 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
150
152
157 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
158 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
159 template<typename GrantFullControlT = Aws::String>
160 void SetGrantFullControl(GrantFullControlT&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = std::forward<GrantFullControlT>(value); }
161 template<typename GrantFullControlT = Aws::String>
162 PutObjectAclRequest& WithGrantFullControl(GrantFullControlT&& value) { SetGrantFullControl(std::forward<GrantFullControlT>(value)); return *this;}
164
166
170 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
171 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
172 template<typename GrantReadT = Aws::String>
173 void SetGrantRead(GrantReadT&& value) { m_grantReadHasBeenSet = true; m_grantRead = std::forward<GrantReadT>(value); }
174 template<typename GrantReadT = Aws::String>
175 PutObjectAclRequest& WithGrantRead(GrantReadT&& value) { SetGrantRead(std::forward<GrantReadT>(value)); return *this;}
177
179
183 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
184 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
185 template<typename GrantReadACPT = Aws::String>
186 void SetGrantReadACP(GrantReadACPT&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = std::forward<GrantReadACPT>(value); }
187 template<typename GrantReadACPT = Aws::String>
188 PutObjectAclRequest& WithGrantReadACP(GrantReadACPT&& value) { SetGrantReadACP(std::forward<GrantReadACPT>(value)); return *this;}
190
192
197 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
198 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
199 template<typename GrantWriteT = Aws::String>
200 void SetGrantWrite(GrantWriteT&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = std::forward<GrantWriteT>(value); }
201 template<typename GrantWriteT = Aws::String>
202 PutObjectAclRequest& WithGrantWrite(GrantWriteT&& value) { SetGrantWrite(std::forward<GrantWriteT>(value)); return *this;}
204
206
210 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
211 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
212 template<typename GrantWriteACPT = Aws::String>
213 void SetGrantWriteACP(GrantWriteACPT&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = std::forward<GrantWriteACPT>(value); }
214 template<typename GrantWriteACPT = Aws::String>
215 PutObjectAclRequest& WithGrantWriteACP(GrantWriteACPT&& value) { SetGrantWriteACP(std::forward<GrantWriteACPT>(value)); return *this;}
217
219
222 inline const Aws::String& GetKey() const { return m_key; }
223 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
224 template<typename KeyT = Aws::String>
225 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
226 template<typename KeyT = Aws::String>
227 PutObjectAclRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
229
231
232 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
233 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
234 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
235 inline PutObjectAclRequest& WithRequestPayer(RequestPayer value) { SetRequestPayer(value); return *this;}
237
239
243 inline const Aws::String& GetVersionId() const { return m_versionId; }
244 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
245 template<typename VersionIdT = Aws::String>
246 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
247 template<typename VersionIdT = Aws::String>
248 PutObjectAclRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
250
252
257 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
258 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
259 template<typename ExpectedBucketOwnerT = Aws::String>
260 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
261 template<typename ExpectedBucketOwnerT = Aws::String>
262 PutObjectAclRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
264
266
267 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
268 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
269 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
270 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
271 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
272 PutObjectAclRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
273 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
274 PutObjectAclRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
275 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
276 }
278 private:
279
281 bool m_aCLHasBeenSet = false;
282
283 AccessControlPolicy m_accessControlPolicy;
284 bool m_accessControlPolicyHasBeenSet = false;
285
286 Aws::String m_bucket;
287 bool m_bucketHasBeenSet = false;
288
289 Aws::String m_contentMD5;
290 bool m_contentMD5HasBeenSet = false;
291
293 bool m_checksumAlgorithmHasBeenSet = false;
294
295 Aws::String m_grantFullControl;
296 bool m_grantFullControlHasBeenSet = false;
297
298 Aws::String m_grantRead;
299 bool m_grantReadHasBeenSet = false;
300
301 Aws::String m_grantReadACP;
302 bool m_grantReadACPHasBeenSet = false;
303
304 Aws::String m_grantWrite;
305 bool m_grantWriteHasBeenSet = false;
306
307 Aws::String m_grantWriteACP;
308 bool m_grantWriteACPHasBeenSet = false;
309
310 Aws::String m_key;
311 bool m_keyHasBeenSet = false;
312
313 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
314 bool m_requestPayerHasBeenSet = false;
315
316 Aws::String m_versionId;
317 bool m_versionIdHasBeenSet = false;
318
319 Aws::String m_expectedBucketOwner;
320 bool m_expectedBucketOwnerHasBeenSet = false;
321
322 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
323 bool m_customizedAccessLogTagHasBeenSet = false;
324 };
325
326} // namespace Model
327} // namespace S3
328} // namespace Aws
const Aws::String & GetGrantWriteACP() const
PutObjectAclRequest & WithAccessControlPolicy(AccessControlPolicyT &&value)
PutObjectAclRequest & WithGrantWrite(GrantWriteT &&value)
ChecksumAlgorithm GetChecksumAlgorithm() const
PutObjectAclRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetContentMD5(ContentMD5T &&value)
PutObjectAclRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetGrantWrite() const
bool RequestChecksumRequired() const override
void SetGrantWriteACP(GrantWriteACPT &&value)
void SetGrantWrite(GrantWriteT &&value)
void SetGrantFullControl(GrantFullControlT &&value)
PutObjectAclRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetExpectedBucketOwner() const
const Aws::String & GetGrantFullControl() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutObjectAclRequest & WithBucket(BucketT &&value)
PutObjectAclRequest & WithGrantReadACP(GrantReadACPT &&value)
void SetGrantReadACP(GrantReadACPT &&value)
PutObjectAclRequest & WithRequestPayer(RequestPayer value)
const Aws::String & GetBucket() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API PutObjectAclRequest()=default
void SetChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
const AccessControlPolicy & GetAccessControlPolicy() const
virtual const char * GetServiceRequestName() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutObjectAclRequest & WithGrantWriteACP(GrantWriteACPT &&value)
void SetAccessControlPolicy(AccessControlPolicyT &&value)
PutObjectAclRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectAclRequest & WithGrantRead(GrantReadT &&value)
PutObjectAclRequest & WithKey(KeyT &&value)
const Aws::String & GetVersionId() const
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
void SetACL(ObjectCannedACL value)
PutObjectAclRequest & WithGrantFullControl(GrantFullControlT &&value)
PutObjectAclRequest & WithContentMD5(ContentMD5T &&value)
const Aws::String & GetGrantReadACP() const
PutObjectAclRequest & WithACL(ObjectCannedACL value)
const Aws::String & GetGrantRead() const
const Aws::String & GetContentMD5() const
PutObjectAclRequest & WithVersionId(VersionIdT &&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