AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
DeleteObjectRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3/S3Request.h>
11#include <aws/s3/S3_EXPORTS.h>
12#include <aws/s3/model/RequestPayer.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3 {
21namespace Model {
22
26 public:
27 AWS_S3_API DeleteObjectRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "DeleteObject"; }
34
35 AWS_S3_API Aws::String SerializePayload() const override;
36
37 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
45 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
46
48
83 inline const Aws::String& GetBucket() const { return m_bucket; }
84 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
85 template <typename BucketT = Aws::String>
86 void SetBucket(BucketT&& value) {
87 m_bucketHasBeenSet = true;
88 m_bucket = std::forward<BucketT>(value);
89 }
90 template <typename BucketT = Aws::String>
91 DeleteObjectRequest& WithBucket(BucketT&& value) {
92 SetBucket(std::forward<BucketT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::String& GetKey() const { return m_key; }
102 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
103 template <typename KeyT = Aws::String>
104 void SetKey(KeyT&& value) {
105 m_keyHasBeenSet = true;
106 m_key = std::forward<KeyT>(value);
107 }
108 template <typename KeyT = Aws::String>
110 SetKey(std::forward<KeyT>(value));
111 return *this;
112 }
114
116
123 inline const Aws::String& GetMFA() const { return m_mFA; }
124 inline bool MFAHasBeenSet() const { return m_mFAHasBeenSet; }
125 template <typename MFAT = Aws::String>
126 void SetMFA(MFAT&& value) {
127 m_mFAHasBeenSet = true;
128 m_mFA = std::forward<MFAT>(value);
129 }
130 template <typename MFAT = Aws::String>
132 SetMFA(std::forward<MFAT>(value));
133 return *this;
134 }
136
138
143 inline const Aws::String& GetVersionId() const { return m_versionId; }
144 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
145 template <typename VersionIdT = Aws::String>
146 void SetVersionId(VersionIdT&& value) {
147 m_versionIdHasBeenSet = true;
148 m_versionId = std::forward<VersionIdT>(value);
149 }
150 template <typename VersionIdT = Aws::String>
151 DeleteObjectRequest& WithVersionId(VersionIdT&& value) {
152 SetVersionId(std::forward<VersionIdT>(value));
153 return *this;
154 }
156
158
159 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
160 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
161 inline void SetRequestPayer(RequestPayer value) {
162 m_requestPayerHasBeenSet = true;
163 m_requestPayer = value;
164 }
166 SetRequestPayer(value);
167 return *this;
168 }
170
172
178 inline bool GetBypassGovernanceRetention() const { return m_bypassGovernanceRetention; }
179 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
180 inline void SetBypassGovernanceRetention(bool value) {
181 m_bypassGovernanceRetentionHasBeenSet = true;
182 m_bypassGovernanceRetention = value;
183 }
186 return *this;
187 }
189
191
196 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
197 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
198 template <typename ExpectedBucketOwnerT = Aws::String>
199 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
200 m_expectedBucketOwnerHasBeenSet = true;
201 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
202 }
203 template <typename ExpectedBucketOwnerT = Aws::String>
204 DeleteObjectRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
205 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
206 return *this;
207 }
209
211
220 inline const Aws::String& GetIfMatch() const { return m_ifMatch; }
221 inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; }
222 template <typename IfMatchT = Aws::String>
223 void SetIfMatch(IfMatchT&& value) {
224 m_ifMatchHasBeenSet = true;
225 m_ifMatch = std::forward<IfMatchT>(value);
226 }
227 template <typename IfMatchT = Aws::String>
228 DeleteObjectRequest& WithIfMatch(IfMatchT&& value) {
229 SetIfMatch(std::forward<IfMatchT>(value));
230 return *this;
231 }
233
235
243 inline const Aws::Utils::DateTime& GetIfMatchLastModifiedTime() const { return m_ifMatchLastModifiedTime; }
244 inline bool IfMatchLastModifiedTimeHasBeenSet() const { return m_ifMatchLastModifiedTimeHasBeenSet; }
245 template <typename IfMatchLastModifiedTimeT = Aws::Utils::DateTime>
246 void SetIfMatchLastModifiedTime(IfMatchLastModifiedTimeT&& value) {
247 m_ifMatchLastModifiedTimeHasBeenSet = true;
248 m_ifMatchLastModifiedTime = std::forward<IfMatchLastModifiedTimeT>(value);
249 }
250 template <typename IfMatchLastModifiedTimeT = Aws::Utils::DateTime>
251 DeleteObjectRequest& WithIfMatchLastModifiedTime(IfMatchLastModifiedTimeT&& value) {
252 SetIfMatchLastModifiedTime(std::forward<IfMatchLastModifiedTimeT>(value));
253 return *this;
254 }
256
258
269 inline long long GetIfMatchSize() const { return m_ifMatchSize; }
270 inline bool IfMatchSizeHasBeenSet() const { return m_ifMatchSizeHasBeenSet; }
271 inline void SetIfMatchSize(long long value) {
272 m_ifMatchSizeHasBeenSet = true;
273 m_ifMatchSize = value;
274 }
275 inline DeleteObjectRequest& WithIfMatchSize(long long value) {
276 SetIfMatchSize(value);
277 return *this;
278 }
280
282
283 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
284 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
285 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
286 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
287 m_customizedAccessLogTagHasBeenSet = true;
288 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
289 }
290 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
291 DeleteObjectRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
292 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
293 return *this;
294 }
295 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
296 DeleteObjectRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
297 m_customizedAccessLogTagHasBeenSet = true;
298 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
299 return *this;
300 }
302 private:
303 Aws::String m_bucket;
304 bool m_bucketHasBeenSet = false;
305
306 Aws::String m_key;
307 bool m_keyHasBeenSet = false;
308
309 Aws::String m_mFA;
310 bool m_mFAHasBeenSet = false;
311
312 Aws::String m_versionId;
313 bool m_versionIdHasBeenSet = false;
314
315 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
316 bool m_requestPayerHasBeenSet = false;
317
318 bool m_bypassGovernanceRetention{false};
319 bool m_bypassGovernanceRetentionHasBeenSet = false;
320
321 Aws::String m_expectedBucketOwner;
322 bool m_expectedBucketOwnerHasBeenSet = false;
323
324 Aws::String m_ifMatch;
325 bool m_ifMatchHasBeenSet = false;
326
327 Aws::Utils::DateTime m_ifMatchLastModifiedTime{};
328 bool m_ifMatchLastModifiedTimeHasBeenSet = false;
329
330 long long m_ifMatchSize{0};
331 bool m_ifMatchSizeHasBeenSet = false;
332
333 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
334 bool m_customizedAccessLogTagHasBeenSet = false;
335};
336
337} // namespace Model
338} // namespace S3
339} // namespace Aws
const Aws::Utils::DateTime & GetIfMatchLastModifiedTime() const
DeleteObjectRequest & WithBucket(BucketT &&value)
AWS_S3_API DeleteObjectRequest()=default
DeleteObjectRequest & WithVersionId(VersionIdT &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
DeleteObjectRequest & WithRequestPayer(RequestPayer value)
const Aws::String & GetExpectedBucketOwner() const
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetBucket() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
void SetIfMatchLastModifiedTime(IfMatchLastModifiedTimeT &&value)
DeleteObjectRequest & WithBypassGovernanceRetention(bool value)
DeleteObjectRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
DeleteObjectRequest & WithIfMatchLastModifiedTime(IfMatchLastModifiedTimeT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetVersionId() const
DeleteObjectRequest & WithMFA(MFAT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
const Aws::String & GetIfMatch() const
DeleteObjectRequest & WithKey(KeyT &&value)
DeleteObjectRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
DeleteObjectRequest & WithIfMatch(IfMatchT &&value)
DeleteObjectRequest & WithIfMatchSize(long long value)
AWS_S3_API Aws::String SerializePayload() const override
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
DeleteObjectRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
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