AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GetObjectRequest.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 GetObjectRequest() = 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 "GetObject"; }
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 ShouldValidateResponseChecksum() const override;
47
49
53 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
54
56
95 inline const Aws::String& GetBucket() const { return m_bucket; }
96 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
97 template<typename BucketT = Aws::String>
98 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
99 template<typename BucketT = Aws::String>
100 GetObjectRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
102
104
115 inline const Aws::String& GetIfMatch() const { return m_ifMatch; }
116 inline bool IfMatchHasBeenSet() const { return m_ifMatchHasBeenSet; }
117 template<typename IfMatchT = Aws::String>
118 void SetIfMatch(IfMatchT&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = std::forward<IfMatchT>(value); }
119 template<typename IfMatchT = Aws::String>
120 GetObjectRequest& WithIfMatch(IfMatchT&& value) { SetIfMatch(std::forward<IfMatchT>(value)); return *this;}
122
124
134 inline const Aws::Utils::DateTime& GetIfModifiedSince() const { return m_ifModifiedSince; }
135 inline bool IfModifiedSinceHasBeenSet() const { return m_ifModifiedSinceHasBeenSet; }
136 template<typename IfModifiedSinceT = Aws::Utils::DateTime>
137 void SetIfModifiedSince(IfModifiedSinceT&& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = std::forward<IfModifiedSinceT>(value); }
138 template<typename IfModifiedSinceT = Aws::Utils::DateTime>
139 GetObjectRequest& WithIfModifiedSince(IfModifiedSinceT&& value) { SetIfModifiedSince(std::forward<IfModifiedSinceT>(value)); return *this;}
141
143
154 inline const Aws::String& GetIfNoneMatch() const { return m_ifNoneMatch; }
155 inline bool IfNoneMatchHasBeenSet() const { return m_ifNoneMatchHasBeenSet; }
156 template<typename IfNoneMatchT = Aws::String>
157 void SetIfNoneMatch(IfNoneMatchT&& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = std::forward<IfNoneMatchT>(value); }
158 template<typename IfNoneMatchT = Aws::String>
159 GetObjectRequest& WithIfNoneMatch(IfNoneMatchT&& value) { SetIfNoneMatch(std::forward<IfNoneMatchT>(value)); return *this;}
161
163
173 inline const Aws::Utils::DateTime& GetIfUnmodifiedSince() const { return m_ifUnmodifiedSince; }
174 inline bool IfUnmodifiedSinceHasBeenSet() const { return m_ifUnmodifiedSinceHasBeenSet; }
175 template<typename IfUnmodifiedSinceT = Aws::Utils::DateTime>
176 void SetIfUnmodifiedSince(IfUnmodifiedSinceT&& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = std::forward<IfUnmodifiedSinceT>(value); }
177 template<typename IfUnmodifiedSinceT = Aws::Utils::DateTime>
178 GetObjectRequest& WithIfUnmodifiedSince(IfUnmodifiedSinceT&& value) { SetIfUnmodifiedSince(std::forward<IfUnmodifiedSinceT>(value)); return *this;}
180
182
185 inline const Aws::String& GetKey() const { return m_key; }
186 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
187 template<typename KeyT = Aws::String>
188 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
189 template<typename KeyT = Aws::String>
190 GetObjectRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
192
194
201 inline const Aws::String& GetRange() const { return m_range; }
202 inline bool RangeHasBeenSet() const { return m_rangeHasBeenSet; }
203 template<typename RangeT = Aws::String>
204 void SetRange(RangeT&& value) { m_rangeHasBeenSet = true; m_range = std::forward<RangeT>(value); }
205 template<typename RangeT = Aws::String>
206 GetObjectRequest& WithRange(RangeT&& value) { SetRange(std::forward<RangeT>(value)); return *this;}
208
210
213 inline const Aws::String& GetResponseCacheControl() const { return m_responseCacheControl; }
214 inline bool ResponseCacheControlHasBeenSet() const { return m_responseCacheControlHasBeenSet; }
215 template<typename ResponseCacheControlT = Aws::String>
216 void SetResponseCacheControl(ResponseCacheControlT&& value) { m_responseCacheControlHasBeenSet = true; m_responseCacheControl = std::forward<ResponseCacheControlT>(value); }
217 template<typename ResponseCacheControlT = Aws::String>
218 GetObjectRequest& WithResponseCacheControl(ResponseCacheControlT&& value) { SetResponseCacheControl(std::forward<ResponseCacheControlT>(value)); return *this;}
220
222
225 inline const Aws::String& GetResponseContentDisposition() const { return m_responseContentDisposition; }
226 inline bool ResponseContentDispositionHasBeenSet() const { return m_responseContentDispositionHasBeenSet; }
227 template<typename ResponseContentDispositionT = Aws::String>
228 void SetResponseContentDisposition(ResponseContentDispositionT&& value) { m_responseContentDispositionHasBeenSet = true; m_responseContentDisposition = std::forward<ResponseContentDispositionT>(value); }
229 template<typename ResponseContentDispositionT = Aws::String>
230 GetObjectRequest& WithResponseContentDisposition(ResponseContentDispositionT&& value) { SetResponseContentDisposition(std::forward<ResponseContentDispositionT>(value)); return *this;}
232
234
237 inline const Aws::String& GetResponseContentEncoding() const { return m_responseContentEncoding; }
238 inline bool ResponseContentEncodingHasBeenSet() const { return m_responseContentEncodingHasBeenSet; }
239 template<typename ResponseContentEncodingT = Aws::String>
240 void SetResponseContentEncoding(ResponseContentEncodingT&& value) { m_responseContentEncodingHasBeenSet = true; m_responseContentEncoding = std::forward<ResponseContentEncodingT>(value); }
241 template<typename ResponseContentEncodingT = Aws::String>
242 GetObjectRequest& WithResponseContentEncoding(ResponseContentEncodingT&& value) { SetResponseContentEncoding(std::forward<ResponseContentEncodingT>(value)); return *this;}
244
246
249 inline const Aws::String& GetResponseContentLanguage() const { return m_responseContentLanguage; }
250 inline bool ResponseContentLanguageHasBeenSet() const { return m_responseContentLanguageHasBeenSet; }
251 template<typename ResponseContentLanguageT = Aws::String>
252 void SetResponseContentLanguage(ResponseContentLanguageT&& value) { m_responseContentLanguageHasBeenSet = true; m_responseContentLanguage = std::forward<ResponseContentLanguageT>(value); }
253 template<typename ResponseContentLanguageT = Aws::String>
254 GetObjectRequest& WithResponseContentLanguage(ResponseContentLanguageT&& value) { SetResponseContentLanguage(std::forward<ResponseContentLanguageT>(value)); return *this;}
256
258
261 inline const Aws::String& GetResponseContentType() const { return m_responseContentType; }
262 inline bool ResponseContentTypeHasBeenSet() const { return m_responseContentTypeHasBeenSet; }
263 template<typename ResponseContentTypeT = Aws::String>
264 void SetResponseContentType(ResponseContentTypeT&& value) { m_responseContentTypeHasBeenSet = true; m_responseContentType = std::forward<ResponseContentTypeT>(value); }
265 template<typename ResponseContentTypeT = Aws::String>
266 GetObjectRequest& WithResponseContentType(ResponseContentTypeT&& value) { SetResponseContentType(std::forward<ResponseContentTypeT>(value)); return *this;}
268
270
273 inline const Aws::Utils::DateTime& GetResponseExpires() const { return m_responseExpires; }
274 inline bool ResponseExpiresHasBeenSet() const { return m_responseExpiresHasBeenSet; }
275 template<typename ResponseExpiresT = Aws::Utils::DateTime>
276 void SetResponseExpires(ResponseExpiresT&& value) { m_responseExpiresHasBeenSet = true; m_responseExpires = std::forward<ResponseExpiresT>(value); }
277 template<typename ResponseExpiresT = Aws::Utils::DateTime>
278 GetObjectRequest& WithResponseExpires(ResponseExpiresT&& value) { SetResponseExpires(std::forward<ResponseExpiresT>(value)); return *this;}
280
282
301 inline const Aws::String& GetVersionId() const { return m_versionId; }
302 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
303 template<typename VersionIdT = Aws::String>
304 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
305 template<typename VersionIdT = Aws::String>
306 GetObjectRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
308
310
325 inline const Aws::String& GetSSECustomerAlgorithm() const { return m_sSECustomerAlgorithm; }
326 inline bool SSECustomerAlgorithmHasBeenSet() const { return m_sSECustomerAlgorithmHasBeenSet; }
327 template<typename SSECustomerAlgorithmT = Aws::String>
328 void SetSSECustomerAlgorithm(SSECustomerAlgorithmT&& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = std::forward<SSECustomerAlgorithmT>(value); }
329 template<typename SSECustomerAlgorithmT = Aws::String>
330 GetObjectRequest& WithSSECustomerAlgorithm(SSECustomerAlgorithmT&& value) { SetSSECustomerAlgorithm(std::forward<SSECustomerAlgorithmT>(value)); return *this;}
332
334
352 inline const Aws::String& GetSSECustomerKey() const { return m_sSECustomerKey; }
353 inline bool SSECustomerKeyHasBeenSet() const { return m_sSECustomerKeyHasBeenSet; }
354 template<typename SSECustomerKeyT = Aws::String>
355 void SetSSECustomerKey(SSECustomerKeyT&& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = std::forward<SSECustomerKeyT>(value); }
356 template<typename SSECustomerKeyT = Aws::String>
357 GetObjectRequest& WithSSECustomerKey(SSECustomerKeyT&& value) { SetSSECustomerKey(std::forward<SSECustomerKeyT>(value)); return *this;}
359
361
377 inline const Aws::String& GetSSECustomerKeyMD5() const { return m_sSECustomerKeyMD5; }
378 inline bool SSECustomerKeyMD5HasBeenSet() const { return m_sSECustomerKeyMD5HasBeenSet; }
379 template<typename SSECustomerKeyMD5T = Aws::String>
380 void SetSSECustomerKeyMD5(SSECustomerKeyMD5T&& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = std::forward<SSECustomerKeyMD5T>(value); }
381 template<typename SSECustomerKeyMD5T = Aws::String>
382 GetObjectRequest& WithSSECustomerKeyMD5(SSECustomerKeyMD5T&& value) { SetSSECustomerKeyMD5(std::forward<SSECustomerKeyMD5T>(value)); return *this;}
384
386
387 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
388 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
389 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
390 inline GetObjectRequest& WithRequestPayer(RequestPayer value) { SetRequestPayer(value); return *this;}
392
394
399 inline int GetPartNumber() const { return m_partNumber; }
400 inline bool PartNumberHasBeenSet() const { return m_partNumberHasBeenSet; }
401 inline void SetPartNumber(int value) { m_partNumberHasBeenSet = true; m_partNumber = value; }
402 inline GetObjectRequest& WithPartNumber(int value) { SetPartNumber(value); return *this;}
404
406
411 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
412 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
413 template<typename ExpectedBucketOwnerT = Aws::String>
414 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
415 template<typename ExpectedBucketOwnerT = Aws::String>
416 GetObjectRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
418
420
423 inline ChecksumMode GetChecksumMode() const { return m_checksumMode; }
424 inline bool ChecksumModeHasBeenSet() const { return m_checksumModeHasBeenSet; }
425 inline void SetChecksumMode(ChecksumMode value) { m_checksumModeHasBeenSet = true; m_checksumMode = value; }
426 inline GetObjectRequest& WithChecksumMode(ChecksumMode value) { SetChecksumMode(value); return *this;}
428
430
431 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
432 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
433 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
434 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
435 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
436 GetObjectRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
437 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
438 GetObjectRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
439 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
440 }
442 private:
443
444 Aws::String m_bucket;
445 bool m_bucketHasBeenSet = false;
446
447 Aws::String m_ifMatch;
448 bool m_ifMatchHasBeenSet = false;
449
450 Aws::Utils::DateTime m_ifModifiedSince{};
451 bool m_ifModifiedSinceHasBeenSet = false;
452
453 Aws::String m_ifNoneMatch;
454 bool m_ifNoneMatchHasBeenSet = false;
455
456 Aws::Utils::DateTime m_ifUnmodifiedSince{};
457 bool m_ifUnmodifiedSinceHasBeenSet = false;
458
459 Aws::String m_key;
460 bool m_keyHasBeenSet = false;
461
462 Aws::String m_range;
463 bool m_rangeHasBeenSet = false;
464
465 Aws::String m_responseCacheControl;
466 bool m_responseCacheControlHasBeenSet = false;
467
468 Aws::String m_responseContentDisposition;
469 bool m_responseContentDispositionHasBeenSet = false;
470
471 Aws::String m_responseContentEncoding;
472 bool m_responseContentEncodingHasBeenSet = false;
473
474 Aws::String m_responseContentLanguage;
475 bool m_responseContentLanguageHasBeenSet = false;
476
477 Aws::String m_responseContentType;
478 bool m_responseContentTypeHasBeenSet = false;
479
480 Aws::Utils::DateTime m_responseExpires{};
481 bool m_responseExpiresHasBeenSet = false;
482
483 Aws::String m_versionId;
484 bool m_versionIdHasBeenSet = false;
485
486 Aws::String m_sSECustomerAlgorithm;
487 bool m_sSECustomerAlgorithmHasBeenSet = false;
488
489 Aws::String m_sSECustomerKey;
490 bool m_sSECustomerKeyHasBeenSet = false;
491
492 Aws::String m_sSECustomerKeyMD5;
493 bool m_sSECustomerKeyMD5HasBeenSet = false;
494
495 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
496 bool m_requestPayerHasBeenSet = false;
497
498 int m_partNumber{0};
499 bool m_partNumberHasBeenSet = false;
500
501 Aws::String m_expectedBucketOwner;
502 bool m_expectedBucketOwnerHasBeenSet = false;
503
504 ChecksumMode m_checksumMode{ChecksumMode::NOT_SET};
505 bool m_checksumModeHasBeenSet = false;
506
507 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
508 bool m_customizedAccessLogTagHasBeenSet = false;
509 };
510
511} // namespace Model
512} // namespace S3
513} // namespace Aws
const Aws::Utils::DateTime & GetIfModifiedSince() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API Aws::String SerializePayload() const override
void SetIfModifiedSince(IfModifiedSinceT &&value)
void SetSSECustomerAlgorithm(SSECustomerAlgorithmT &&value)
const Aws::String & GetResponseContentType() const
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GetObjectRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
const Aws::String & GetBucket() const
const Aws::String & GetResponseContentDisposition() const
virtual const char * GetServiceRequestName() const override
void SetResponseContentDisposition(ResponseContentDispositionT &&value)
const Aws::String & GetKey() const
GetObjectRequest & WithVersionId(VersionIdT &&value)
GetObjectRequest & WithChecksumMode(ChecksumMode value)
GetObjectRequest & WithResponseContentLanguage(ResponseContentLanguageT &&value)
GetObjectRequest & WithIfMatch(IfMatchT &&value)
const Aws::String & GetSSECustomerKey() const
const Aws::String & GetRange() const
GetObjectRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetSSECustomerKeyMD5() const
GetObjectRequest & WithKey(KeyT &&value)
AWS_S3_API bool ShouldValidateResponseChecksum() const override
AWS_S3_API GetObjectRequest()=default
GetObjectRequest & WithResponseCacheControl(ResponseCacheControlT &&value)
void SetIfNoneMatch(IfNoneMatchT &&value)
GetObjectRequest & WithBucket(BucketT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetIfUnmodifiedSince(IfUnmodifiedSinceT &&value)
GetObjectRequest & WithResponseContentEncoding(ResponseContentEncodingT &&value)
void SetIfMatch(IfMatchT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
GetObjectRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
const Aws::String & GetExpectedBucketOwner() const
void SetResponseContentLanguage(ResponseContentLanguageT &&value)
GetObjectRequest & WithSSECustomerKey(SSECustomerKeyT &&value)
void SetSSECustomerKey(SSECustomerKeyT &&value)
AWS_S3_API Aws::Vector< Aws::String > GetResponseChecksumAlgorithmNames() const override
const Aws::Utils::DateTime & GetResponseExpires() const
void SetResponseContentType(ResponseContentTypeT &&value)
void SetChecksumMode(ChecksumMode value)
const Aws::String & GetResponseContentEncoding() const
void SetResponseContentEncoding(ResponseContentEncodingT &&value)
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
GetObjectRequest & WithResponseContentType(ResponseContentTypeT &&value)
GetObjectRequest & WithIfModifiedSince(IfModifiedSinceT &&value)
GetObjectRequest & WithPartNumber(int value)
void SetRequestPayer(RequestPayer value)
const Aws::String & GetResponseContentLanguage() const
GetObjectRequest & WithResponseContentDisposition(ResponseContentDispositionT &&value)
GetObjectRequest & WithIfNoneMatch(IfNoneMatchT &&value)
GetObjectRequest & WithResponseExpires(ResponseExpiresT &&value)
GetObjectRequest & WithRequestPayer(RequestPayer value)
const Aws::String & GetVersionId() const
void SetVersionId(VersionIdT &&value)
GetObjectRequest & WithRange(RangeT &&value)
GetObjectRequest & WithIfUnmodifiedSince(IfUnmodifiedSinceT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
const Aws::Utils::DateTime & GetIfUnmodifiedSince() const
const Aws::String & GetIfNoneMatch() const
GetObjectRequest & WithSSECustomerAlgorithm(SSECustomerAlgorithmT &&value)
const Aws::String & GetIfMatch() const
GetObjectRequest & WithSSECustomerKeyMD5(SSECustomerKeyMD5T &&value)
void SetResponseExpires(ResponseExpiresT &&value)
const Aws::String & GetResponseCacheControl() const
void SetResponseCacheControl(ResponseCacheControlT &&value)
const Aws::String & GetSSECustomerAlgorithm() const
void SetSSECustomerKeyMD5(SSECustomerKeyMD5T &&value)
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_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector