AWS SDK for C++

AWS SDK for C++ Version 1.11.605

Loading...
Searching...
No Matches
HeadObjectRequest.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/core/utils/DateTime.h>
11#include <aws/s3/model/RequestPayer.h>
12#include <aws/s3/model/ChecksumMode.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace S3
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_S3_API HeadObjectRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "HeadObject"; }
39
40 AWS_S3_API Aws::String SerializePayload() const override;
41
42 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
45
46 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
50 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
51
53
88 inline const Aws::String& GetBucket() const { return m_bucket; }
89 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
90 template<typename BucketT = Aws::String>
91 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
92 template<typename BucketT = Aws::String>
93 HeadObjectRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
95
97
108 inline const Aws::String& GetIfMatch() const { return m_ifMatch; }
109 inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; }
110 template<typename IfMatchT = Aws::String>
111 void SetIfMatch(IfMatchT&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = std::forward<IfMatchT>(value); }
112 template<typename IfMatchT = Aws::String>
113 HeadObjectRequest& WithIfMatch(IfMatchT&& value) { SetIfMatch(std::forward<IfMatchT>(value)); return *this;}
115
117
128 inline const Aws::Utils::DateTime& GetIfModifiedSince() const { return m_ifModifiedSince; }
129 inline bool IfModifiedSinceHasBeenSet() const { return m_ifModifiedSinceHasBeenSet; }
130 template<typename IfModifiedSinceT = Aws::Utils::DateTime>
131 void SetIfModifiedSince(IfModifiedSinceT&& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = std::forward<IfModifiedSinceT>(value); }
132 template<typename IfModifiedSinceT = Aws::Utils::DateTime>
133 HeadObjectRequest& WithIfModifiedSince(IfModifiedSinceT&& value) { SetIfModifiedSince(std::forward<IfModifiedSinceT>(value)); return *this;}
135
137
148 inline const Aws::String& GetIfNoneMatch() const { return m_ifNoneMatch; }
149 inline bool IfNoneMatchHasBeenSet() const { return m_ifNoneMatchHasBeenSet; }
150 template<typename IfNoneMatchT = Aws::String>
151 void SetIfNoneMatch(IfNoneMatchT&& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = std::forward<IfNoneMatchT>(value); }
152 template<typename IfNoneMatchT = Aws::String>
153 HeadObjectRequest& WithIfNoneMatch(IfNoneMatchT&& value) { SetIfNoneMatch(std::forward<IfNoneMatchT>(value)); return *this;}
155
157
168 inline const Aws::Utils::DateTime& GetIfUnmodifiedSince() const { return m_ifUnmodifiedSince; }
169 inline bool IfUnmodifiedSinceHasBeenSet() const { return m_ifUnmodifiedSinceHasBeenSet; }
170 template<typename IfUnmodifiedSinceT = Aws::Utils::DateTime>
171 void SetIfUnmodifiedSince(IfUnmodifiedSinceT&& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = std::forward<IfUnmodifiedSinceT>(value); }
172 template<typename IfUnmodifiedSinceT = Aws::Utils::DateTime>
173 HeadObjectRequest& WithIfUnmodifiedSince(IfUnmodifiedSinceT&& value) { SetIfUnmodifiedSince(std::forward<IfUnmodifiedSinceT>(value)); return *this;}
175
177
180 inline const Aws::String& GetKey() const { return m_key; }
181 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
182 template<typename KeyT = Aws::String>
183 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
184 template<typename KeyT = Aws::String>
185 HeadObjectRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
187
189
195 inline const Aws::String& GetRange() const { return m_range; }
196 inline bool RangeHasBeenSet() const { return m_rangeHasBeenSet; }
197 template<typename RangeT = Aws::String>
198 void SetRange(RangeT&& value) { m_rangeHasBeenSet = true; m_range = std::forward<RangeT>(value); }
199 template<typename RangeT = Aws::String>
200 HeadObjectRequest& WithRange(RangeT&& value) { SetRange(std::forward<RangeT>(value)); return *this;}
202
204
207 inline const Aws::String& GetResponseCacheControl() const { return m_responseCacheControl; }
208 inline bool ResponseCacheControlHasBeenSet() const { return m_responseCacheControlHasBeenSet; }
209 template<typename ResponseCacheControlT = Aws::String>
210 void SetResponseCacheControl(ResponseCacheControlT&& value) { m_responseCacheControlHasBeenSet = true; m_responseCacheControl = std::forward<ResponseCacheControlT>(value); }
211 template<typename ResponseCacheControlT = Aws::String>
212 HeadObjectRequest& WithResponseCacheControl(ResponseCacheControlT&& value) { SetResponseCacheControl(std::forward<ResponseCacheControlT>(value)); return *this;}
214
216
219 inline const Aws::String& GetResponseContentDisposition() const { return m_responseContentDisposition; }
220 inline bool ResponseContentDispositionHasBeenSet() const { return m_responseContentDispositionHasBeenSet; }
221 template<typename ResponseContentDispositionT = Aws::String>
222 void SetResponseContentDisposition(ResponseContentDispositionT&& value) { m_responseContentDispositionHasBeenSet = true; m_responseContentDisposition = std::forward<ResponseContentDispositionT>(value); }
223 template<typename ResponseContentDispositionT = Aws::String>
224 HeadObjectRequest& WithResponseContentDisposition(ResponseContentDispositionT&& value) { SetResponseContentDisposition(std::forward<ResponseContentDispositionT>(value)); return *this;}
226
228
231 inline const Aws::String& GetResponseContentEncoding() const { return m_responseContentEncoding; }
232 inline bool ResponseContentEncodingHasBeenSet() const { return m_responseContentEncodingHasBeenSet; }
233 template<typename ResponseContentEncodingT = Aws::String>
234 void SetResponseContentEncoding(ResponseContentEncodingT&& value) { m_responseContentEncodingHasBeenSet = true; m_responseContentEncoding = std::forward<ResponseContentEncodingT>(value); }
235 template<typename ResponseContentEncodingT = Aws::String>
236 HeadObjectRequest& WithResponseContentEncoding(ResponseContentEncodingT&& value) { SetResponseContentEncoding(std::forward<ResponseContentEncodingT>(value)); return *this;}
238
240
243 inline const Aws::String& GetResponseContentLanguage() const { return m_responseContentLanguage; }
244 inline bool ResponseContentLanguageHasBeenSet() const { return m_responseContentLanguageHasBeenSet; }
245 template<typename ResponseContentLanguageT = Aws::String>
246 void SetResponseContentLanguage(ResponseContentLanguageT&& value) { m_responseContentLanguageHasBeenSet = true; m_responseContentLanguage = std::forward<ResponseContentLanguageT>(value); }
247 template<typename ResponseContentLanguageT = Aws::String>
248 HeadObjectRequest& WithResponseContentLanguage(ResponseContentLanguageT&& value) { SetResponseContentLanguage(std::forward<ResponseContentLanguageT>(value)); return *this;}
250
252
255 inline const Aws::String& GetResponseContentType() const { return m_responseContentType; }
256 inline bool ResponseContentTypeHasBeenSet() const { return m_responseContentTypeHasBeenSet; }
257 template<typename ResponseContentTypeT = Aws::String>
258 void SetResponseContentType(ResponseContentTypeT&& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = std::forward<ResponseContentTypeT>(value); }
259 template<typename ResponseContentTypeT = Aws::String>
260 HeadObjectRequest& WithResponseContentType(ResponseContentTypeT&& value) { SetResponseContentType(std::forward<ResponseContentTypeT>(value)); return *this;}
262
264
267 inline const Aws::Utils::DateTime& GetResponseExpires() const { return m_responseExpires; }
268 inline bool ResponseExpiresHasBeenSet() const { return m_responseExpiresHasBeenSet; }
269 template<typename ResponseExpiresT = Aws::Utils::DateTime>
270 void SetResponseExpires(ResponseExpiresT&& value) { m_responseExpiresHasBeenSet = true; m_responseExpires = std::forward<ResponseExpiresT>(value); }
271 template<typename ResponseExpiresT = Aws::Utils::DateTime>
272 HeadObjectRequest& WithResponseExpires(ResponseExpiresT&& value) { SetResponseExpires(std::forward<ResponseExpiresT>(value)); return *this;}
274
276
281 inline const Aws::String& GetVersionId() const { return m_versionId; }
282 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
283 template<typename VersionIdT = Aws::String>
284 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
285 template<typename VersionIdT = Aws::String>
286 HeadObjectRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
288
290
295 inline const Aws::String& GetSSECustomerAlgorithm() const { return m_sSECustomerAlgorithm; }
296 inline bool SSECustomerAlgorithmHasBeenSet() const { return m_sSECustomerAlgorithmHasBeenSet; }
297 template<typename SSECustomerAlgorithmT = Aws::String>
298 void SetSSECustomerAlgorithm(SSECustomerAlgorithmT&& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = std::forward<SSECustomerAlgorithmT>(value); }
299 template<typename SSECustomerAlgorithmT = Aws::String>
300 HeadObjectRequest& WithSSECustomerAlgorithm(SSECustomerAlgorithmT&& value) { SetSSECustomerAlgorithm(std::forward<SSECustomerAlgorithmT>(value)); return *this;}
302
304
312 inline const Aws::String& GetSSECustomerKey() const { return m_sSECustomerKey; }
313 inline bool SSECustomerKeyHasBeenSet() const { return m_sSECustomerKeyHasBeenSet; }
314 template<typename SSECustomerKeyT = Aws::String>
315 void SetSSECustomerKey(SSECustomerKeyT&& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = std::forward<SSECustomerKeyT>(value); }
316 template<typename SSECustomerKeyT = Aws::String>
317 HeadObjectRequest& WithSSECustomerKey(SSECustomerKeyT&& value) { SetSSECustomerKey(std::forward<SSECustomerKeyT>(value)); return *this;}
319
321
327 inline const Aws::String& GetSSECustomerKeyMD5() const { return m_sSECustomerKeyMD5; }
328 inline bool SSECustomerKeyMD5HasBeenSet() const { return m_sSECustomerKeyMD5HasBeenSet; }
329 template<typename SSECustomerKeyMD5T = Aws::String>
330 void SetSSECustomerKeyMD5(SSECustomerKeyMD5T&& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = std::forward<SSECustomerKeyMD5T>(value); }
331 template<typename SSECustomerKeyMD5T = Aws::String>
332 HeadObjectRequest& WithSSECustomerKeyMD5(SSECustomerKeyMD5T&& value) { SetSSECustomerKeyMD5(std::forward<SSECustomerKeyMD5T>(value)); return *this;}
334
336
337 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
338 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
339 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
340 inline HeadObjectRequest& WithRequestPayer(RequestPayer value) { SetRequestPayer(value); return *this;}
342
344
350 inline int GetPartNumber() const { return m_partNumber; }
351 inline bool PartNumberHasBeenSet() const { return m_partNumberHasBeenSet; }
352 inline void SetPartNumber(int value) { m_partNumberHasBeenSet = true; m_partNumber = value; }
353 inline HeadObjectRequest& WithPartNumber(int value) { SetPartNumber(value); return *this;}
355
357
362 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
363 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
364 template<typename ExpectedBucketOwnerT = Aws::String>
365 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
366 template<typename ExpectedBucketOwnerT = Aws::String>
367 HeadObjectRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
369
371
384 inline ChecksumMode GetChecksumMode() const { return m_checksumMode; }
385 inline bool ChecksumModeHasBeenSet() const { return m_checksumModeHasBeenSet; }
386 inline void SetChecksumMode(ChecksumMode value) { m_checksumModeHasBeenSet = true; m_checksumMode = value; }
387 inline HeadObjectRequest& WithChecksumMode(ChecksumMode value) { SetChecksumMode(value); return *this;}
389
391
392 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
393 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
394 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
395 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
396 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
397 HeadObjectRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
398 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
399 HeadObjectRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
400 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
401 }
403 private:
404
405 Aws::String m_bucket;
406 bool m_bucketHasBeenSet = false;
407
408 Aws::String m_ifMatch;
409 bool m_ifMatchHasBeenSet = false;
410
411 Aws::Utils::DateTime m_ifModifiedSince{};
412 bool m_ifModifiedSinceHasBeenSet = false;
413
414 Aws::String m_ifNoneMatch;
415 bool m_ifNoneMatchHasBeenSet = false;
416
417 Aws::Utils::DateTime m_ifUnmodifiedSince{};
418 bool m_ifUnmodifiedSinceHasBeenSet = false;
419
420 Aws::String m_key;
421 bool m_keyHasBeenSet = false;
422
423 Aws::String m_range;
424 bool m_rangeHasBeenSet = false;
425
426 Aws::String m_responseCacheControl;
427 bool m_responseCacheControlHasBeenSet = false;
428
429 Aws::String m_responseContentDisposition;
430 bool m_responseContentDispositionHasBeenSet = false;
431
432 Aws::String m_responseContentEncoding;
433 bool m_responseContentEncodingHasBeenSet = false;
434
435 Aws::String m_responseContentLanguage;
436 bool m_responseContentLanguageHasBeenSet = false;
437
438 Aws::String m_responseContentType;
439 bool m_responseContentTypeHasBeenSet = false;
440
441 Aws::Utils::DateTime m_responseExpires{};
442 bool m_responseExpiresHasBeenSet = false;
443
444 Aws::String m_versionId;
445 bool m_versionIdHasBeenSet = false;
446
447 Aws::String m_sSECustomerAlgorithm;
448 bool m_sSECustomerAlgorithmHasBeenSet = false;
449
450 Aws::String m_sSECustomerKey;
451 bool m_sSECustomerKeyHasBeenSet = false;
452
453 Aws::String m_sSECustomerKeyMD5;
454 bool m_sSECustomerKeyMD5HasBeenSet = false;
455
456 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
457 bool m_requestPayerHasBeenSet = false;
458
459 int m_partNumber{0};
460 bool m_partNumberHasBeenSet = false;
461
462 Aws::String m_expectedBucketOwner;
463 bool m_expectedBucketOwnerHasBeenSet = false;
464
465 ChecksumMode m_checksumMode{ChecksumMode::NOT_SET};
466 bool m_checksumModeHasBeenSet = false;
467
468 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
469 bool m_customizedAccessLogTagHasBeenSet = false;
470 };
471
472} // namespace Model
473} // namespace S3
474} // namespace Aws
AWS_S3_API Aws::String SerializePayload() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
HeadObjectRequest & WithPartNumber(int value)
const Aws::String & GetResponseCacheControl() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetIfMatch() const
const Aws::Utils::DateTime & GetResponseExpires() const
HeadObjectRequest & WithChecksumMode(ChecksumMode value)
HeadObjectRequest & WithRange(RangeT &&value)
HeadObjectRequest & WithResponseContentDisposition(ResponseContentDispositionT &&value)
HeadObjectRequest & WithResponseExpires(ResponseExpiresT &&value)
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
const Aws::Utils::DateTime & GetIfModifiedSince() const
const Aws::String & GetSSECustomerKey() const
const Aws::String & GetIfNoneMatch() const
const Aws::String & GetVersionId() const
AWS_S3_API HeadObjectRequest()=default
HeadObjectRequest & WithSSECustomerAlgorithm(SSECustomerAlgorithmT &&value)
HeadObjectRequest & WithKey(KeyT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
HeadObjectRequest & WithIfNoneMatch(IfNoneMatchT &&value)
void SetSSECustomerKeyMD5(SSECustomerKeyMD5T &&value)
void SetResponseContentType(ResponseContentTypeT &&value)
HeadObjectRequest & WithResponseCacheControl(ResponseCacheControlT &&value)
void SetSSECustomerAlgorithm(SSECustomerAlgorithmT &&value)
const Aws::String & GetSSECustomerKeyMD5() const
const Aws::String & GetResponseContentEncoding() const
HeadObjectRequest & WithSSECustomerKey(SSECustomerKeyT &&value)
void SetChecksumMode(ChecksumMode value)
void SetResponseExpires(ResponseExpiresT &&value)
HeadObjectRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
const Aws::String & GetBucket() const
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
const Aws::String & GetResponseContentType() const
HeadObjectRequest & WithIfModifiedSince(IfModifiedSinceT &&value)
HeadObjectRequest & WithResponseContentLanguage(ResponseContentLanguageT &&value)
void SetIfUnmodifiedSince(IfUnmodifiedSinceT &&value)
void SetSSECustomerKey(SSECustomerKeyT &&value)
void SetIfModifiedSince(IfModifiedSinceT &&value)
void SetResponseContentEncoding(ResponseContentEncodingT &&value)
HeadObjectRequest & WithVersionId(VersionIdT &&value)
const Aws::String & GetRange() const
HeadObjectRequest & WithIfMatch(IfMatchT &&value)
const Aws::String & GetExpectedBucketOwner() const
HeadObjectRequest & WithResponseContentType(ResponseContentTypeT &&value)
void SetResponseContentLanguage(ResponseContentLanguageT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetRequestPayer(RequestPayer value)
HeadObjectRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
HeadObjectRequest & WithBucket(BucketT &&value)
HeadObjectRequest & WithResponseContentEncoding(ResponseContentEncodingT &&value)
const Aws::Utils::DateTime & GetIfUnmodifiedSince() const
void SetResponseContentDisposition(ResponseContentDispositionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
HeadObjectRequest & WithRequestPayer(RequestPayer value)
const Aws::String & GetResponseContentDisposition() const
const Aws::String & GetKey() const
void SetIfNoneMatch(IfNoneMatchT &&value)
void SetResponseCacheControl(ResponseCacheControlT &&value)
HeadObjectRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
HeadObjectRequest & WithIfUnmodifiedSince(IfUnmodifiedSinceT &&value)
void SetVersionId(VersionIdT &&value)
HeadObjectRequest & WithSSECustomerKeyMD5(SSECustomerKeyMD5T &&value)
const Aws::String & GetResponseContentLanguage() const
const Aws::String & GetSSECustomerAlgorithm() 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