AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutObjectLockConfigurationRequest.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/ObjectLockConfiguration.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 PutObjectLockConfigurationRequest() = 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 "PutObjectLockConfiguration"; }
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 AWS_S3_API bool ChecksumAlgorithmIsSet() const override;
45 inline bool RequestChecksumRequired() const override { return true; };
46
50 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
51
53
56 inline const Aws::String& GetBucket() const { return m_bucket; }
57 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
58 template <typename BucketT = Aws::String>
59 void SetBucket(BucketT&& value) {
60 m_bucketHasBeenSet = true;
61 m_bucket = std::forward<BucketT>(value);
62 }
63 template <typename BucketT = Aws::String>
65 SetBucket(std::forward<BucketT>(value));
66 return *this;
67 }
69
71
75 inline const ObjectLockConfiguration& GetObjectLockConfiguration() const { return m_objectLockConfiguration; }
76 inline bool ObjectLockConfigurationHasBeenSet() const { return m_objectLockConfigurationHasBeenSet; }
77 template <typename ObjectLockConfigurationT = ObjectLockConfiguration>
78 void SetObjectLockConfiguration(ObjectLockConfigurationT&& value) {
79 m_objectLockConfigurationHasBeenSet = true;
80 m_objectLockConfiguration = std::forward<ObjectLockConfigurationT>(value);
81 }
82 template <typename ObjectLockConfigurationT = ObjectLockConfiguration>
84 SetObjectLockConfiguration(std::forward<ObjectLockConfigurationT>(value));
85 return *this;
86 }
88
90
91 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
92 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
93 inline void SetRequestPayer(RequestPayer value) {
94 m_requestPayerHasBeenSet = true;
95 m_requestPayer = value;
96 }
98 SetRequestPayer(value);
99 return *this;
100 }
102
104
107 inline const Aws::String& GetToken() const { return m_token; }
108 inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
109 template <typename TokenT = Aws::String>
110 void SetToken(TokenT&& value) {
111 m_tokenHasBeenSet = true;
112 m_token = std::forward<TokenT>(value);
113 }
114 template <typename TokenT = Aws::String>
116 SetToken(std::forward<TokenT>(value));
117 return *this;
118 }
120
122
127 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
128 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
129 template <typename ContentMD5T = Aws::String>
130 void SetContentMD5(ContentMD5T&& value) {
131 m_contentMD5HasBeenSet = true;
132 m_contentMD5 = std::forward<ContentMD5T>(value);
133 }
134 template <typename ContentMD5T = Aws::String>
136 SetContentMD5(std::forward<ContentMD5T>(value));
137 return *this;
138 }
140
142
154 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
155 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
157 m_checksumAlgorithmHasBeenSet = true;
158 m_checksumAlgorithm = value;
159 }
162 return *this;
163 }
165
167
172 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
173 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
174 template <typename ExpectedBucketOwnerT = Aws::String>
175 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
176 m_expectedBucketOwnerHasBeenSet = true;
177 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
178 }
179 template <typename ExpectedBucketOwnerT = Aws::String>
181 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
182 return *this;
183 }
185
187
188 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
189 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
190 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
191 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
192 m_customizedAccessLogTagHasBeenSet = true;
193 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
194 }
195 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
197 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
198 return *this;
199 }
200 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
201 PutObjectLockConfigurationRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
202 m_customizedAccessLogTagHasBeenSet = true;
203 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
204 return *this;
205 }
207 private:
208 Aws::String m_bucket;
209
210 ObjectLockConfiguration m_objectLockConfiguration;
211
212 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
213
214 Aws::String m_token;
215
216 Aws::String m_contentMD5;
217
219
220 Aws::String m_expectedBucketOwner;
221
222 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
223 bool m_bucketHasBeenSet = false;
224 bool m_objectLockConfigurationHasBeenSet = false;
225 bool m_requestPayerHasBeenSet = false;
226 bool m_tokenHasBeenSet = false;
227 bool m_contentMD5HasBeenSet = false;
228 bool m_checksumAlgorithmHasBeenSet = false;
229 bool m_expectedBucketOwnerHasBeenSet = false;
230 bool m_customizedAccessLogTagHasBeenSet = false;
231};
232
233} // namespace Model
234} // namespace S3
235} // namespace Aws
PutObjectLockConfigurationRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutObjectLockConfigurationRequest & WithBucket(BucketT &&value)
PutObjectLockConfigurationRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
const ObjectLockConfiguration & GetObjectLockConfiguration() const
PutObjectLockConfigurationRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
PutObjectLockConfigurationRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
AWS_S3_API bool ChecksumAlgorithmIsSet() const override
AWS_S3_API Aws::String SerializePayload() const override
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PutObjectLockConfigurationRequest & WithToken(TokenT &&value)
PutObjectLockConfigurationRequest & WithObjectLockConfiguration(ObjectLockConfigurationT &&value)
PutObjectLockConfigurationRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutObjectLockConfigurationRequest & WithRequestPayer(RequestPayer value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
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