AWS SDK for C++

AWS SDK for C++ Version 1.11.875

Loading...
Searching...
No Matches
DownloadRequest.h
1
5#pragma once
6#include <aws/s3-transfer/S3Transfer_EXPORTS.h>
7#include <aws/s3-transfer/ProgressListener.h>
8#include <aws/s3-transfer/DownloadDataReceiver.h>
9#include <aws/core/client/AWSError.h>
10#include <aws/crt/Optional.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/AWSMemory.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15#include <aws/s3/S3Errors.h>
16#include <aws/s3/model/ChecksumMode.h>
17#include <aws/s3/model/GetObjectRequest.h>
18#include <aws/s3/model/RequestPayer.h>
19#include <memory>
20
21namespace Aws {
22namespace S3 {
23namespace Transfer {
24
25struct DownloadTransferState;
26
27namespace Internal {
29
30using OptionalError = Aws::Crt::Optional<Aws::Client::AWSError<Aws::S3::S3Errors>>;
31}
32
38class AWS_S3_TRANSFER_API DownloadRequest final {
39 public:
41 Aws::String key,
42 Aws::String destinationFilePath,
43 Aws::Vector<std::shared_ptr<DownloadProgressListener>> transferListeners = {});
44
46 Aws::String key,
47 std::shared_ptr<DownloadDataReceiver> dataReceiver,
48 Aws::Vector<std::shared_ptr<DownloadProgressListener>> transferListeners = {});
49
51
53 // Empty for a receiver-backed download; otherwise where the object lands once it completes.
56 // Null for a file-backed download; otherwise the sink the CRT delivers body chunks to.
57 const std::shared_ptr<DownloadDataReceiver>& GetDataReceiver() const;
58
77
79
82 const std::shared_ptr<DownloadTransferState>& state) const;
83 Internal::OptionalError CleanupOnFailure(const std::shared_ptr<DownloadTransferState>& state) const;
84
85 private:
86 std::shared_ptr<Internal::DownloadRequestImpl> m_impl;
87};
88
89} // namespace Transfer
90} // namespace S3
91} // namespace Aws
DownloadRequest & SetIfModifiedSince(Aws::Utils::DateTime v)
DownloadRequest & SetSSECustomerKey(Aws::String v)
DownloadRequest & SetVersionId(Aws::String v)
const std::shared_ptr< DownloadDataReceiver > & GetDataReceiver() const
DownloadRequest & SetResponseContentType(Aws::String v)
DownloadRequest(Aws::String bucket, Aws::String key, Aws::String destinationFilePath, Aws::Vector< std::shared_ptr< DownloadProgressListener > > transferListeners={})
DownloadRequest & SetIfNoneMatch(Aws::String v)
DownloadRequest & SetResponseContentDisposition(Aws::String v)
DownloadRequest & SetResponseContentLanguage(Aws::String v)
DownloadRequest & SetResponseCacheControl(Aws::String v)
DownloadRequest & SetIfMatch(Aws::String v)
DownloadRequest & SetSSECustomerKeyMD5(Aws::String v)
Internal::OptionalError CleanupOnFailure(const std::shared_ptr< DownloadTransferState > &state) const
DownloadRequest & SetChecksumMode(Aws::S3::Model::ChecksumMode v)
DownloadRequest & SetResponseExpires(Aws::Utils::DateTime v)
Internal::OptionalError Validate() const
const Aws::String & GetDestinationFilePath() const
DownloadRequest & SetRequestPayer(Aws::S3::Model::RequestPayer v)
const Aws::Vector< std::shared_ptr< DownloadProgressListener > > & GetTransferListeners() const
DownloadRequest & SetRange(Aws::String v)
DownloadRequest & SetIfUnmodifiedSince(Aws::Utils::DateTime v)
Internal::OptionalError FinalizeOnSuccess(const std::shared_ptr< DownloadTransferState > &state) const
DownloadRequest & SetSSECustomerAlgorithm(Aws::String v)
DownloadRequest(Aws::String bucket, Aws::String key, std::shared_ptr< DownloadDataReceiver > dataReceiver, Aws::Vector< std::shared_ptr< DownloadProgressListener > > transferListeners={})
const Aws::String & GetTempFilePath() const
const Aws::S3::Model::GetObjectRequest & GetS3Request() const
DownloadRequest & SetResponseContentEncoding(Aws::String v)
DownloadRequest & SetExpectedBucketOwner(Aws::String v)
Aws::Crt::Optional< Aws::Client::AWSError< Aws::S3::S3Errors > > OptionalError
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector