AWS SDK for C++

AWS SDK for C++ Version 1.11.867

Loading...
Searching...
No Matches
UploadRequest.h
1
5#pragma once
6#include <aws/s3-transfer/S3Transfer_EXPORTS.h>
7#include <aws/s3-transfer/ProgressListener.h>
8#include <aws/core/client/AWSError.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/AWSMemory.h>
11#include <aws/crt/Optional.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15#include <aws/s3/model/ChecksumAlgorithm.h>
16#include <aws/s3/model/ObjectCannedACL.h>
17#include <aws/s3/model/ObjectLockLegalHoldStatus.h>
18#include <aws/s3/model/ObjectLockMode.h>
19#include <aws/s3/S3Errors.h>
20#include <aws/s3/model/PutObjectRequest.h>
21#include <aws/s3/model/RequestPayer.h>
22#include <aws/s3/model/ServerSideEncryption.h>
23#include <aws/s3/model/StorageClass.h>
24#include <memory>
25
26namespace Aws {
27namespace S3 {
28namespace Transfer {
29
30struct UploadTransferState;
31
32namespace Internal {
33class UploadRequestImpl;
34
35using OptionalError = Aws::Crt::Optional<Aws::Client::AWSError<Aws::S3::S3Errors>>;
36}
37
43class AWS_S3_TRANSFER_API UploadRequest final {
44 public:
46 Aws::String key,
47 Aws::String sourceFilePath,
48 Aws::Vector<std::shared_ptr<UploadProgressListener>> transferListeners = {});
49
51 Aws::String key,
52 std::shared_ptr<Aws::IOStream> body,
53 Aws::Vector<std::shared_ptr<UploadProgressListener>> transferListeners = {});
54
56
59
60 // Stream uploads only. Call this when the body is not seekable so the length is known up front.
61 // Empty when the customer never declared one, which is distinct from a declared length of zero.
62 const Aws::Crt::Optional<uint64_t>& GetContentLength() const;
63 UploadRequest& SetContentLength(uint64_t contentLength);
64
103
104 // True when the body is a stream rather than a file; dispatch needs a CRT body adapter for it.
105 bool IsStreamUpload() const;
106
108
110 const std::shared_ptr<UploadTransferState>& state) const;
111
112 private:
113 std::shared_ptr<Internal::UploadRequestImpl> m_impl;
114};
115
116} // namespace Transfer
117} // namespace S3
118} // namespace Aws
UploadRequest & SetObjectLockMode(Aws::S3::Model::ObjectLockMode v)
UploadRequest & SetObjectLockRetainUntilDate(Aws::Utils::DateTime v)
UploadRequest & SetExpectedBucketOwner(Aws::String v)
UploadRequest(Aws::String bucket, Aws::String key, Aws::String sourceFilePath, Aws::Vector< std::shared_ptr< UploadProgressListener > > transferListeners={})
UploadRequest(Aws::String bucket, Aws::String key, std::shared_ptr< Aws::IOStream > body, Aws::Vector< std::shared_ptr< UploadProgressListener > > transferListeners={})
UploadRequest & AddMetadata(Aws::String key, Aws::String value)
const Aws::String & GetSourceFilePath() const
UploadRequest & SetMetadata(Aws::Map< Aws::String, Aws::String > v)
UploadRequest & SetStorageClass(Aws::S3::Model::StorageClass v)
const Aws::Crt::Optional< uint64_t > & GetContentLength() const
UploadRequest & SetContentMD5(Aws::String v)
UploadRequest & SetIfMatch(Aws::String v)
UploadRequest & SetChecksumSHA512(Aws::String v)
UploadRequest & SetGrantFullControl(Aws::String v)
UploadRequest & SetSSECustomerAlgorithm(Aws::String v)
UploadRequest & SetTagging(Aws::String v)
UploadRequest & SetGrantReadACP(Aws::String v)
UploadRequest & SetChecksumCRC64NVME(Aws::String v)
UploadRequest & SetGrantRead(Aws::String v)
UploadRequest & SetContentDisposition(Aws::String v)
UploadRequest & SetContentType(Aws::String v)
const Aws::S3::Model::PutObjectRequest & GetS3Request() const
UploadRequest & SetCacheControl(Aws::String v)
Internal::OptionalError PrepareTransferState(const std::shared_ptr< UploadTransferState > &state) const
UploadRequest & SetSSEKMSKeyId(Aws::String v)
UploadRequest & SetChecksumSHA256(Aws::String v)
UploadRequest & SetChecksumCRC32C(Aws::String v)
UploadRequest & SetACL(Aws::S3::Model::ObjectCannedACL v)
UploadRequest & SetSSECustomerKey(Aws::String v)
UploadRequest & SetRequestPayer(Aws::S3::Model::RequestPayer v)
UploadRequest & SetExpires(Aws::Utils::DateTime v)
UploadRequest & SetWebsiteRedirectLocation(Aws::String v)
UploadRequest & SetChecksumCRC32(Aws::String v)
UploadRequest & SetChecksumAlgorithm(Aws::S3::Model::ChecksumAlgorithm v)
UploadRequest & SetContentEncoding(Aws::String v)
UploadRequest & SetContentLength(uint64_t contentLength)
UploadRequest & SetSSEKMSEncryptionContext(Aws::String v)
UploadRequest & SetChecksumSHA1(Aws::String v)
UploadRequest & SetObjectLockLegalHoldStatus(Aws::S3::Model::ObjectLockLegalHoldStatus v)
UploadRequest & SetSSECustomerKeyMD5(Aws::String v)
UploadRequest & SetIfNoneMatch(Aws::String v)
const Aws::Vector< std::shared_ptr< UploadProgressListener > > & GetTransferListeners() const
UploadRequest & SetServerSideEncryption(Aws::S3::Model::ServerSideEncryption v)
UploadRequest & SetGrantWriteACP(Aws::String v)
UploadRequest & SetBucketKeyEnabled(bool v)
UploadRequest & SetContentLanguage(Aws::String v)
Aws::Crt::Optional< Aws::Client::AWSError< Aws::S3::S3Errors > > OptionalError
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