AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
50
52
55 inline const Aws::String& GetBucket() const { return m_bucket; }
56 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
57 template <typename BucketT = Aws::String>
58 void SetBucket(BucketT&& value) {
59 m_bucketHasBeenSet = true;
60 m_bucket = std::forward<BucketT>(value);
61 }
62 template <typename BucketT = Aws::String>
64 SetBucket(std::forward<BucketT>(value));
65 return *this;
66 }
68
70
74 inline const ObjectLockConfiguration& GetObjectLockConfiguration() const { return m_objectLockConfiguration; }
75 inline bool ObjectLockConfigurationHasBeenSet() const { return m_objectLockConfigurationHasBeenSet; }
76 template <typename ObjectLockConfigurationT = ObjectLockConfiguration>
77 void SetObjectLockConfiguration(ObjectLockConfigurationT&& value) {
78 m_objectLockConfigurationHasBeenSet = true;
79 m_objectLockConfiguration = std::forward<ObjectLockConfigurationT>(value);
80 }
81 template <typename ObjectLockConfigurationT = ObjectLockConfiguration>
83 SetObjectLockConfiguration(std::forward<ObjectLockConfigurationT>(value));
84 return *this;
85 }
87
89
90 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
91 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
92 inline void SetRequestPayer(RequestPayer value) {
93 m_requestPayerHasBeenSet = true;
94 m_requestPayer = value;
95 }
97 SetRequestPayer(value);
98 return *this;
99 }
101
103
106 inline const Aws::String& GetToken() const { return m_token; }
107 inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
108 template <typename TokenT = Aws::String>
109 void SetToken(TokenT&& value) {
110 m_tokenHasBeenSet = true;
111 m_token = std::forward<TokenT>(value);
112 }
113 template <typename TokenT = Aws::String>
115 SetToken(std::forward<TokenT>(value));
116 return *this;
117 }
119
121
126 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
127 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
128 template <typename ContentMD5T = Aws::String>
129 void SetContentMD5(ContentMD5T&& value) {
130 m_contentMD5HasBeenSet = true;
131 m_contentMD5 = std::forward<ContentMD5T>(value);
132 }
133 template <typename ContentMD5T = Aws::String>
135 SetContentMD5(std::forward<ContentMD5T>(value));
136 return *this;
137 }
139
141
153 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
154 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
156 m_checksumAlgorithmHasBeenSet = true;
157 m_checksumAlgorithm = value;
158 }
161 return *this;
162 }
164
166
171 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
172 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
173 template <typename ExpectedBucketOwnerT = Aws::String>
174 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
175 m_expectedBucketOwnerHasBeenSet = true;
176 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
177 }
178 template <typename ExpectedBucketOwnerT = Aws::String>
180 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
181 return *this;
182 }
184
186
187 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
188 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
189 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
190 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
191 m_customizedAccessLogTagHasBeenSet = true;
192 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
193 }
194 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
196 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
197 return *this;
198 }
199 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
200 PutObjectLockConfigurationRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
201 m_customizedAccessLogTagHasBeenSet = true;
202 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
203 return *this;
204 }
206 private:
207 Aws::String m_bucket;
208 bool m_bucketHasBeenSet = false;
209
210 ObjectLockConfiguration m_objectLockConfiguration;
211 bool m_objectLockConfigurationHasBeenSet = false;
212
213 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
214 bool m_requestPayerHasBeenSet = false;
215
216 Aws::String m_token;
217 bool m_tokenHasBeenSet = false;
218
219 Aws::String m_contentMD5;
220 bool m_contentMD5HasBeenSet = false;
221
223 bool m_checksumAlgorithmHasBeenSet = false;
224
225 Aws::String m_expectedBucketOwner;
226 bool m_expectedBucketOwnerHasBeenSet = false;
227
228 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
229 bool m_customizedAccessLogTagHasBeenSet = false;
230};
231
232} // namespace Model
233} // namespace S3
234} // 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 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