AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
DeleteObjectRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3/model/RequestPayer.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Http
18{
19 class URI;
20} //namespace Http
21namespace S3
22{
23namespace Model
24{
25
29 {
30 public:
31 AWS_S3_API DeleteObjectRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "DeleteObject"; }
38
39 AWS_S3_API Aws::String SerializePayload() const override;
40
41 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42
44
45 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
49 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
50
52
87 inline const Aws::String& GetBucket() const { return m_bucket; }
88 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
89 template<typename BucketT = Aws::String>
90 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
91 template<typename BucketT = Aws::String>
92 DeleteObjectRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
94
96
99 inline const Aws::String& GetKey() const { return m_key; }
100 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
101 template<typename KeyT = Aws::String>
102 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
103 template<typename KeyT = Aws::String>
104 DeleteObjectRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
106
108
115 inline const Aws::String& GetMFA() const { return m_mFA; }
116 inline bool MFAHasBeenSet() const { return m_mFAHasBeenSet; }
117 template<typename MFAT = Aws::String>
118 void SetMFA(MFAT&& value) { m_mFAHasBeenSet = true; m_mFA = std::forward<MFAT>(value); }
119 template<typename MFAT = Aws::String>
120 DeleteObjectRequest& WithMFA(MFAT&& value) { SetMFA(std::forward<MFAT>(value)); return *this;}
122
124
129 inline const Aws::String& GetVersionId() const { return m_versionId; }
130 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
131 template<typename VersionIdT = Aws::String>
132 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
133 template<typename VersionIdT = Aws::String>
134 DeleteObjectRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
136
138
139 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
140 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
141 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
142 inline DeleteObjectRequest& WithRequestPayer(RequestPayer value) { SetRequestPayer(value); return *this;}
144
146
152 inline bool GetBypassGovernanceRetention() const { return m_bypassGovernanceRetention; }
153 inline bool BypassGovernanceRetentionHasBeenSet() const { return m_bypassGovernanceRetentionHasBeenSet; }
154 inline void SetBypassGovernanceRetention(bool value) { m_bypassGovernanceRetentionHasBeenSet = true; m_bypassGovernanceRetention = value; }
157
159
164 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
165 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
166 template<typename ExpectedBucketOwnerT = Aws::String>
167 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
168 template<typename ExpectedBucketOwnerT = Aws::String>
169 DeleteObjectRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
171
173
182 inline const Aws::String& GetIfMatch() const { return m_ifMatch; }
183 inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; }
184 template<typename IfMatchT = Aws::String>
185 void SetIfMatch(IfMatchT&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = std::forward<IfMatchT>(value); }
186 template<typename IfMatchT = Aws::String>
187 DeleteObjectRequest& WithIfMatch(IfMatchT&& value) { SetIfMatch(std::forward<IfMatchT>(value)); return *this;}
189
191
199 inline const Aws::Utils::DateTime& GetIfMatchLastModifiedTime() const { return m_ifMatchLastModifiedTime; }
200 inline bool IfMatchLastModifiedTimeHasBeenSet() const { return m_ifMatchLastModifiedTimeHasBeenSet; }
201 template<typename IfMatchLastModifiedTimeT = Aws::Utils::DateTime>
202 void SetIfMatchLastModifiedTime(IfMatchLastModifiedTimeT&& value) { m_ifMatchLastModifiedTimeHasBeenSet = true; m_ifMatchLastModifiedTime = std::forward<IfMatchLastModifiedTimeT>(value); }
203 template<typename IfMatchLastModifiedTimeT = Aws::Utils::DateTime>
204 DeleteObjectRequest& WithIfMatchLastModifiedTime(IfMatchLastModifiedTimeT&& value) { SetIfMatchLastModifiedTime(std::forward<IfMatchLastModifiedTimeT>(value)); return *this;}
206
208
219 inline long long GetIfMatchSize() const { return m_ifMatchSize; }
220 inline bool IfMatchSizeHasBeenSet() const { return m_ifMatchSizeHasBeenSet; }
221 inline void SetIfMatchSize(long long value) { m_ifMatchSizeHasBeenSet = true; m_ifMatchSize = value; }
222 inline DeleteObjectRequest& WithIfMatchSize(long long value) { SetIfMatchSize(value); return *this;}
224
226
227 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
228 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
229 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
230 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
231 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
232 DeleteObjectRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
233 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
234 DeleteObjectRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
235 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
236 }
238 private:
239
240 Aws::String m_bucket;
241 bool m_bucketHasBeenSet = false;
242
243 Aws::String m_key;
244 bool m_keyHasBeenSet = false;
245
246 Aws::String m_mFA;
247 bool m_mFAHasBeenSet = false;
248
249 Aws::String m_versionId;
250 bool m_versionIdHasBeenSet = false;
251
252 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
253 bool m_requestPayerHasBeenSet = false;
254
255 bool m_bypassGovernanceRetention{false};
256 bool m_bypassGovernanceRetentionHasBeenSet = false;
257
258 Aws::String m_expectedBucketOwner;
259 bool m_expectedBucketOwnerHasBeenSet = false;
260
261 Aws::String m_ifMatch;
262 bool m_ifMatchHasBeenSet = false;
263
264 Aws::Utils::DateTime m_ifMatchLastModifiedTime{};
265 bool m_ifMatchLastModifiedTimeHasBeenSet = false;
266
267 long long m_ifMatchSize{0};
268 bool m_ifMatchSizeHasBeenSet = false;
269
270 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
271 bool m_customizedAccessLogTagHasBeenSet = false;
272 };
273
274} // namespace Model
275} // namespace S3
276} // 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 & GetKey() const
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: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