&& result);
-
- inline Aws::IOStream& GetPolicy() { return m_policy.GetUnderlyingStream(); }
-
-
- /**
+ /**
* The URI that identifies the newly created object.
*/
inline const Aws::String& GetLocation() const{ return m_location; }
@@ -64,17 +57,17 @@ namespace Model
/**
* The URI that identifies the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithLocation(const Aws::String& value) { SetLocation(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithLocation(const Aws::String& value) { SetLocation(value); return *this;}
/**
* The URI that identifies the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithLocation(Aws::String&& value) { SetLocation(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithLocation(Aws::String&& value) { SetLocation(std::move(value)); return *this;}
/**
* The URI that identifies the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithLocation(const char* value) { SetLocation(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithLocation(const char* value) { SetLocation(value); return *this;}
/**
@@ -180,7 +173,7 @@ namespace Model
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using
* S3 on Outposts in the Amazon S3 User Guide.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
/**
* The name of the bucket that contains the newly created object.
When
@@ -201,7 +194,7 @@ namespace Model
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using
* S3 on Outposts in the Amazon S3 User Guide.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
/**
* The name of the bucket that contains the newly created object.
When
@@ -222,7 +215,7 @@ namespace Model
* href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using
* S3 on Outposts in the Amazon S3 User Guide.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithBucket(const char* value) { SetBucket(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithBucket(const char* value) { SetBucket(value); return *this;}
/**
@@ -248,17 +241,17 @@ namespace Model
/**
* The object key of the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithKey(const Aws::String& value) { SetKey(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithKey(const Aws::String& value) { SetKey(value); return *this;}
/**
* The object key of the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
/**
* The object key of the newly created object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithKey(const char* value) { SetKey(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithKey(const char* value) { SetKey(value); return *this;}
/**
@@ -289,19 +282,19 @@ namespace Model
* If the object expiration is configured, this will contain the expiration date
* (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;}
/**
* If the object expiration is configured, this will contain the expiration date
* (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;}
/**
* If the object expiration is configured, this will contain the expiration date
* (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithExpiration(const char* value) { SetExpiration(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithExpiration(const char* value) { SetExpiration(value); return *this;}
/**
@@ -352,7 +345,7 @@ namespace Model
* one or more nonhexadecimal characters and/or will consist of less than 32 or
* more than 32 hexadecimal digits.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithETag(const Aws::String& value) { SetETag(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithETag(const Aws::String& value) { SetETag(value); return *this;}
/**
* Entity tag that identifies the newly created object's data. Objects with
@@ -362,7 +355,7 @@ namespace Model
* one or more nonhexadecimal characters and/or will consist of less than 32 or
* more than 32 hexadecimal digits.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
/**
* Entity tag that identifies the newly created object's data. Objects with
@@ -372,7 +365,7 @@ namespace Model
* one or more nonhexadecimal characters and/or will consist of less than 32 or
* more than 32 hexadecimal digits.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithETag(const char* value) { SetETag(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithETag(const char* value) { SetETag(value); return *this;}
/**
@@ -405,7 +398,7 @@ namespace Model
* multipart upload request, the response includes this header. It confirms the
* encryption algorithm that Amazon S3 used to encrypt the object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;}
/**
* If you specified server-side encryption either with an Amazon S3-managed
@@ -413,7 +406,7 @@ namespace Model
* multipart upload request, the response includes this header. It confirms the
* encryption algorithm that Amazon S3 used to encrypt the object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;}
/**
@@ -444,19 +437,19 @@ namespace Model
* Version ID of the newly created object, in case the bucket has versioning
* turned on.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
/**
* Version ID of the newly created object, in case the bucket has versioning
* turned on.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
/**
* Version ID of the newly created object, in case the bucket has versioning
* turned on.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
/**
@@ -492,21 +485,21 @@ namespace Model
* symmetric customer managed customer master key (CMK) that was used for the
* object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;}
/**
* If present, specifies the ID of the AWS Key Management Service (AWS KMS)
* symmetric customer managed customer master key (CMK) that was used for the
* object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;}
/**
* If present, specifies the ID of the AWS Key Management Service (AWS KMS)
* symmetric customer managed customer master key (CMK) that was used for the
* object.
*/
- inline CompleteMultipartUploadWithCallBackResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;}
/**
@@ -525,7 +518,7 @@ namespace Model
* Indicates whether the multipart upload uses an S3 Bucket Key for server-side
* encryption with AWS KMS (SSE-KMS).
*/
- inline CompleteMultipartUploadWithCallBackResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;}
@@ -538,14 +531,14 @@ namespace Model
inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); }
- inline CompleteMultipartUploadWithCallBackResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;}
- inline CompleteMultipartUploadWithCallBackResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
+ inline CompleteMultipartUploadOriginResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
private:
- Aws::String m_location;
+ Aws::String m_location;
Aws::String m_bucket;
@@ -564,8 +557,6 @@ namespace Model
bool m_bucketKeyEnabled;
RequestCharged m_requestCharged;
-
- Aws::Utils::Stream::ResponseStream m_policy;
};
} // namespace Model
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadResult.h
index dcd8c30f8..3c336f97f 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadResult.h
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadResult.h
@@ -5,23 +5,18 @@
#pragma once
#include
+#include
#include
#include
#include
#include
+
namespace Aws
{
template
class AmazonWebServiceResult;
-namespace Utils
-{
-namespace Xml
-{
- class XmlDocument;
-} // namespace Xml
-} // namespace Utils
namespace S3
{
namespace Model
@@ -30,11 +25,23 @@ namespace Model
{
public:
CompleteMultipartUploadResult();
- CompleteMultipartUploadResult(const Aws::AmazonWebServiceResult& result);
- CompleteMultipartUploadResult& operator=(const Aws::AmazonWebServiceResult& result);
+ //We have to define these because Microsoft doesn't auto generate them
+ CompleteMultipartUploadResult(CompleteMultipartUploadResult&&);
+ CompleteMultipartUploadResult& operator=(CompleteMultipartUploadResult&&);
+ //we delete these because Microsoft doesn't handle move generation correctly
+ //and we therefore don't trust them to get it right here either.
+ CompleteMultipartUploadResult(const CompleteMultipartUploadResult&) = delete;
+ CompleteMultipartUploadResult& operator=(const CompleteMultipartUploadResult&) = delete;
- /**
+ CompleteMultipartUploadResult(Aws::AmazonWebServiceResult&& result);
+ CompleteMultipartUploadResult& operator=(Aws::AmazonWebServiceResult&& result);
+
+
+ inline Aws::IOStream& GetPolicy() { return m_policy.GetUnderlyingStream(); }
+
+
+ /**
* The URI that identifies the newly created object.
*/
inline const Aws::String& GetLocation() const{ return m_location; }
@@ -538,7 +545,7 @@ namespace Model
private:
- Aws::String m_location;
+ Aws::String m_location;
Aws::String m_bucket;
@@ -557,6 +564,8 @@ namespace Model
bool m_bucketKeyEnabled;
RequestCharged m_requestCharged;
+
+ Aws::Utils::Stream::ResponseStream m_policy;
};
} // namespace Model
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/S3Client.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/S3Client.cpp
index fda2f6398..4c680884f 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/S3Client.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/S3Client.cpp
@@ -288,103 +288,103 @@ void S3Client::AbortMultipartUploadAsyncHelper(const AbortMultipartUploadRequest
-CompleteMultipartUploadOutcome S3Client::CompleteMultipartUpload(const CompleteMultipartUploadRequest& request) const
+CompleteMultipartUploadOriginOutcome S3Client::CompleteMultipartUploadOrigin(const CompleteMultipartUploadRequest& request) const
{
if (!request.BucketHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: Bucket, is not set");
- return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
+ return CompleteMultipartUploadOriginOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
}
if (!request.KeyHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: Key, is not set");
- return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
+ return CompleteMultipartUploadOriginOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
}
if (!request.UploadIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: UploadId, is not set");
- return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UploadId]", false));
+ return CompleteMultipartUploadOriginOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UploadId]", false));
}
ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(request.GetBucket());
if (!computeEndpointOutcome.IsSuccess())
{
- return CompleteMultipartUploadOutcome(computeEndpointOutcome.GetError());
+ return CompleteMultipartUploadOriginOutcome(computeEndpointOutcome.GetError());
}
Aws::Http::URI uri = computeEndpointOutcome.GetResult().endpoint;
Aws::StringStream ss;
ss << "/";
ss << request.GetKey();
uri.SetPath(uri.GetPath() + ss.str());
- return CompleteMultipartUploadOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
+ return CompleteMultipartUploadOriginOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
}
-CompleteMultipartUploadOutcomeCallable S3Client::CompleteMultipartUploadCallable(const CompleteMultipartUploadRequest& request) const
+CompleteMultipartUploadOriginOutcomeCallable S3Client::CompleteMultipartUploadOriginCallable(const CompleteMultipartUploadRequest& request) const
{
- auto task = Aws::MakeShared< std::packaged_task< CompleteMultipartUploadOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteMultipartUpload(request); } );
+ auto task = Aws::MakeShared< std::packaged_task< CompleteMultipartUploadOriginOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteMultipartUploadOrigin(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
-void S3Client::CompleteMultipartUploadAsync(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::CompleteMultipartUploadOriginAsync(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadOriginResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- m_executor->Submit( [this, request, handler, context](){ this->CompleteMultipartUploadAsyncHelper( request, handler, context ); } );
+ m_executor->Submit( [this, request, handler, context](){ this->CompleteMultipartUploadOriginAsyncHelper( request, handler, context ); } );
}
-void S3Client::CompleteMultipartUploadAsyncHelper(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::CompleteMultipartUploadOriginAsyncHelper(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadOriginResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- handler(this, request, CompleteMultipartUpload(request), context);
+ handler(this, request, CompleteMultipartUploadOrigin(request), context);
}
-CompleteMultipartUploadWithCallBackOutcome S3Client::CompleteMultipartUploadWithCallBack(const CompleteMultipartUploadRequest& request) const
+CompleteMultipartUploadOutcome S3Client::CompleteMultipartUpload(const CompleteMultipartUploadRequest& request) const
{
if (!request.BucketHasBeenSet())
{
- AWS_LOGSTREAM_ERROR("CompleteMultipartUploadWithCallBack", "Required field: Bucket, is not set");
- return CompleteMultipartUploadWithCallBackOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
+ AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: Bucket, is not set");
+ return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
}
if (!request.KeyHasBeenSet())
{
- AWS_LOGSTREAM_ERROR("CompleteMultipartUploadWithCallBack", "Required field: Key, is not set");
- return CompleteMultipartUploadWithCallBackOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
+ AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: Key, is not set");
+ return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
}
if (!request.UploadIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CompleteMultipartUpload", "Required field: UploadId, is not set");
- return CompleteMultipartUploadWithCallBackOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UploadId]", false));
+ return CompleteMultipartUploadOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UploadId]", false));
}
ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(request.GetBucket());
if (!computeEndpointOutcome.IsSuccess())
{
- return CompleteMultipartUploadWithCallBackOutcome(computeEndpointOutcome.GetError());
+ return CompleteMultipartUploadOutcome(computeEndpointOutcome.GetError());
}
Aws::Http::URI uri = computeEndpointOutcome.GetResult().endpoint;
Aws::StringStream ss;
ss << "/";
ss << request.GetKey();
uri.SetPath(uri.GetPath() + ss.str());
- return CompleteMultipartUploadWithCallBackOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
+ return CompleteMultipartUploadOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
}
-CompleteMultipartUploadWithCallBackOutcomeCallable S3Client::CompleteMultipartUploadWithCallBackCallable(const CompleteMultipartUploadRequest& request) const
+CompleteMultipartUploadOutcomeCallable S3Client::CompleteMultipartUploadCallable(const CompleteMultipartUploadRequest& request) const
{
- auto task = Aws::MakeShared< std::packaged_task< CompleteMultipartUploadWithCallBackOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteMultipartUploadWithCallBack(request); } );
+ auto task = Aws::MakeShared< std::packaged_task< CompleteMultipartUploadOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteMultipartUpload(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
-void S3Client::CompleteMultipartUploadWithCallBackAsync(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::CompleteMultipartUploadAsync(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- m_executor->Submit( [this, request, handler, context](){ this->CompleteMultipartUploadWithCallBackAsyncHelper( request, handler, context ); } );
+ m_executor->Submit( [this, request, handler, context](){ this->CompleteMultipartUploadAsyncHelper( request, handler, context ); } );
}
-void S3Client::CompleteMultipartUploadWithCallBackAsyncHelper(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::CompleteMultipartUploadAsyncHelper(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- handler(this, request, CompleteMultipartUploadWithCallBack(request), context);
+ handler(this, request, CompleteMultipartUpload(request), context);
}
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadWithCallBackResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadOriginResult.cpp
similarity index 55%
rename from aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadWithCallBackResult.cpp
rename to aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadOriginResult.cpp
index 5aea7e2c0..1e6cee12b 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadWithCallBackResult.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadOriginResult.cpp
@@ -3,54 +3,62 @@
* SPDX-License-Identifier: Apache-2.0.
*/
-#include
+#include
+#include
#include
#include
-#include
+#include
+
#include
-#include
using namespace Aws::S3::Model;
-using namespace Aws::Utils::Stream;
+using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
-CompleteMultipartUploadWithCallBackResult::CompleteMultipartUploadWithCallBackResult() :
+CompleteMultipartUploadOriginResult::CompleteMultipartUploadOriginResult() :
m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
}
-CompleteMultipartUploadWithCallBackResult::CompleteMultipartUploadWithCallBackResult(CompleteMultipartUploadWithCallBackResult&& toMove) :
- m_policy(std::move(toMove.m_policy)),
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+CompleteMultipartUploadOriginResult::CompleteMultipartUploadOriginResult(const Aws::AmazonWebServiceResult& result) :
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
+ *this = result;
}
-CompleteMultipartUploadWithCallBackResult& CompleteMultipartUploadWithCallBackResult::operator=(CompleteMultipartUploadWithCallBackResult&& toMove)
-{
- if(this == &toMove)
- {
- return *this;
- }
-
- m_policy = std::move(toMove.m_policy);
-
- return *this;
-}
-
-CompleteMultipartUploadWithCallBackResult::CompleteMultipartUploadWithCallBackResult(Aws::AmazonWebServiceResult&& result)
+CompleteMultipartUploadOriginResult& CompleteMultipartUploadOriginResult::operator =(const Aws::AmazonWebServiceResult& result)
{
- *this = std::move(result);
-}
+ const XmlDocument& xmlDocument = result.GetPayload();
+ XmlNode resultNode = xmlDocument.GetRootElement();
+ if(!resultNode.IsNull())
+ {
+ XmlNode locationNode = resultNode.FirstChild("Location");
+ if(!locationNode.IsNull())
+ {
+ m_location = Aws::Utils::Xml::DecodeEscapedXmlText(locationNode.GetText());
+ }
+ XmlNode bucketNode = resultNode.FirstChild("Bucket");
+ if(!bucketNode.IsNull())
+ {
+ m_bucket = Aws::Utils::Xml::DecodeEscapedXmlText(bucketNode.GetText());
+ }
+ XmlNode keyNode = resultNode.FirstChild("Key");
+ if(!keyNode.IsNull())
+ {
+ m_key = Aws::Utils::Xml::DecodeEscapedXmlText(keyNode.GetText());
+ }
+ XmlNode eTagNode = resultNode.FirstChild("ETag");
+ if(!eTagNode.IsNull())
+ {
+ m_eTag = Aws::Utils::Xml::DecodeEscapedXmlText(eTagNode.GetText());
+ }
+ }
-CompleteMultipartUploadWithCallBackResult& CompleteMultipartUploadWithCallBackResult::operator =(Aws::AmazonWebServiceResult&& result)
-{
- m_policy = result.TakeOwnershipOfPayload();
-
const auto& headers = result.GetHeaderValueCollection();
const auto& expirationIter = headers.find("x-amz-expiration");
if(expirationIter != headers.end())
@@ -87,5 +95,6 @@ CompleteMultipartUploadWithCallBackResult& CompleteMultipartUploadWithCallBackRe
{
m_requestCharged = RequestChargedMapper::GetRequestChargedForName(requestChargedIter->second);
}
- return *this;
+
+ return *this;
}
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadResult.cpp
index 6d77f09c0..da81793a9 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadResult.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadResult.cpp
@@ -4,15 +4,14 @@
*/
#include
-#include
#include
#include
-#include
-
+#include
#include
+#include
using namespace Aws::S3::Model;
-using namespace Aws::Utils::Xml;
+using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
@@ -23,42 +22,35 @@ CompleteMultipartUploadResult::CompleteMultipartUploadResult() :
{
}
-CompleteMultipartUploadResult::CompleteMultipartUploadResult(const Aws::AmazonWebServiceResult& result) :
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+CompleteMultipartUploadResult::CompleteMultipartUploadResult(CompleteMultipartUploadResult&& toMove) :
+ m_policy(std::move(toMove.m_policy)),
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
- *this = result;
}
-CompleteMultipartUploadResult& CompleteMultipartUploadResult::operator =(const Aws::AmazonWebServiceResult& result)
+CompleteMultipartUploadResult& CompleteMultipartUploadResult::operator=(CompleteMultipartUploadResult&& toMove)
{
- const XmlDocument& xmlDocument = result.GetPayload();
- XmlNode resultNode = xmlDocument.GetRootElement();
- if(!resultNode.IsNull())
- {
- XmlNode locationNode = resultNode.FirstChild("Location");
- if(!locationNode.IsNull())
- {
- m_location = Aws::Utils::Xml::DecodeEscapedXmlText(locationNode.GetText());
- }
- XmlNode bucketNode = resultNode.FirstChild("Bucket");
- if(!bucketNode.IsNull())
- {
- m_bucket = Aws::Utils::Xml::DecodeEscapedXmlText(bucketNode.GetText());
- }
- XmlNode keyNode = resultNode.FirstChild("Key");
- if(!keyNode.IsNull())
- {
- m_key = Aws::Utils::Xml::DecodeEscapedXmlText(keyNode.GetText());
- }
- XmlNode eTagNode = resultNode.FirstChild("ETag");
- if(!eTagNode.IsNull())
- {
- m_eTag = Aws::Utils::Xml::DecodeEscapedXmlText(eTagNode.GetText());
- }
- }
+ if(this == &toMove)
+ {
+ return *this;
+ }
+
+ m_policy = std::move(toMove.m_policy);
+
+ return *this;
+}
+
+CompleteMultipartUploadResult::CompleteMultipartUploadResult(Aws::AmazonWebServiceResult&& result)
+{
+ *this = std::move(result);
+}
+CompleteMultipartUploadResult& CompleteMultipartUploadResult::operator =(Aws::AmazonWebServiceResult&& result)
+{
+ m_policy = result.TakeOwnershipOfPayload();
+
const auto& headers = result.GetHeaderValueCollection();
const auto& expirationIter = headers.find("x-amz-expiration");
if(expirationIter != headers.end())
@@ -95,6 +87,5 @@ CompleteMultipartUploadResult& CompleteMultipartUploadResult::operator =(const A
{
m_requestCharged = RequestChargedMapper::GetRequestChargedForName(requestChargedIter->second);
}
-
- return *this;
+ return *this;
}
--
Gitee
From aa25249497424ea01ae49a6f910d775fea4030f9 Mon Sep 17 00:00:00 2001
From: luxy
Date: Wed, 23 Aug 2023 17:47:06 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=B0=86=E4=B8=8A=E4=BC=A0=E5=AF=B9?=
=?UTF-8?q?=E8=B1=A1=E5=86=99=E6=88=90=E4=B8=80=E4=B8=AA=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../include/aws/s3/OphxPutObject.h | 13 ---
.../aws-cpp-sdk-s3/include/aws/s3/S3Client.h | 20 ++--
...llBackResult.h => PutObjectOriginResult.h} | 97 +++++++------------
.../include/aws/s3/model/PutObjectResult.h | 41 ++++++--
.../aws-cpp-sdk-s3/source/OphxPutObject.cpp | 76 ---------------
.../aws-cpp-sdk-s3/source/S3Client.cpp | 44 ++++-----
.../GetBucketCallBackConfigurationResult.cpp | 10 +-
...ckResult.cpp => PutObjectOriginResult.cpp} | 62 ++++--------
.../source/model/PutObjectResult.cpp | 60 +++++++++---
9 files changed, 169 insertions(+), 254 deletions(-)
delete mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/OphxPutObject.h
rename aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/{PutObjectWithCallBackResult.h => PutObjectOriginResult.h} (79%)
delete mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/OphxPutObject.cpp
rename aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/{PutObjectWithCallBackResult.cpp => PutObjectOriginResult.cpp} (60%)
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/OphxPutObject.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/OphxPutObject.h
deleted file mode 100644
index 530ea6cf5..000000000
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/OphxPutObject.h
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- int ophx_object_put(const char* ak, const char* sk, const char* endpoint, const char* bucket_name, const char* objectKey, const char *data, long long contentlenth);
- void ophx_option_init(void **pp_option);
- void ophx_option_shutdown(void *pp_option);
-#ifdef __cplusplus
-}
-#endif
-
-
-
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/S3Client.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/S3Client.h
index 9d34c085a..1427c5deb 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/S3Client.h
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/S3Client.h
@@ -51,7 +51,7 @@
#include
#include
#include
-#include
+#include
#include
#include
@@ -82,8 +82,8 @@
#include
#include
#include
+#include
#include
-#include
#include
@@ -361,8 +361,8 @@ namespace Aws
typedef Aws::Utils::Outcome PutBucketTaggingOutcome;
typedef Aws::Utils::Outcome PutBucketVersioningOutcome;
typedef Aws::Utils::Outcome PutBucketWebsiteOutcome;
+ typedef Aws::Utils::Outcome PutObjectOriginOutcome;
typedef Aws::Utils::Outcome PutObjectOutcome;
- typedef Aws::Utils::Outcome PutObjectWithCallBackOutcome;
typedef Aws::Utils::Outcome PutObjectAclOutcome;
typedef Aws::Utils::Outcome PutObjectLegalHoldOutcome;
@@ -486,9 +486,9 @@ namespace Aws
typedef std::future PutBucketTaggingOutcomeCallable;
typedef std::future PutBucketVersioningOutcomeCallable;
typedef std::future PutBucketWebsiteOutcomeCallable;
- typedef std::future PutObjectOutcomeCallable;
+ typedef std::future PutObjectOriginOutcomeCallable;
- typedef std::future PutObjectWithCallBackOutcomeCallable;
+ typedef std::future PutObjectOutcomeCallable;
typedef std::future PutObjectAclOutcomeCallable;
@@ -650,8 +650,8 @@ namespace Aws
typedef std::function&) > PutBucketTaggingResponseReceivedHandler;
typedef std::function&) > PutBucketVersioningResponseReceivedHandler;
typedef std::function&) > PutBucketWebsiteResponseReceivedHandler;
+ typedef std::function&) > PutObjectOriginResponseReceivedHandler;
typedef std::function&) > PutObjectResponseReceivedHandler;
- typedef std::function&) > PutObjectWithCallBackResponseReceivedHandler;
typedef std::function&) > PutObjectAclResponseReceivedHandler;
typedef std::function&) > PutObjectLegalHoldResponseReceivedHandler;
@@ -9184,8 +9184,8 @@ namespace Aws
* href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject">AWS API
* Reference
*/
+ virtual Model::PutObjectOriginOutcome PutObjectOrigin(const Model::PutObjectRequest& request) const;
virtual Model::PutObjectOutcome PutObject(const Model::PutObjectRequest& request) const;
- virtual Model::PutObjectWithCallBackOutcome PutObjectWithCallBack(const Model::PutObjectRequest& request) const;
/**
* Adds an object to a bucket. You must have WRITE permissions on a bucket to
@@ -9253,8 +9253,8 @@ namespace Aws
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
+ virtual Model::PutObjectOriginOutcomeCallable PutObjectOriginCallable(const Model::PutObjectRequest& request) const;
virtual Model::PutObjectOutcomeCallable PutObjectCallable(const Model::PutObjectRequest& request) const;
- virtual Model::PutObjectWithCallBackOutcomeCallable PutObjectWithCallBackCallable(const Model::PutObjectRequest& request) const;
/**
*
Adds an object to a bucket. You must have WRITE permissions on a bucket to
@@ -9322,8 +9322,8 @@ namespace Aws
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
+ virtual void PutObjectOriginAsync(const Model::PutObjectRequest& request, const PutObjectOriginResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
virtual void PutObjectAsync(const Model::PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
- virtual void PutObjectWithCallBackAsync(const Model::PutObjectRequest& request, const PutObjectWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Uses the acl
subresource to set the access control list (ACL)
@@ -11508,8 +11508,8 @@ namespace Aws
void PutBucketTaggingAsyncHelper(const Model::PutBucketTaggingRequest& request, const PutBucketTaggingResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void PutBucketVersioningAsyncHelper(const Model::PutBucketVersioningRequest& request, const PutBucketVersioningResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void PutBucketWebsiteAsyncHelper(const Model::PutBucketWebsiteRequest& request, const PutBucketWebsiteResponseReceivedHandler& handler, const std::shared_ptr& context) const;
+ void PutObjectOriginAsyncHelper(const Model::PutObjectRequest& request, const PutObjectOriginResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void PutObjectAsyncHelper(const Model::PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const;
- void PutObjectWithCallBackAsyncHelper(const Model::PutObjectRequest& request, const PutObjectWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const;
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectWithCallBackResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectOriginResult.h
similarity index 79%
rename from aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectWithCallBackResult.h
rename to aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectOriginResult.h
index 4f6b3eb11..cc2500245 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectWithCallBackResult.h
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectOriginResult.h
@@ -5,49 +5,33 @@
#pragma once
#include
-#include
#include
#include
#include
#include
-
namespace Aws
{
template
class AmazonWebServiceResult;
+namespace Utils
+{
+namespace Xml
+{
+ class XmlDocument;
+} // namespace Xml
+} // namespace Utils
namespace S3
{
namespace Model
{
- class AWS_S3_API PutObjectWithCallBackResult
+ class AWS_S3_API PutObjectOriginResult
{
public:
- PutObjectWithCallBackResult();
- //We have to define these because Microsoft doesn't auto generate them
- PutObjectWithCallBackResult(PutObjectWithCallBackResult&&);
- PutObjectWithCallBackResult& operator=(PutObjectWithCallBackResult&&);
- //we delete these because Microsoft doesn't handle move generation correctly
- //and we therefore don't trust them to get it right here either.
- PutObjectWithCallBackResult(const PutObjectWithCallBackResult&) = delete;
- PutObjectWithCallBackResult& operator=(const PutObjectWithCallBackResult&) = delete;
-
-
- PutObjectWithCallBackResult(Aws::AmazonWebServiceResult&& result);
- PutObjectWithCallBackResult& operator=(Aws::AmazonWebServiceResult&& result);
-
-
-
- /**
- * The bucket policy as a JSON document.
- */
- inline Aws::IOStream& GetPolicy() { return m_policy.GetUnderlyingStream(); }
-
- /**
- * The bucket policy as a JSON document.
- */
- inline void ReplaceBody(Aws::IOStream* body) { m_policy = Aws::Utils::Stream::ResponseStream(body); }
+ PutObjectOriginResult();
+ PutObjectOriginResult(const Aws::AmazonWebServiceResult& result);
+ PutObjectOriginResult& operator=(const Aws::AmazonWebServiceResult& result);
/**
@@ -93,7 +77,7 @@ namespace Model
* key-value pairs that provide information about object expiration. The value of
* the rule-id is URL encoded.
*/
- inline PutObjectWithCallBackResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;}
+ inline PutObjectOriginResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;}
/**
* If the expiration is configured for the object (see
*/
- inline PutObjectWithCallBackResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;}
/**
* If the expiration is configured for the object (see
*/
- inline PutObjectWithCallBackResult& WithExpiration(const char* value) { SetExpiration(value); return *this;}
+ inline PutObjectOriginResult& WithExpiration(const char* value) { SetExpiration(value); return *this;}
/**
@@ -137,17 +121,17 @@ namespace Model
/**
* Entity tag for the uploaded object.
*/
- inline PutObjectWithCallBackResult& WithETag(const Aws::String& value) { SetETag(value); return *this;}
+ inline PutObjectOriginResult& WithETag(const Aws::String& value) { SetETag(value); return *this;}
/**
* Entity tag for the uploaded object.
*/
- inline PutObjectWithCallBackResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
/**
* Entity tag for the uploaded object.
*/
- inline PutObjectWithCallBackResult& WithETag(const char* value) { SetETag(value); return *this;}
+ inline PutObjectOriginResult& WithETag(const char* value) { SetETag(value); return *this;}
/**
@@ -180,7 +164,7 @@ namespace Model
* response includes this header. It confirms the encryption algorithm that Amazon
* S3 used to encrypt the object.
*/
- inline PutObjectWithCallBackResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;}
+ inline PutObjectOriginResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;}
/**
* If you specified server-side encryption either with an AWS KMS customer
@@ -188,7 +172,7 @@ namespace Model
* response includes this header. It confirms the encryption algorithm that Amazon
* S3 used to encrypt the object.
*/
- inline PutObjectWithCallBackResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;}
/**
@@ -214,17 +198,17 @@ namespace Model
/**
* Version of the object.
*/
- inline PutObjectWithCallBackResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
+ inline PutObjectOriginResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
/**
* Version of the object.
*/
- inline PutObjectWithCallBackResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
/**
* Version of the object.
*/
- inline PutObjectWithCallBackResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
+ inline PutObjectOriginResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
/**
@@ -260,21 +244,21 @@ namespace Model
* requested, the response will include this header confirming the encryption
* algorithm used.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;}
/**
* If server-side encryption with a customer-provided encryption key was
* requested, the response will include this header confirming the encryption
* algorithm used.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;}
/**
* If server-side encryption with a customer-provided encryption key was
* requested, the response will include this header confirming the encryption
* algorithm used.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;}
/**
@@ -310,21 +294,21 @@ namespace Model
* requested, the response will include this header to provide round-trip message
* integrity verification of the customer-provided encryption key.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;}
/**
* If server-side encryption with a customer-provided encryption key was
* requested, the response will include this header to provide round-trip message
* integrity verification of the customer-provided encryption key.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;}
/**
* If server-side encryption with a customer-provided encryption key was
* requested, the response will include this header to provide round-trip message
* integrity verification of the customer-provided encryption key.
*/
- inline PutObjectWithCallBackResult& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;}
+ inline PutObjectOriginResult& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;}
/**
@@ -365,7 +349,7 @@ namespace Model
* Service (AWS KMS) symmetric customer managed customer master key (CMK) that was
* used for the object.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;}
/**
* If x-amz-server-side-encryption
is present and has the value of
@@ -373,7 +357,7 @@ namespace Model
* Service (AWS KMS) symmetric customer managed customer master key (CMK) that was
* used for the object.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;}
/**
* If x-amz-server-side-encryption
is present and has the value of
@@ -381,7 +365,7 @@ namespace Model
* Service (AWS KMS) symmetric customer managed customer master key (CMK) that was
* used for the object.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;}
/**
@@ -417,21 +401,21 @@ namespace Model
* encryption. The value of this header is a base64-encoded UTF-8 string holding
* JSON with the encryption context key-value pairs.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSEncryptionContext(const Aws::String& value) { SetSSEKMSEncryptionContext(value); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSEncryptionContext(const Aws::String& value) { SetSSEKMSEncryptionContext(value); return *this;}
/**
* If present, specifies the AWS KMS Encryption Context to use for object
* encryption. The value of this header is a base64-encoded UTF-8 string holding
* JSON with the encryption context key-value pairs.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSEncryptionContext(Aws::String&& value) { SetSSEKMSEncryptionContext(std::move(value)); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSEncryptionContext(Aws::String&& value) { SetSSEKMSEncryptionContext(std::move(value)); return *this;}
/**
* If present, specifies the AWS KMS Encryption Context to use for object
* encryption. The value of this header is a base64-encoded UTF-8 string holding
* JSON with the encryption context key-value pairs.
*/
- inline PutObjectWithCallBackResult& WithSSEKMSEncryptionContext(const char* value) { SetSSEKMSEncryptionContext(value); return *this;}
+ inline PutObjectOriginResult& WithSSEKMSEncryptionContext(const char* value) { SetSSEKMSEncryptionContext(value); return *this;}
/**
@@ -450,7 +434,7 @@ namespace Model
* Indicates whether the uploaded object uses an S3 Bucket Key for server-side
* encryption with AWS KMS (SSE-KMS).
*/
- inline PutObjectWithCallBackResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;}
+ inline PutObjectOriginResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;}
@@ -463,15 +447,10 @@ namespace Model
inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); }
- inline PutObjectWithCallBackResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;}
-
-
- inline PutObjectWithCallBackResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
-
-
-
+ inline PutObjectOriginResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;}
+ inline PutObjectOriginResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
private:
@@ -494,8 +473,6 @@ namespace Model
bool m_bucketKeyEnabled;
RequestCharged m_requestCharged;
-
- Aws::Utils::Stream::ResponseStream m_policy;
};
} // namespace Model
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectResult.h
index a20fe77e5..4bf4fe04f 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectResult.h
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectResult.h
@@ -5,23 +5,18 @@
#pragma once
#include
+#include
#include
#include
#include
#include
+
namespace Aws
{
template
class AmazonWebServiceResult;
-namespace Utils
-{
-namespace Xml
-{
- class XmlDocument;
-} // namespace Xml
-} // namespace Utils
namespace S3
{
namespace Model
@@ -30,8 +25,29 @@ namespace Model
{
public:
PutObjectResult();
- PutObjectResult(const Aws::AmazonWebServiceResult& result);
- PutObjectResult& operator=(const Aws::AmazonWebServiceResult& result);
+ //We have to define these because Microsoft doesn't auto generate them
+ PutObjectResult(PutObjectResult&&);
+ PutObjectResult& operator=(PutObjectResult&&);
+ //we delete these because Microsoft doesn't handle move generation correctly
+ //and we therefore don't trust them to get it right here either.
+ PutObjectResult(const PutObjectResult&) = delete;
+ PutObjectResult& operator=(const PutObjectResult&) = delete;
+
+
+ PutObjectResult(Aws::AmazonWebServiceResult&& result);
+ PutObjectResult& operator=(Aws::AmazonWebServiceResult&& result);
+
+
+
+ /**
+ * The bucket policy as a JSON document.
+ */
+ inline Aws::IOStream& GetPolicy() { return m_policy.GetUnderlyingStream(); }
+
+ /**
+ * The bucket policy as a JSON document.
+ */
+ inline void ReplaceBody(Aws::IOStream* body) { m_policy = Aws::Utils::Stream::ResponseStream(body); }
/**
@@ -452,6 +468,11 @@ namespace Model
inline PutObjectResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
+
+
+
+
+
private:
Aws::String m_expiration;
@@ -473,6 +494,8 @@ namespace Model
bool m_bucketKeyEnabled;
RequestCharged m_requestCharged;
+
+ Aws::Utils::Stream::ResponseStream m_policy;
};
} // namespace Model
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/OphxPutObject.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/OphxPutObject.cpp
deleted file mode 100644
index fe286c713..000000000
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/OphxPutObject.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int ophx_object_put(const char* ak, const char* sk, const char* endpoint, const char* bucket_name, const char* objectKey, const char *data, long long contentlenth);
-void ophx_option_init(void **pp_option);
-void ophx_option_shutdown(void *pp_option);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-void ophx_option_init(void **pp_option){
- Aws::SDKOptions *options = (Aws::SDKOptions *)malloc(sizeof(Aws::SDKOptions));
- Aws::SDKOptions tmp;
- InitAPI(tmp);
- *options = tmp;
- *pp_option = options;
-}
-
-void ophx_option_shutdown(void *pp_option){
- Aws::SDKOptions options = *((Aws::SDKOptions *)pp_option);
- Aws::ShutdownAPI(options);
-}
-
-
-
-int ophx_object_put(const char* AK, const char* SK, const char* endpoint, const char* bucket_name, const char* objectKey, const char *data, long long contentlenth){
-
- int rc = 0;
-
- //创建认证连接
- Aws::S3::S3Client client=sugonGetClient(AK, SK, endpoint);
-
- Aws::S3::Model::PutObjectRequest request;
-
- request.WithKey(objectKey)
- .WithBucket(bucket_name);
-
- std::shared_ptr content = std::make_shared();
- *content << data;
- request.SetBody(content);
- if (contentlenth > 0 ){
- request.SetContentLength(contentlenth);
- }
-
- Aws::S3::Model::PutObjectOutcome outcome = client.PutObject(request);
- if (!outcome.IsSuccess()) {
- const Aws::S3::S3Error &err = outcome.GetError();
- std::cerr << "Error: PutObject: " <<
- err.GetExceptionName() << ": " << err.GetMessage() << std::endl;
- rc = -1;
-
- }
- std::cout <<"success"<(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
+ return PutObjectOriginOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
}
if (!request.KeyHasBeenSet())
{
AWS_LOGSTREAM_ERROR("PutObject", "Required field: Key, is not set");
- return PutObjectOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
+ return PutObjectOriginOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
}
ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(request.GetBucket());
if (!computeEndpointOutcome.IsSuccess())
{
- return PutObjectOutcome(computeEndpointOutcome.GetError());
+ return PutObjectOriginOutcome(computeEndpointOutcome.GetError());
}
Aws::Http::URI uri = computeEndpointOutcome.GetResult().endpoint;
Aws::StringStream ss;
@@ -4486,46 +4486,46 @@ PutObjectOutcome S3Client::PutObject(const PutObjectRequest& request) const
ss << request.GetKey();
uri.SetPath(uri.GetPath() + ss.str());
//std::cout<<"PutObject"< >(ALLOCATION_TAG, [this, request](){ return this->PutObject(request); } );
+ auto task = Aws::MakeShared< std::packaged_task< PutObjectOriginOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutObjectOrigin(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
-void S3Client::PutObjectAsync(const PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::PutObjectOriginAsync(const PutObjectRequest& request, const PutObjectOriginResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- m_executor->Submit( [this, request, handler, context](){ this->PutObjectAsyncHelper( request, handler, context ); } );
+ m_executor->Submit( [this, request, handler, context](){ this->PutObjectOriginAsyncHelper( request, handler, context ); } );
}
-void S3Client::PutObjectAsyncHelper(const PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::PutObjectOriginAsyncHelper(const PutObjectRequest& request, const PutObjectOriginResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- handler(this, request, PutObject(request), context);
+ handler(this, request, PutObjectOrigin(request), context);
}
-PutObjectWithCallBackOutcome S3Client::PutObjectWithCallBack(const PutObjectRequest& request) const
+PutObjectOutcome S3Client::PutObject(const PutObjectRequest& request) const
{
if (!request.BucketHasBeenSet())
{
AWS_LOGSTREAM_ERROR("PutObject", "Required field: Bucket, is not set");
- return PutObjectWithCallBackOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
+ return PutObjectOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Bucket]", false));
}
if (!request.KeyHasBeenSet())
{
AWS_LOGSTREAM_ERROR("PutObject", "Required field: Key, is not set");
- return PutObjectWithCallBackOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
+ return PutObjectOutcome(Aws::Client::AWSError(S3Errors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Key]", false));
}
ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(request.GetBucket());
if (!computeEndpointOutcome.IsSuccess())
{
- return PutObjectWithCallBackOutcome(computeEndpointOutcome.GetError());
+ return PutObjectOutcome(computeEndpointOutcome.GetError());
}
Aws::Http::URI uri = computeEndpointOutcome.GetResult().endpoint;
Aws::StringStream ss;
@@ -4533,25 +4533,25 @@ PutObjectWithCallBackOutcome S3Client::PutObjectWithCallBack(const PutObjectRequ
ss << request.GetKey();
uri.SetPath(uri.GetPath() + ss.str());
- return PutObjectWithCallBackOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
+ return PutObjectOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/));
}
-PutObjectWithCallBackOutcomeCallable S3Client::PutObjectWithCallBackCallable(const PutObjectRequest& request) const
+PutObjectOutcomeCallable S3Client::PutObjectCallable(const PutObjectRequest& request) const
{
- auto task = Aws::MakeShared< std::packaged_task< PutObjectWithCallBackOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutObjectWithCallBack(request); } );
+ auto task = Aws::MakeShared< std::packaged_task< PutObjectOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutObject(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
-void S3Client::PutObjectWithCallBackAsync(const PutObjectRequest& request, const PutObjectWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::PutObjectAsync(const PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- m_executor->Submit( [this, request, handler, context](){ this->PutObjectWithCallBackAsyncHelper( request, handler, context ); } );
+ m_executor->Submit( [this, request, handler, context](){ this->PutObjectAsyncHelper( request, handler, context ); } );
}
-void S3Client::PutObjectWithCallBackAsyncHelper(const PutObjectRequest& request, const PutObjectWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const
+void S3Client::PutObjectAsyncHelper(const PutObjectRequest& request, const PutObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const
{
- handler(this, request, PutObjectWithCallBack(request), context);
+ handler(this, request, PutObject(request), context);
}
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketCallBackConfigurationResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketCallBackConfigurationResult.cpp
index c8af8922c..07901d550 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketCallBackConfigurationResult.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketCallBackConfigurationResult.cpp
@@ -28,12 +28,16 @@ GetBucketCallBackConfigurationResult& GetBucketCallBackConfigurationResult::oper
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
- resultNode = resultNode.FirstChild("member");
-
if(!resultNode.IsNull())
{
- m_callBack = resultNode;
+ resultNode = resultNode.FirstChild("member");
+
+ if(!resultNode.IsNull())
+ {
+ m_callBack = resultNode;
+ }
}
+
return *this;
}
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectWithCallBackResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectOriginResult.cpp
similarity index 60%
rename from aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectWithCallBackResult.cpp
rename to aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectOriginResult.cpp
index b7997f297..2c9c2cb83 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectWithCallBackResult.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectOriginResult.cpp
@@ -3,70 +3,42 @@
* SPDX-License-Identifier: Apache-2.0.
*/
-#include
+#include
+#include
#include
#include
-#include
+#include
+
#include
-#include
using namespace Aws::S3::Model;
-using namespace Aws::Utils::Stream;
+using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
-PutObjectWithCallBackResult::PutObjectWithCallBackResult() :
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+PutObjectOriginResult::PutObjectOriginResult() :
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
}
-PutObjectWithCallBackResult::PutObjectWithCallBackResult(PutObjectWithCallBackResult&& toMove) :
- m_policy(std::move(toMove.m_policy)),
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+PutObjectOriginResult::PutObjectOriginResult(const Aws::AmazonWebServiceResult& result) :
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
+ *this = result;
}
-PutObjectWithCallBackResult& PutObjectWithCallBackResult::operator=(PutObjectWithCallBackResult&& toMove)
-{
- if(this == &toMove)
- {
- return *this;
- }
-
- m_policy = std::move(toMove.m_policy);
-
- return *this;
-}
-
-PutObjectWithCallBackResult::PutObjectWithCallBackResult(Aws::AmazonWebServiceResult&& result)
+PutObjectOriginResult& PutObjectOriginResult::operator =(const Aws::AmazonWebServiceResult& result)
{
- *this = std::move(result);
-}
+ const XmlDocument& xmlDocument = result.GetPayload();
+ XmlNode resultNode = xmlDocument.GetRootElement();
-PutObjectWithCallBackResult& PutObjectWithCallBackResult::operator =(Aws::AmazonWebServiceResult&& result)
-{
- m_policy = result.TakeOwnershipOfPayload();
- /*Aws::Http::HeaderValueCollection head = result.GetHeaderValueCollection();
-
- for(auto item = head.begin();item!=head.end();item++){
- Aws::String key = item->first;
- Aws::String value = item->second;
- key.erase(remove(key.begin(),key.end(),'\"'),key.end());
- value.erase(remove(value.begin(),value.end(),'\"'),value.end());
- if(key == "etag")
- {
- m_eTag = value;
- }
- //如果还需要判断返回的其他header值,直接在后面加else if就可以了
-
- //std::cout<second);
}
- return *this;
+ return *this;
}
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectResult.cpp
index b7277f91e..972e97082 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectResult.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectResult.cpp
@@ -4,41 +4,69 @@
*/
#include
-#include
#include
#include
-#include
-
+#include
#include
+#include
using namespace Aws::S3::Model;
-using namespace Aws::Utils::Xml;
+using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
-PutObjectResult::PutObjectResult() :
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+PutObjectResult::PutObjectResult() :
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
}
-PutObjectResult::PutObjectResult(const Aws::AmazonWebServiceResult& result) :
- m_serverSideEncryption(ServerSideEncryption::NOT_SET),
+PutObjectResult::PutObjectResult(PutObjectResult&& toMove) :
+ m_policy(std::move(toMove.m_policy)),
+ m_serverSideEncryption(ServerSideEncryption::NOT_SET),
m_bucketKeyEnabled(false),
m_requestCharged(RequestCharged::NOT_SET)
{
- *this = result;
}
-PutObjectResult& PutObjectResult::operator =(const Aws::AmazonWebServiceResult& result)
+PutObjectResult& PutObjectResult::operator=(PutObjectResult&& toMove)
{
- const XmlDocument& xmlDocument = result.GetPayload();
- XmlNode resultNode = xmlDocument.GetRootElement();
+ if(this == &toMove)
+ {
+ return *this;
+ }
- if(!resultNode.IsNull())
- {
- }
+ m_policy = std::move(toMove.m_policy);
+
+ return *this;
+}
+
+PutObjectResult::PutObjectResult(Aws::AmazonWebServiceResult&& result)
+{
+ *this = std::move(result);
+}
+
+PutObjectResult& PutObjectResult::operator =(Aws::AmazonWebServiceResult&& result)
+{
+ m_policy = result.TakeOwnershipOfPayload();
+ /*Aws::Http::HeaderValueCollection head = result.GetHeaderValueCollection();
+
+ for(auto item = head.begin();item!=head.end();item++){
+ Aws::String key = item->first;
+ Aws::String value = item->second;
+ key.erase(remove(key.begin(),key.end(),'\"'),key.end());
+ value.erase(remove(value.begin(),value.end(),'\"'),value.end());
+ if(key == "etag")
+ {
+ m_eTag = value;
+ }
+ //如果还需要判断返回的其他header值,直接在后面加else if就可以了
+
+ //std::cout<second);
}
- return *this;
+ return *this;
}
--
Gitee
From 12d12f06148e8a990067cd2a9cfc5af4d1cd1f61 Mon Sep 17 00:00:00 2001
From: luxy
Date: Thu, 24 Aug 2023 17:42:01 +0800
Subject: [PATCH 5/5] a
---
.../source/auth/AWSAuthSigner.cpp | 2 +
.../source/http/curl/CurlHttpClient.cpp | 1 +
.../source/http/windows/WinSyncHttpClient.cpp | 1 -
.../include/aws/s3/model/BucketStorageInfo.h | 186 +++++++++++++++++-
.../source/model/BucketStorageInfo.cpp | 50 ++++-
5 files changed, 235 insertions(+), 5 deletions(-)
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/auth/AWSAuthSigner.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/auth/AWSAuthSigner.cpp
index f2493f82b..9ec58074e 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/auth/AWSAuthSigner.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/auth/AWSAuthSigner.cpp
@@ -315,6 +315,7 @@ bool AWSAuthV4Signer::SignRequest(Aws::Http::HttpRequest& request, const char* r
request.SetAwsAuthorization(awsAuthString);
request.SetSigningAccessKey(credentials.GetAWSAccessKeyId());
request.SetSigningRegion(signingRegion);
+
return true;
}
@@ -352,6 +353,7 @@ bool AWSAuthV4Signer::PresignRequest(Aws::Http::HttpRequest& request, const char
DateTime now = GetSigningTimestamp();
Aws::String dateQueryValue = now.ToGmtString(DateFormat::ISO_8601_BASIC);
request.AddQueryStringParameter(Http::AWS_DATE_HEADER, dateQueryValue);
+
Aws::StringStream headersStream;
Aws::StringStream signedHeadersStream;
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp
index e6d738182..ce5f6ec04 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp
@@ -530,6 +530,7 @@ std::shared_ptr CurlHttpClient::MakeRequest(const std::shared_ptr<
Aws::String headerString = headerStream.str();
AWS_LOGSTREAM_TRACE(CURL_HTTP_CLIENT_TAG, headerString);
headers = curl_slist_append(headers, headerString.c_str());
+ std::cout<HasHeader(Http::TRANSFER_ENCODING_HEADER))
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/windows/WinSyncHttpClient.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/windows/WinSyncHttpClient.cpp
index 2b644c8ec..48a1bc4cf 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/windows/WinSyncHttpClient.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/http/windows/WinSyncHttpClient.cpp
@@ -74,7 +74,6 @@ void WinSyncHttpClient::AddHeadersToRequest(const std::shared_ptr&
{
ss << header.first << ": " << header.second << "\r\n";
}
-
Aws::String headerString = ss.str();
AWS_LOGSTREAM_DEBUG(GetLogTag(), headerString);
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h
index 1e71fe7e3..70370ee61 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h
@@ -164,10 +164,194 @@ namespace Model
*/
inline BucketStorageInfo& WithObjectNumber(const char* value) { SetObjectNumber(value); return *this;}
-
+
+
+
+
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline const Aws::String& GetBucket() const{ return m_bucket; }
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline BucketStorageInfo& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline BucketStorageInfo& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
+
+ /**
+ * Specifies the S3 bucket whose ACL is being requested.
+ */
+ inline BucketStorageInfo& WithBucket(const char* value) { SetBucket(value); return *this;}
+
+
+/**
+ * Container for the ID of the owner.
+ */
+ inline const Aws::String& GetBucketId() const{ return m_bucketId; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline bool BucketIdHasBeenSet() const { return m_bucketIdHasBeenSet; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetBucketId(const Aws::String& value) { m_bucketIdHasBeenSet = true; m_bucketId = value; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetBucketId(Aws::String&& value) { m_bucketIdHasBeenSet = true; m_bucketId = std::move(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetBucketId(const char* value) { m_bucketIdHasBeenSet = true; m_bucketId.assign(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithBucketId(const Aws::String& value) { SetBucketId(value); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithBucketId(Aws::String&& value) { SetBucketId(std::move(value)); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithBucketId(const char* value) { SetBucketId(value); return *this;}
+
+
+
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline const Aws::String& GetCode() const{ return m_code; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithCode(const Aws::String& value) { SetCode(value); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithCode(const char* value) { SetCode(value); return *this;}
+
+
+
+
+/**
+ * Container for the ID of the owner.
+ */
+ inline const Aws::String& GetMessage() const{ return m_message; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
+
+ /**
+ * Container for the ID of the owner.
+ */
+ inline BucketStorageInfo& WithMessage(const char* value) { SetMessage(value); return *this;}
+
+
private:
+ Aws::String m_message;
+ bool m_messageHasBeenSet;
+
+ Aws::String m_code;
+ bool m_codeHasBeenSet;
+
+ Aws::String m_bucket;
+ bool m_bucketHasBeenSet;
+
+ Aws::String m_bucketId;
+ bool m_bucketIdHasBeenSet;
+
Aws::String m_objectNumber;
bool m_objectNumberHasBeenSet;
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp
index c86bbc206..0451ec13f 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp
@@ -23,14 +23,22 @@ namespace Model
BucketStorageInfo::BucketStorageInfo() :
m_objectNumberHasBeenSet(false),
m_physicalSizeHasBeenSet(false),
- m_sizeHasBeenSet(false)
+ m_sizeHasBeenSet(false),
+ m_bucketHasBeenSet(false),
+ m_bucketIdHasBeenSet(false),
+ m_codeHasBeenSet(false),
+ m_messageHasBeenSet(false)
{
}
BucketStorageInfo::BucketStorageInfo(const XmlNode& xmlNode) :
m_objectNumberHasBeenSet(false),
m_physicalSizeHasBeenSet(false),
- m_sizeHasBeenSet(false)
+ m_sizeHasBeenSet(false),
+ m_bucketHasBeenSet(false),
+ m_bucketIdHasBeenSet(false),
+ m_codeHasBeenSet(false),
+ m_messageHasBeenSet(false)
{
*this = xmlNode;
}
@@ -54,11 +62,47 @@ BucketStorageInfo& BucketStorageInfo::operator =(const XmlNode& xmlNode)
m_physicalSizeHasBeenSet = true;
}
XmlNode objectNumberNode = resultNode.FirstChild("ObjectNumber");
- if(!physicalNode.IsNull())
+ if(!objectNumberNode.IsNull())
{
m_objectNumber = Aws::Utils::Xml::DecodeEscapedXmlText(objectNumberNode.GetText());
m_objectNumberHasBeenSet = true;
}
+ XmlNode bucketNameNode = resultNode.FirstChild("BucketName");
+ if(!bucketNameNode.IsNull())
+ {
+ m_bucket = Aws::Utils::Xml::DecodeEscapedXmlText(bucketNameNode.GetText());
+ m_bucketHasBeenSet = true;
+ }
+ XmlNode bucketIdNode = resultNode.FirstChild("BucketId");
+ if(!bucketIdNode.IsNull())
+ {
+ m_bucketId = Aws::Utils::Xml::DecodeEscapedXmlText(bucketIdNode.GetText());
+ m_bucketIdHasBeenSet = true;
+ }
+
+ XmlNode errorNode = resultNode.FirstChild("Error");
+ if(!errorNode.IsNull())
+ {
+ XmlNode bucketNameNode = errorNode.FirstChild("BucketName");
+ if(!bucketNameNode.IsNull())
+ {
+ m_bucket = Aws::Utils::Xml::DecodeEscapedXmlText(bucketNameNode.GetText());
+ m_bucketHasBeenSet = true;
+ }
+ XmlNode codeNode = errorNode.FirstChild("Code");
+ if(!codeNode.IsNull())
+ {
+ m_code = Aws::Utils::Xml::DecodeEscapedXmlText(codeNode.GetText());
+ m_codeHasBeenSet = true;
+ }
+ XmlNode messageNode = errorNode.FirstChild("Message");
+ if(!messageNode.IsNull())
+ {
+ m_message = Aws::Utils::Xml::DecodeEscapedXmlText(messageNode.GetText());
+ m_messageHasBeenSet = true;
+ }
+ }
+
}
return *this;
--
Gitee