From fec88a39327b6ad44f65e27e3cfc721534fa4172 Mon Sep 17 00:00:00 2001 From: luxy Date: Thu, 15 Jun 2023 09:03:08 +0800 Subject: [PATCH 01/10] test --- .../aws-cpp-sdk-iam/include/aws/iam/model/User.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h index 3c3cb7ca3..4bd36c8e1 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h @@ -46,7 +46,7 @@ namespace Model void OutputToStream(Aws::OStream& oStream, const char* location) const; - /** + /**test *

The path to the user. For more information about paths, see IAM * identifiers in the IAM User Guide.

The ARN of the policy used -- Gitee From 065fe78f11e90542dd9685086b1e4fec5eea6be2 Mon Sep 17 00:00:00 2001 From: luxy Date: Thu, 15 Jun 2023 09:06:57 +0800 Subject: [PATCH 02/10] test --- .../aws-cpp-sdk-iam/include/aws/iam/model/User.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h index 4bd36c8e1..3c3cb7ca3 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/User.h @@ -46,7 +46,7 @@ namespace Model void OutputToStream(Aws::OStream& oStream, const char* location) const; - /**test + /** *

The path to the user. For more information about paths, see IAM * identifiers in the IAM User Guide.

The ARN of the policy used -- Gitee From 0843655b65994a2791b3c2bed90d20829770c35a Mon Sep 17 00:00:00 2001 From: luxy Date: Thu, 15 Jun 2023 09:14:10 +0800 Subject: [PATCH 03/10] append object tag --- .../aws/s3/model/AppendObjectRequest.h | 44 ++++++++++++++++++- .../source/model/AppendObjectRequest.cpp | 10 ++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h index 4776dea50..be7dd6181 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h @@ -889,10 +889,50 @@ namespace Model inline AppendObjectRequest& WithMetaDataValue(const char* value) { SetMetaDataValue(value); return *this;} + /** + *

The name of the bucket to create.

+ */ + inline const Aws::String& GetTag() const{ return m_tag; } + + /** + *

The name of the bucket to create.

+ */ + inline bool TagHasBeenSet() const { return m_tagHasBeenSet; } + + /** + *

The name of the bucket to create.

+ */ + inline void SetTag(const Aws::String& value) { m_tagHasBeenSet = true; m_tag = value; } + + /** + *

The name of the bucket to create.

+ */ + inline void SetTag(Aws::String&& value) { m_tagHasBeenSet = true; m_tag = std::move(value); } + + /** + *

The name of the bucket to create.

+ */ + inline void SetTag(const char* value) { m_tagHasBeenSet = true; m_tag.assign(value); } + + /** + *

The name of the bucket to create.

+ */ + inline AppendObjectRequest& WithTag(const Aws::String& value) { SetTag(value); return *this;} + + /** + *

The name of the bucket to create.

+ */ + inline AppendObjectRequest& WithTag(Aws::String&& value) { SetTag(std::move(value)); return *this;} + + /** + *

The name of the bucket to create.

+ */ + inline AppendObjectRequest& WithTag(const char* value) { SetTag(value); return *this;} +private: - - private: + Aws::String m_tag; + bool m_tagHasBeenSet; Aws::String m_replace; bool m_replaceHasBeenSet; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/AppendObjectRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/AppendObjectRequest.cpp index cc9b9c495..323c0795f 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/AppendObjectRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/AppendObjectRequest.cpp @@ -39,7 +39,8 @@ AppendObjectRequest::AppendObjectRequest() : m_replaceHasBeenSet(false), m_metaDataValueHasBeenSet(false), m_metaDataKeyHasBeenSet(false), - m_position("0") + m_position("0"), + m_tagHasBeenSet(false) { } @@ -70,6 +71,13 @@ Aws::Http::HeaderValueCollection AppendObjectRequest::GetRequestSpecificHeaders( Aws::Http::HeaderValueCollection headers; Aws::StringStream ss; + if(m_tagHasBeenSet) + { + ss << m_tag; + headers.emplace("x-amz-tagging", ss.str()); + ss.str(""); + } + if(m_replaceHasBeenSet) { ss << m_replace; -- Gitee From 3449cad84436b3e0dc2f4cf5b6436abb5a9b7817 Mon Sep 17 00:00:00 2001 From: luxy Date: Thu, 15 Jun 2023 17:00:29 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=A1=B6=E5=85=83=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=85=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../include/aws/s3/model/MetaData.h | 137 ++++++++++++++++++ .../PutBucketMetaDataConfigurationRequest.h | 131 ++++++----------- .../PutObjectMetaDataConfigurationRequest.h | 136 ++++++----------- .../aws-cpp-sdk-s3/source/model/MetaData.cpp | 48 ++++++ .../PutBucketMetaDataConfigurationRequest.cpp | 16 +- .../PutObjectMetaDataConfigurationRequest.cpp | 21 ++- 6 files changed, 303 insertions(+), 186 deletions(-) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/MetaData.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/MetaData.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/MetaData.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/MetaData.h new file mode 100644 index 000000000..3a2bc025a --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/MetaData.h @@ -0,0 +1,137 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace Utils +{ +namespace Xml +{ + class XmlNode; +} // namespace Xml +} // namespace Utils +namespace S3 +{ +namespace Model +{ + + /** + *

The Filter is used to identify objects that a Lifecycle Rule + * applies to. A Filter must have exactly one of Prefix, + * Tag, or And specified.

See Also:

AWS + * API Reference

+ */ + class AWS_S3_API MetaData + { + public: + MetaData(); + MetaData(const Aws::Utils::Xml::XmlNode& xmlNode); + MetaData& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); + + void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; + + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline const Aws::String& GetMetaDataKey() const{ return m_metaDataKey; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline bool MetaDataKeyHasBeenSet() const { return m_metaDataKeyHasBeenSet; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataKey(const Aws::String& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = value; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataKey(Aws::String&& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = std::move(value); } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataKey(const char* value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey.assign(value); } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataKey(const Aws::String& value) { SetMetaDataKey(value); return *this;} + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataKey(Aws::String&& value) { SetMetaDataKey(std::move(value)); return *this;} + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataKey(const char* value) { SetMetaDataKey(value); return *this;} + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline const Aws::String& GetMetaDataValue() const{ return m_metaDataValue; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline bool MetaDataValueHasBeenSet() const { return m_metaDataValueHasBeenSet; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataValue(const Aws::String& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = value; } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataValue(Aws::String&& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = std::move(value); } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline void SetMetaDataValue(const char* value) { m_metaDataValueHasBeenSet = true; m_metaDataValue.assign(value); } + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataValue(const Aws::String& value) { SetMetaDataValue(value); return *this;} + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataValue(Aws::String&& value) { SetMetaDataValue(std::move(value)); return *this;} + + /** + *

The name of the bucket for which to set the configuration.

+ */ + inline MetaData& WithMetaDataValue(const char* value) { SetMetaDataValue(value); return *this;} + + + + private: + + Aws::String m_metaDataValue; + bool m_metaDataValueHasBeenSet; + + Aws::String m_metaDataKey; + bool m_metaDataKeyHasBeenSet; + + }; + +} // namespace Model +} // namespace S3 +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutBucketMetaDataConfigurationRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutBucketMetaDataConfigurationRequest.h index eb42c6610..148e92a45 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutBucketMetaDataConfigurationRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutBucketMetaDataConfigurationRequest.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Aws @@ -181,45 +182,6 @@ namespace Model inline PutBucketMetaDataConfigurationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } - /** - *

The name of the bucket for which to set the configuration.

- */ - inline const Aws::String& GetMetaDataKey() const{ return m_metaDataKey; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline bool MetaDataKeyHasBeenSet() const { return m_metaDataKeyHasBeenSet; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(const Aws::String& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = value; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(Aws::String&& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = std::move(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(const char* value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey.assign(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataKey(const Aws::String& value) { SetMetaDataKey(value); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataKey(Aws::String&& value) { SetMetaDataKey(std::move(value)); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataKey(const char* value) { SetMetaDataKey(value); return *this;} /** @@ -263,61 +225,62 @@ namespace Model inline PutBucketMetaDataConfigurationRequest& WithReplace(const char* value) { SetReplace(value); return *this;} - + + + + inline const Aws::Vector& GetMetas() const{ return m_metas; } +/** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline bool MetasHasBeenSet() const { return m_metasHasBeenSet; } + /** - *

The name of the bucket for which to set the configuration.

- */ - inline const Aws::String& GetMetaDataValue() const{ return m_metaDataValue; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline bool MetaDataValueHasBeenSet() const { return m_metaDataValueHasBeenSet; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(const Aws::String& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = value; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(Aws::String&& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = std::move(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(const char* value) { m_metaDataValueHasBeenSet = true; m_metaDataValue.assign(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataValue(const Aws::String& value) { SetMetaDataValue(value); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataValue(Aws::String&& value) { SetMetaDataValue(std::move(value)); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutBucketMetaDataConfigurationRequest& WithMetaDataValue(const char* value) { SetMetaDataValue(value); return *this;} + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline void SetMetas(const Aws::Vector& value) { m_metasHasBeenSet = true; m_metas = value; } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline void SetMetas(Aws::Vector&& value) { m_metasHasBeenSet = true; m_metas = std::move(value); } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutBucketMetaDataConfigurationRequest& WithMetas(const Aws::Vector& value) { SetMetas(value); return *this;} + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutBucketMetaDataConfigurationRequest& WithMetas(Aws::Vector&& value) { SetMetas(std::move(value)); return *this;} + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutBucketMetaDataConfigurationRequest& AddMetas(const MetaData& value) { m_metasHasBeenSet = true; m_metas.push_back(value); return *this; } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutBucketMetaDataConfigurationRequest& AddMetas(MetaData&& value) { m_metasHasBeenSet = true; m_metas.push_back(std::move(value)); return *this; } - private: Aws::String m_replace; bool m_replaceHasBeenSet; - Aws::String m_metaDataValue; - bool m_metaDataValueHasBeenSet; - - Aws::String m_metaDataKey; - bool m_metaDataKeyHasBeenSet; + Aws::Vector m_metas; + bool m_metasHasBeenSet; Aws::String m_bucket; bool m_bucketHasBeenSet; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectMetaDataConfigurationRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectMetaDataConfigurationRequest.h index 3145254e6..5751cbaec 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectMetaDataConfigurationRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/PutObjectMetaDataConfigurationRequest.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Aws @@ -181,46 +182,6 @@ namespace Model inline PutObjectMetaDataConfigurationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } - /** - *

The name of the bucket for which to set the configuration.

- */ - inline const Aws::String& GetMetaDataKey() const{ return m_metaDataKey; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline bool MetaDataKeyHasBeenSet() const { return m_metaDataKeyHasBeenSet; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(const Aws::String& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = value; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(Aws::String&& value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey = std::move(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataKey(const char* value) { m_metaDataKeyHasBeenSet = true; m_metaDataKey.assign(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataKey(const Aws::String& value) { SetMetaDataKey(value); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataKey(Aws::String&& value) { SetMetaDataKey(std::move(value)); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataKey(const char* value) { SetMetaDataKey(value); return *this;} - /** *

The name of the bucket for which to set the configuration.

@@ -262,48 +223,6 @@ namespace Model */ inline PutObjectMetaDataConfigurationRequest& WithReplace(const char* value) { SetReplace(value); return *this;} - - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline const Aws::String& GetMetaDataValue() const{ return m_metaDataValue; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline bool MetaDataValueHasBeenSet() const { return m_metaDataValueHasBeenSet; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(const Aws::String& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = value; } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(Aws::String&& value) { m_metaDataValueHasBeenSet = true; m_metaDataValue = std::move(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline void SetMetaDataValue(const char* value) { m_metaDataValueHasBeenSet = true; m_metaDataValue.assign(value); } - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataValue(const Aws::String& value) { SetMetaDataValue(value); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataValue(Aws::String&& value) { SetMetaDataValue(std::move(value)); return *this;} - - /** - *

The name of the bucket for which to set the configuration.

- */ - inline PutObjectMetaDataConfigurationRequest& WithMetaDataValue(const char* value) { SetMetaDataValue(value); return *this;} - /** *

Object key for which the PUT action was initiated.

*/ @@ -345,6 +264,50 @@ namespace Model inline PutObjectMetaDataConfigurationRequest& WithKey(const char* value) { SetKey(value); return *this;} + inline const Aws::Vector& GetMetas() const{ return m_metas; } + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline bool MetasHasBeenSet() const { return m_metasHasBeenSet; } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline void SetMetas(const Aws::Vector& value) { m_metasHasBeenSet = true; m_metas = value; } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline void SetMetas(Aws::Vector&& value) { m_metasHasBeenSet = true; m_metas = std::move(value); } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutObjectMetaDataConfigurationRequest& WithMetas(const Aws::Vector& value) { SetMetas(value); return *this;} + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutObjectMetaDataConfigurationRequest& WithMetas(Aws::Vector&& value) { SetMetas(std::move(value)); return *this;} + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutObjectMetaDataConfigurationRequest& AddMetas(const MetaData& value) { m_metasHasBeenSet = true; m_metas.push_back(value); return *this; } + + /** + *

Specifies when an Amazon S3 object transitions to a specified storage + * class.

+ */ + inline PutObjectMetaDataConfigurationRequest& AddMetas(MetaData&& value) { m_metasHasBeenSet = true; m_metas.push_back(std::move(value)); return *this; } + + private: @@ -354,12 +317,9 @@ namespace Model Aws::String m_replace; bool m_replaceHasBeenSet; - - Aws::String m_metaDataValue; - bool m_metaDataValueHasBeenSet; - - Aws::String m_metaDataKey; - bool m_metaDataKeyHasBeenSet; + + Aws::Vector m_metas; + bool m_metasHasBeenSet; Aws::String m_bucket; bool m_bucketHasBeenSet; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/MetaData.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/MetaData.cpp new file mode 100644 index 000000000..529bba630 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/MetaData.cpp @@ -0,0 +1,48 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +#include + +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; + +namespace Aws +{ +namespace S3 +{ +namespace Model +{ + +MetaData::MetaData() : + m_metaDataKeyHasBeenSet(false), + m_metaDataValueHasBeenSet(false) +{ +} + +MetaData::MetaData(const XmlNode& xmlNode) : + m_metaDataKeyHasBeenSet(false), + m_metaDataValueHasBeenSet(false) +{ + *this = xmlNode; +} + +MetaData& MetaData::operator =(const XmlNode& xmlNode) +{ + return *this; +} + +void MetaData::AddToNode(XmlNode& parentNode) const +{ + +} + +} // namespace Model +} // namespace S3 +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketMetaDataConfigurationRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketMetaDataConfigurationRequest.cpp index 1cf3000b6..82ac5280b 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketMetaDataConfigurationRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketMetaDataConfigurationRequest.cpp @@ -20,8 +20,7 @@ PutBucketMetaDataConfigurationRequest::PutBucketMetaDataConfigurationRequest() : m_bucketHasBeenSet(false), m_expectedBucketOwnerHasBeenSet(false), m_customizedAccessLogTagHasBeenSet(false), - m_metaDataValueHasBeenSet(false), - m_metaDataKeyHasBeenSet(false), + m_metasHasBeenSet(false), m_replaceHasBeenSet(false) { } @@ -76,12 +75,17 @@ Aws::Http::HeaderValueCollection PutBucketMetaDataConfigurationRequest::GetReque headers.emplace("x-amz-metadata-directive", ss.str()); ss.str(""); } - if(m_metaDataValueHasBeenSet && m_metaDataKeyHasBeenSet) + + if(m_metasHasBeenSet) { - ss << m_metaDataValue; - headers.emplace("x-amz-meta-" + m_metaDataKey, ss.str()); - ss.str(""); + for(const auto&meta : m_metas) + { + ss << meta.GetMetaDataValue(); + headers.emplace("x-amz-meta-" + meta.GetMetaDataKey(), ss.str()); + ss.str(""); + } } + if(m_expectedBucketOwnerHasBeenSet) { ss << m_expectedBucketOwner; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectMetaDataConfigurationRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectMetaDataConfigurationRequest.cpp index 3634f9b3d..def5a8d5b 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectMetaDataConfigurationRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutObjectMetaDataConfigurationRequest.cpp @@ -20,8 +20,7 @@ PutObjectMetaDataConfigurationRequest::PutObjectMetaDataConfigurationRequest() : m_bucketHasBeenSet(false), m_expectedBucketOwnerHasBeenSet(false), m_customizedAccessLogTagHasBeenSet(false), - m_metaDataValueHasBeenSet(false), - m_metaDataKeyHasBeenSet(false), + m_metasHasBeenSet(false), m_keyHasBeenSet(false), m_replaceHasBeenSet(false) { @@ -77,12 +76,18 @@ Aws::Http::HeaderValueCollection PutObjectMetaDataConfigurationRequest::GetReque headers.emplace("x-amz-metadata-directive", ss.str()); ss.str(""); } - if(m_metaDataValueHasBeenSet && m_metaDataKeyHasBeenSet) - { - ss << m_metaDataValue; - headers.emplace("x-amz-meta-" + m_metaDataKey, ss.str()); - ss.str(""); - } + + if(m_metasHasBeenSet) + { + for(const auto&meta : m_metas) + { + ss << meta.GetMetaDataValue(); + headers.emplace("x-amz-meta-" + meta.GetMetaDataKey(), ss.str()); + ss.str(""); + } + } + + if(m_expectedBucketOwnerHasBeenSet) { ss << m_expectedBucketOwner; -- Gitee From aa67f92d5af93820283f991b567f4ab99cc5aa62 Mon Sep 17 00:00:00 2001 From: luxy Date: Fri, 16 Jun 2023 10:13:59 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E2=80=9Cxml=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E8=A1=8C=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp index 87938db4c..ebe0fd9ee 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-core/source/external/tinyxml2/tinyxml2.cpp @@ -669,7 +669,7 @@ char* XMLDocument::Identify( char* p, XMLNode** node ) TIXMLASSERT( p ); char* const start = p; int const startLine = _parseCurLineNum; - //p = XMLUtil::SkipWhiteSpace( p, &_parseCurLineNum ); + p = XMLUtil::SkipWhiteSpace( p, &_parseCurLineNum ); if( !*p ) { *node = 0; TIXMLASSERT( p ); -- Gitee From 18deea60ad52061aef7c87d7c9528a2507df8d73 Mon Sep 17 00:00:00 2001 From: luxy Date: Fri, 16 Jun 2023 11:00:53 +0800 Subject: [PATCH 06/10] append tag name --- .../include/aws/s3/model/AppendObjectRequest.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h index be7dd6181..f4db898b5 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/AppendObjectRequest.h @@ -892,42 +892,42 @@ namespace Model /** *

The name of the bucket to create.

*/ - inline const Aws::String& GetTag() const{ return m_tag; } + inline const Aws::String& GetTagging() const{ return m_tag; } /** *

The name of the bucket to create.

*/ - inline bool TagHasBeenSet() const { return m_tagHasBeenSet; } + inline bool TaggingHasBeenSet() const { return m_tagHasBeenSet; } /** *

The name of the bucket to create.

*/ - inline void SetTag(const Aws::String& value) { m_tagHasBeenSet = true; m_tag = value; } + inline void SetTagging(const Aws::String& value) { m_tagHasBeenSet = true; m_tag = value; } /** *

The name of the bucket to create.

*/ - inline void SetTag(Aws::String&& value) { m_tagHasBeenSet = true; m_tag = std::move(value); } + inline void SetTagging(Aws::String&& value) { m_tagHasBeenSet = true; m_tag = std::move(value); } /** *

The name of the bucket to create.

*/ - inline void SetTag(const char* value) { m_tagHasBeenSet = true; m_tag.assign(value); } + inline void SetTagging(const char* value) { m_tagHasBeenSet = true; m_tag.assign(value); } /** *

The name of the bucket to create.

*/ - inline AppendObjectRequest& WithTag(const Aws::String& value) { SetTag(value); return *this;} + inline AppendObjectRequest& WithTagging(const Aws::String& value) { SetTagging(value); return *this;} /** *

The name of the bucket to create.

*/ - inline AppendObjectRequest& WithTag(Aws::String&& value) { SetTag(std::move(value)); return *this;} + inline AppendObjectRequest& WithTagging(Aws::String&& value) { SetTagging(std::move(value)); return *this;} /** *

The name of the bucket to create.

*/ - inline AppendObjectRequest& WithTag(const char* value) { SetTag(value); return *this;} + inline AppendObjectRequest& WithTagging(const char* value) { SetTagging(value); return *this;} private: -- Gitee From 152a5e1669a37884a7e34e82222d424a799537da Mon Sep 17 00:00:00 2001 From: luxy Date: Tue, 18 Jul 2023 18:59:08 +0800 Subject: [PATCH 07/10] =?UTF-8?q?STS=20=E4=B8=8A=E4=BC=A0=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=20=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aws-cpp-sdk-s3/include/aws/s3/S3Client.h | 12 +- .../s3/model/BucketCallBackConfiguration.h | 118 ---- .../s3/model/CompleteMultipartUploadRequest.h | 3 - ...ompleteMultipartUploadWithCallBackResult.h | 573 ++++++++++++++++++ .../s3/model/PutObjectWithCallBackResult.h | 410 ++++++++++++- .../aws-cpp-sdk-s3/source/S3Client.cpp | 60 ++ .../model/BucketCallBackConfiguration.cpp | 20 - .../model/CompleteMultipartUploadResult.cpp | 1 - ...pleteMultipartUploadWithCallBackResult.cpp | 91 +++ .../model/PutObjectWithCallBackResult.cpp | 75 ++- 10 files changed, 1213 insertions(+), 150 deletions(-) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadWithCallBackResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/CompleteMultipartUploadWithCallBackResult.cpp 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 ad3cd466f..d8aea787b 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 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -253,6 +254,7 @@ namespace Aws typedef Aws::Utils::Outcome AbortMultipartUploadOutcome; typedef Aws::Utils::Outcome CompleteMultipartUploadOutcome; + typedef Aws::Utils::Outcome CompleteMultipartUploadWithCallBackOutcome; typedef Aws::Utils::Outcome CopyObjectOutcome; typedef Aws::Utils::Outcome CreateBucketOutcome; typedef Aws::Utils::Outcome CreateMultipartUploadOutcome; @@ -371,6 +373,7 @@ namespace Aws typedef std::future AbortMultipartUploadOutcomeCallable; typedef std::future CompleteMultipartUploadOutcomeCallable; + typedef std::future CompleteMultipartUploadWithCallBackOutcomeCallable; typedef std::future CopyObjectOutcomeCallable; typedef std::future CreateBucketOutcomeCallable; typedef std::future CreateMultipartUploadOutcomeCallable; @@ -508,7 +511,8 @@ namespace Aws typedef std::function&) > AbortMultipartUploadResponseReceivedHandler; typedef std::function&) > CompleteMultipartUploadResponseReceivedHandler; - typedef std::function&) > CopyObjectResponseReceivedHandler; + typedef std::function&) > CompleteMultipartUploadWithCallBackResponseReceivedHandler; + typedef std::function&) > CopyObjectResponseReceivedHandler; typedef std::function&) > CreateBucketResponseReceivedHandler; typedef std::function&) > CreateMultipartUploadResponseReceivedHandler; typedef std::function&) > DeleteBucketResponseReceivedHandler; @@ -858,6 +862,7 @@ namespace Aws * API Reference

*/ virtual Model::CompleteMultipartUploadOutcome CompleteMultipartUpload(const Model::CompleteMultipartUploadRequest& request) const; + virtual Model::CompleteMultipartUploadWithCallBackOutcome CompleteMultipartUploadWithCallBack(const Model::CompleteMultipartUploadRequest& request) const; /** *

Completes a multipart upload by assembling previously uploaded parts.

@@ -920,6 +925,7 @@ namespace Aws * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::CompleteMultipartUploadOutcomeCallable CompleteMultipartUploadCallable(const Model::CompleteMultipartUploadRequest& request) const; + virtual Model::CompleteMultipartUploadWithCallBackOutcomeCallable CompleteMultipartUploadWithCallBackCallable(const Model::CompleteMultipartUploadRequest& request) const; /** *

Completes a multipart upload by assembling previously uploaded parts.

@@ -982,6 +988,7 @@ namespace Aws * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void CompleteMultipartUploadAsync(const Model::CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + virtual void CompleteMultipartUploadWithCallBackAsync(const Model::CompleteMultipartUploadRequest& request, const CompleteMultipartUploadWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Creates a copy of an object that is already stored in Amazon S3.

@@ -11353,7 +11360,8 @@ namespace Aws void AbortMultipartUploadAsyncHelper(const Model::AbortMultipartUploadRequest& request, const AbortMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const; void CompleteMultipartUploadAsyncHelper(const Model::CompleteMultipartUploadRequest& request, const CompleteMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const; - void CopyObjectAsyncHelper(const Model::CopyObjectRequest& request, const CopyObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void CompleteMultipartUploadWithCallBackAsyncHelper(const Model::CompleteMultipartUploadRequest& request, const CompleteMultipartUploadWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void CopyObjectAsyncHelper(const Model::CopyObjectRequest& request, const CopyObjectResponseReceivedHandler& handler, const std::shared_ptr& context) const; void CreateBucketAsyncHelper(const Model::CreateBucketRequest& request, const CreateBucketResponseReceivedHandler& handler, const std::shared_ptr& context) const; void CreateMultipartUploadAsyncHelper(const Model::CreateMultipartUploadRequest& request, const CreateMultipartUploadResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteBucketAsyncHelper(const Model::DeleteBucketRequest& request, const DeleteBucketResponseReceivedHandler& 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/BucketCallBackConfiguration.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketCallBackConfiguration.h index 2ccdc29e5..5fcc706cd 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketCallBackConfiguration.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketCallBackConfiguration.h @@ -41,48 +41,6 @@ namespace Model void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline const Aws::Vector& GetRules() const{ return m_rules; } - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline void SetRules(const Aws::Vector& value) { m_rulesHasBeenSet = true; m_rules = value; } - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline void SetRules(Aws::Vector&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline BucketCallBackConfiguration& WithRules(const Aws::Vector& value) { SetRules(value); return *this;} - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline BucketCallBackConfiguration& WithRules(Aws::Vector&& value) { SetRules(std::move(value)); return *this;} - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline BucketCallBackConfiguration& AddRules(const LifecycleRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } - - /** - *

A lifecycle rule for individual objects in an Amazon S3 bucket.

- */ - inline BucketCallBackConfiguration& AddRules(LifecycleRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } - - inline const Aws::String& GetCallBackBodyType() const{ return m_callBackBodyType; } /** @@ -198,79 +156,7 @@ namespace Model */ inline BucketCallBackConfiguration& WithCallBackUrl(const char* value) { SetCallBackUrl(value); return *this;} - inline void HaveBucket(bool value) { - m_bucket = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "bucket=${bucket}&"; - } - } - - inline void HaveObject(bool value) { - m_object = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "object=${object}&"; - } - } - - inline void HaveEtag(bool value) { - m_etag = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "etag=${etag}&"; - } - } - - inline void HaveSize(bool value) { - m_size = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "size=${size}&"; - } - } - - inline void HaveTime(bool value) { - m_time = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "time=${ctime}&"; - } - } - - inline void HaveType(bool value) { - m_type = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "type=${mimeType}&"; - } - } - - inline void HaveVar(bool value) { - m_var = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "my_var=${x:my_var}&"; - } - } - - inline void HaveVar2(bool value) { - m_var2 = value; - if(value){ - m_callBackBodyHasBeenSet = true; - m_callBackBody = m_callBackBody + "my_var2=${x:my_var2}&"; - } - } - private: - bool m_var2; - bool m_var; - bool m_type; - bool m_time; - bool m_size; - bool m_etag; - bool m_object; - bool m_bucket; Aws::String m_callBackUrl; bool m_callBackUrlHasBeenSet; @@ -281,10 +167,6 @@ namespace Model Aws::String m_callBackBodyType; bool m_callBackBodyTypeHasBeenSet; - - - Aws::Vector m_rules; - bool m_rulesHasBeenSet; }; } // 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/CompleteMultipartUploadRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadRequest.h index 71104dd1d..74770a7b1 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadRequest.h @@ -466,9 +466,6 @@ namespace Model std::string m_callBackUrl; bool m_callBackUrlHasBeenSet; - - - Aws::String m_bucket; bool m_bucketHasBeenSet; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadWithCallBackResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadWithCallBackResult.h new file mode 100644 index 000000000..58809dc1d --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/CompleteMultipartUploadWithCallBackResult.h @@ -0,0 +1,573 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace S3 +{ +namespace Model +{ + class AWS_S3_API CompleteMultipartUploadWithCallBackResult + { + public: + CompleteMultipartUploadWithCallBackResult(); + //We have to define these because Microsoft doesn't auto generate them + CompleteMultipartUploadWithCallBackResult(CompleteMultipartUploadWithCallBackResult&&); + CompleteMultipartUploadWithCallBackResult& operator=(CompleteMultipartUploadWithCallBackResult&&); + //we delete these because Microsoft doesn't handle move generation correctly + //and we therefore don't trust them to get it right here either. + CompleteMultipartUploadWithCallBackResult(const CompleteMultipartUploadWithCallBackResult&) = delete; + CompleteMultipartUploadWithCallBackResult& operator=(const CompleteMultipartUploadWithCallBackResult&) = delete; + + + CompleteMultipartUploadWithCallBackResult(Aws::AmazonWebServiceResult&& result); + CompleteMultipartUploadWithCallBackResult& 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; } + + /** + *

The URI that identifies the newly created object.

+ */ + inline void SetLocation(const Aws::String& value) { m_location = value; } + + /** + *

The URI that identifies the newly created object.

+ */ + inline void SetLocation(Aws::String&& value) { m_location = std::move(value); } + + /** + *

The URI that identifies the newly created object.

+ */ + inline void SetLocation(const char* value) { m_location.assign(value); } + + /** + *

The URI that identifies the newly created object.

+ */ + inline CompleteMultipartUploadWithCallBackResult& 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;} + + /** + *

The URI that identifies the newly created object.

+ */ + inline CompleteMultipartUploadWithCallBackResult& WithLocation(const char* value) { SetLocation(value); return *this;} + + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline const Aws::String& GetBucket() const{ return m_bucket; } + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline void SetBucket(const Aws::String& value) { m_bucket = value; } + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline void SetBucket(Aws::String&& value) { m_bucket = std::move(value); } + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline void SetBucket(const char* value) { m_bucket.assign(value); } + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline CompleteMultipartUploadWithCallBackResult& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline CompleteMultipartUploadWithCallBackResult& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} + + /** + *

The name of the bucket that contains the newly created object.

When + * using this action with an access point, you must direct requests to the access + * point hostname. The access point hostname takes the form + * AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + * When using this action with an access point through the AWS SDKs, you provide + * the access point ARN in place of the bucket name. For more information about + * access point ARNs, see Using + * Access Points in the Amazon S3 User Guide.

When using this + * action with Amazon S3 on Outposts, you must direct requests to the S3 on + * Outposts hostname. The S3 on Outposts hostname takes the form + * AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + * When using this action using S3 on Outposts through the AWS SDKs, you provide + * the Outposts bucket ARN in place of the bucket name. For more information about + * S3 on Outposts ARNs, see Using + * S3 on Outposts in the Amazon S3 User Guide.

+ */ + inline CompleteMultipartUploadWithCallBackResult& WithBucket(const char* value) { SetBucket(value); return *this;} + + + /** + *

The object key of the newly created object.

+ */ + inline const Aws::String& GetKey() const{ return m_key; } + + /** + *

The object key of the newly created object.

+ */ + inline void SetKey(const Aws::String& value) { m_key = value; } + + /** + *

The object key of the newly created object.

+ */ + inline void SetKey(Aws::String&& value) { m_key = std::move(value); } + + /** + *

The object key of the newly created object.

+ */ + inline void SetKey(const char* value) { m_key.assign(value); } + + /** + *

The object key of the newly created object.

+ */ + inline CompleteMultipartUploadWithCallBackResult& 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;} + + /** + *

The object key of the newly created object.

+ */ + inline CompleteMultipartUploadWithCallBackResult& WithKey(const char* value) { SetKey(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 const Aws::String& GetExpiration() const{ return m_expiration; } + + /** + *

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 void SetExpiration(const Aws::String& value) { m_expiration = value; } + + /** + *

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 void SetExpiration(Aws::String&& value) { m_expiration = std::move(value); } + + /** + *

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 void SetExpiration(const char* value) { m_expiration.assign(value); } + + /** + *

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;} + + /** + *

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;} + + /** + *

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;} + + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * one or more nonhexadecimal characters and/or will consist of less than 32 or + * more than 32 hexadecimal digits.

+ */ + inline const Aws::String& GetETag() const{ return m_eTag; } + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * one or more nonhexadecimal characters and/or will consist of less than 32 or + * more than 32 hexadecimal digits.

+ */ + inline void SetETag(const Aws::String& value) { m_eTag = value; } + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * one or more nonhexadecimal characters and/or will consist of less than 32 or + * more than 32 hexadecimal digits.

+ */ + inline void SetETag(Aws::String&& value) { m_eTag = std::move(value); } + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * one or more nonhexadecimal characters and/or will consist of less than 32 or + * more than 32 hexadecimal digits.

+ */ + inline void SetETag(const char* value) { m_eTag.assign(value); } + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * 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;} + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * 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;} + + /** + *

Entity tag that identifies the newly created object's data. Objects with + * different object data will have different entity tags. The entity tag is an + * opaque string. The entity tag may or may not be an MD5 digest of the object + * data. If the entity tag is not an MD5 digest of the object data, it will contain + * 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;} + + + /** + *

If you specified server-side encryption either with an Amazon S3-managed + * encryption key or an AWS KMS customer master key (CMK) in your initiate + * multipart upload request, the response includes this header. It confirms the + * encryption algorithm that Amazon S3 used to encrypt the object.

+ */ + inline const ServerSideEncryption& GetServerSideEncryption() const{ return m_serverSideEncryption; } + + /** + *

If you specified server-side encryption either with an Amazon S3-managed + * encryption key or an AWS KMS customer master key (CMK) in your initiate + * multipart upload request, the response includes this header. It confirms the + * encryption algorithm that Amazon S3 used to encrypt the object.

+ */ + inline void SetServerSideEncryption(const ServerSideEncryption& value) { m_serverSideEncryption = value; } + + /** + *

If you specified server-side encryption either with an Amazon S3-managed + * encryption key or an AWS KMS customer master key (CMK) in your initiate + * multipart upload request, the response includes this header. It confirms the + * encryption algorithm that Amazon S3 used to encrypt the object.

+ */ + inline void SetServerSideEncryption(ServerSideEncryption&& value) { m_serverSideEncryption = std::move(value); } + + /** + *

If you specified server-side encryption either with an Amazon S3-managed + * encryption key or an AWS KMS customer master key (CMK) in your initiate + * 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;} + + /** + *

If you specified server-side encryption either with an Amazon S3-managed + * encryption key or an AWS KMS customer master key (CMK) in your initiate + * 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;} + + + /** + *

Version ID of the newly created object, in case the bucket has versioning + * turned on.

+ */ + inline const Aws::String& GetVersionId() const{ return m_versionId; } + + /** + *

Version ID of the newly created object, in case the bucket has versioning + * turned on.

+ */ + inline void SetVersionId(const Aws::String& value) { m_versionId = value; } + + /** + *

Version ID of the newly created object, in case the bucket has versioning + * turned on.

+ */ + inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); } + + /** + *

Version ID of the newly created object, in case the bucket has versioning + * turned on.

+ */ + inline void SetVersionId(const char* value) { m_versionId.assign(value); } + + /** + *

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;} + + /** + *

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;} + + /** + *

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;} + + + /** + *

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 const Aws::String& GetSSEKMSKeyId() const{ return m_sSEKMSKeyId; } + + /** + *

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 void SetSSEKMSKeyId(const Aws::String& value) { m_sSEKMSKeyId = value; } + + /** + *

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 void SetSSEKMSKeyId(Aws::String&& value) { m_sSEKMSKeyId = std::move(value); } + + /** + *

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 void SetSSEKMSKeyId(const char* value) { m_sSEKMSKeyId.assign(value); } + + /** + *

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 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;} + + /** + *

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;} + + + /** + *

Indicates whether the multipart upload uses an S3 Bucket Key for server-side + * encryption with AWS KMS (SSE-KMS).

+ */ + inline bool GetBucketKeyEnabled() const{ return m_bucketKeyEnabled; } + + /** + *

Indicates whether the multipart upload uses an S3 Bucket Key for server-side + * encryption with AWS KMS (SSE-KMS).

+ */ + inline void SetBucketKeyEnabled(bool value) { m_bucketKeyEnabled = value; } + + /** + *

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 const RequestCharged& GetRequestCharged() const{ return m_requestCharged; } + + + inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; } + + + inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); } + + + inline CompleteMultipartUploadWithCallBackResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;} + + + inline CompleteMultipartUploadWithCallBackResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;} + + private: + + Aws::String m_location; + + Aws::String m_bucket; + + Aws::String m_key; + + Aws::String m_expiration; + + Aws::String m_eTag; + + ServerSideEncryption m_serverSideEncryption; + + Aws::String m_versionId; + + Aws::String m_sSEKMSKeyId; + + bool m_bucketKeyEnabled; + + RequestCharged m_requestCharged; + + Aws::Utils::Stream::ResponseStream m_policy; + }; + +} // namespace Model +} // namespace S3 +} // namespace Aws 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/PutObjectWithCallBackResult.h index 248defc42..4f6b3eb11 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/PutObjectWithCallBackResult.h @@ -7,8 +7,11 @@ #include #include #include +#include +#include #include + namespace Aws { template @@ -47,6 +50,70 @@ namespace Model inline void ReplaceBody(Aws::IOStream* body) { m_policy = Aws::Utils::Stream::ResponseStream(body); } + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline const Aws::String& GetExpiration() const{ return m_expiration; } + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline void SetExpiration(const Aws::String& value) { m_expiration = value; } + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline void SetExpiration(Aws::String&& value) { m_expiration = std::move(value); } + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline void SetExpiration(const char* value) { m_expiration.assign(value); } + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * 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;} + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline PutObjectWithCallBackResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;} + + /** + *

If the expiration is configured for the object (see PutBucketLifecycleConfiguration), + * the response includes this header. It includes the expiry-date and rule-id + * key-value pairs that provide information about object expiration. The value of + * the rule-id is URL encoded.

+ */ + inline PutObjectWithCallBackResult& WithExpiration(const char* value) { SetExpiration(value); return *this;} + + /** *

Entity tag for the uploaded object.

*/ @@ -83,13 +150,352 @@ namespace Model inline PutObjectWithCallBackResult& WithETag(const char* value) { SetETag(value); return *this;} + /** + *

If you specified server-side encryption either with an AWS KMS customer + * master key (CMK) or Amazon S3-managed encryption key in your PUT request, the + * response includes this header. It confirms the encryption algorithm that Amazon + * S3 used to encrypt the object.

+ */ + inline const ServerSideEncryption& GetServerSideEncryption() const{ return m_serverSideEncryption; } + + /** + *

If you specified server-side encryption either with an AWS KMS customer + * master key (CMK) or Amazon S3-managed encryption key in your PUT request, the + * response includes this header. It confirms the encryption algorithm that Amazon + * S3 used to encrypt the object.

+ */ + inline void SetServerSideEncryption(const ServerSideEncryption& value) { m_serverSideEncryption = value; } + + /** + *

If you specified server-side encryption either with an AWS KMS customer + * master key (CMK) or Amazon S3-managed encryption key in your PUT request, the + * response includes this header. It confirms the encryption algorithm that Amazon + * S3 used to encrypt the object.

+ */ + inline void SetServerSideEncryption(ServerSideEncryption&& value) { m_serverSideEncryption = std::move(value); } + + /** + *

If you specified server-side encryption either with an AWS KMS customer + * master key (CMK) or Amazon S3-managed encryption key in your PUT request, the + * 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;} + + /** + *

If you specified server-side encryption either with an AWS KMS customer + * master key (CMK) or Amazon S3-managed encryption key in your PUT request, the + * 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;} + + + /** + *

Version of the object.

+ */ + inline const Aws::String& GetVersionId() const{ return m_versionId; } + + /** + *

Version of the object.

+ */ + inline void SetVersionId(const Aws::String& value) { m_versionId = value; } + + /** + *

Version of the object.

+ */ + inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); } + + /** + *

Version of the object.

+ */ + inline void SetVersionId(const char* value) { m_versionId.assign(value); } + + /** + *

Version of the object.

+ */ + inline PutObjectWithCallBackResult& 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;} + + /** + *

Version of the object.

+ */ + inline PutObjectWithCallBackResult& WithVersionId(const char* value) { SetVersionId(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 const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; } + + /** + *

If server-side encryption with a customer-provided encryption key was + * requested, the response will include this header confirming the encryption + * algorithm used.

+ */ + inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithm = value; } + + /** + *

If server-side encryption with a customer-provided encryption key was + * requested, the response will include this header confirming the encryption + * algorithm used.

+ */ + inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithm = std::move(value); } + + /** + *

If server-side encryption with a customer-provided encryption key was + * requested, the response will include this header confirming the encryption + * algorithm used.

+ */ + inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithm.assign(value); } + + /** + *

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 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;} + + /** + *

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;} + + + /** + *

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 const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; } + + /** + *

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 void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5 = value; } + + /** + *

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 void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5 = std::move(value); } + + /** + *

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 void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5.assign(value); } + + /** + *

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 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;} + + /** + *

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;} + + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 const Aws::String& GetSSEKMSKeyId() const{ return m_sSEKMSKeyId; } + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 void SetSSEKMSKeyId(const Aws::String& value) { m_sSEKMSKeyId = value; } + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 void SetSSEKMSKeyId(Aws::String&& value) { m_sSEKMSKeyId = std::move(value); } + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 void SetSSEKMSKeyId(const char* value) { m_sSEKMSKeyId.assign(value); } + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 PutObjectWithCallBackResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;} + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 PutObjectWithCallBackResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;} + + /** + *

If x-amz-server-side-encryption is present and has the value of + * aws:kms, this header 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 PutObjectWithCallBackResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(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 const Aws::String& GetSSEKMSEncryptionContext() const{ return m_sSEKMSEncryptionContext; } + + /** + *

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 void SetSSEKMSEncryptionContext(const Aws::String& value) { m_sSEKMSEncryptionContext = value; } + + /** + *

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 void SetSSEKMSEncryptionContext(Aws::String&& value) { m_sSEKMSEncryptionContext = std::move(value); } + + /** + *

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 void SetSSEKMSEncryptionContext(const char* value) { m_sSEKMSEncryptionContext.assign(value); } + + /** + *

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 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;} + + /** + *

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;} + + + /** + *

Indicates whether the uploaded object uses an S3 Bucket Key for server-side + * encryption with AWS KMS (SSE-KMS).

+ */ + inline bool GetBucketKeyEnabled() const{ return m_bucketKeyEnabled; } + + /** + *

Indicates whether the uploaded object uses an S3 Bucket Key for server-side + * encryption with AWS KMS (SSE-KMS).

+ */ + inline void SetBucketKeyEnabled(bool value) { m_bucketKeyEnabled = value; } + + /** + *

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 const RequestCharged& GetRequestCharged() const{ return m_requestCharged; } + + + inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; } + + + 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;} + + + + private: - Aws::String m_eTag; + Aws::String m_expiration; + + Aws::String m_eTag; + + ServerSideEncryption m_serverSideEncryption; + + Aws::String m_versionId; + + Aws::String m_sSECustomerAlgorithm; + + Aws::String m_sSECustomerKeyMD5; + + Aws::String m_sSEKMSKeyId; + + Aws::String m_sSEKMSEncryptionContext; + + bool m_bucketKeyEnabled; + + RequestCharged m_requestCharged; - Aws::Utils::Stream::ResponseStream m_policy; + 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 3f6e99eab..5ae6e845f 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 @@ -284,6 +284,9 @@ void S3Client::AbortMultipartUploadAsyncHelper(const AbortMultipartUploadRequest handler(this, request, AbortMultipartUpload(request), context); } + + + CompleteMultipartUploadOutcome S3Client::CompleteMultipartUpload(const CompleteMultipartUploadRequest& request) const { if (!request.BucketHasBeenSet()) @@ -332,6 +335,63 @@ void S3Client::CompleteMultipartUploadAsyncHelper(const CompleteMultipartUploadR handler(this, request, CompleteMultipartUpload(request), context); } + + + +CompleteMultipartUploadWithCallBackOutcome S3Client::CompleteMultipartUploadWithCallBack(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)); + } + 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)); + } + 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)); + } + ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(request.GetBucket()); + if (!computeEndpointOutcome.IsSuccess()) + { + return CompleteMultipartUploadWithCallBackOutcome(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*/)); +} + +CompleteMultipartUploadWithCallBackOutcomeCallable S3Client::CompleteMultipartUploadWithCallBackCallable(const CompleteMultipartUploadRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< CompleteMultipartUploadWithCallBackOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteMultipartUploadWithCallBack(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 +{ + m_executor->Submit( [this, request, handler, context](){ this->CompleteMultipartUploadWithCallBackAsyncHelper( request, handler, context ); } ); +} + +void S3Client::CompleteMultipartUploadWithCallBackAsyncHelper(const CompleteMultipartUploadRequest& request, const CompleteMultipartUploadWithCallBackResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, CompleteMultipartUploadWithCallBack(request), context); +} + + + + + + + CopyObjectOutcome S3Client::CopyObject(const CopyObjectRequest& request) const { if (!request.BucketHasBeenSet()) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketCallBackConfiguration.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketCallBackConfiguration.cpp index b834bd027..71ed806a4 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketCallBackConfiguration.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketCallBackConfiguration.cpp @@ -22,35 +22,17 @@ namespace Model { BucketCallBackConfiguration::BucketCallBackConfiguration() : - m_rulesHasBeenSet(false), m_callBackUrlHasBeenSet(false), m_callBackBodyHasBeenSet(false), m_callBackBodyTypeHasBeenSet(false), - m_bucket(false), - m_object(false), - m_etag(false), - m_size(false), - m_time(false), - m_type(false), - m_var(false), - m_var2(false), m_callBackBody("") { } BucketCallBackConfiguration::BucketCallBackConfiguration(const XmlNode& xmlNode) : - m_rulesHasBeenSet(false), m_callBackUrlHasBeenSet(false), m_callBackBodyHasBeenSet(false), m_callBackBodyTypeHasBeenSet(false), - m_bucket(false), - m_object(false), - m_etag(false), - m_size(false), - m_time(false), - m_type(false), - m_var(false), - m_var2(false), m_callBackBody("") { *this = xmlNode; @@ -90,12 +72,10 @@ BucketCallBackConfiguration& BucketCallBackConfiguration::operator =(const XmlNo void BucketCallBackConfiguration::AddToNode(XmlNode& parentNode) const { Aws::StringStream ss; - //std::cout<<"test"< +#include +#include +#include +#include +#include + +using namespace Aws::S3::Model; +using namespace Aws::Utils::Stream; +using namespace Aws::Utils; +using namespace Aws; + +CompleteMultipartUploadWithCallBackResult::CompleteMultipartUploadWithCallBackResult() : + 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), + m_bucketKeyEnabled(false), + m_requestCharged(RequestCharged::NOT_SET) +{ +} + +CompleteMultipartUploadWithCallBackResult& CompleteMultipartUploadWithCallBackResult::operator=(CompleteMultipartUploadWithCallBackResult&& toMove) +{ + if(this == &toMove) + { + return *this; + } + + m_policy = std::move(toMove.m_policy); + + return *this; +} + +CompleteMultipartUploadWithCallBackResult::CompleteMultipartUploadWithCallBackResult(Aws::AmazonWebServiceResult&& result) +{ + *this = std::move(result); +} + +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()) + { + m_expiration = expirationIter->second; + } + + const auto& serverSideEncryptionIter = headers.find("x-amz-server-side-encryption"); + if(serverSideEncryptionIter != headers.end()) + { + m_serverSideEncryption = ServerSideEncryptionMapper::GetServerSideEncryptionForName(serverSideEncryptionIter->second); + } + + const auto& versionIdIter = headers.find("x-amz-version-id"); + if(versionIdIter != headers.end()) + { + m_versionId = versionIdIter->second; + } + + const auto& sSEKMSKeyIdIter = headers.find("x-amz-server-side-encryption-aws-kms-key-id"); + if(sSEKMSKeyIdIter != headers.end()) + { + m_sSEKMSKeyId = sSEKMSKeyIdIter->second; + } + + const auto& bucketKeyEnabledIter = headers.find("x-amz-server-side-encryption-bucket-key-enabled"); + if(bucketKeyEnabledIter != headers.end()) + { + m_bucketKeyEnabled = StringUtils::ConvertToBool(bucketKeyEnabledIter->second.c_str()); + } + + const auto& requestChargedIter = headers.find("x-amz-request-charged"); + if(requestChargedIter != headers.end()) + { + m_requestCharged = RequestChargedMapper::GetRequestChargedForName(requestChargedIter->second); + } + 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/PutObjectWithCallBackResult.cpp index 2153985a5..b7997f297 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/PutObjectWithCallBackResult.cpp @@ -15,12 +15,18 @@ using namespace Aws::Utils::Stream; using namespace Aws::Utils; using namespace Aws; -PutObjectWithCallBackResult::PutObjectWithCallBackResult() +PutObjectWithCallBackResult::PutObjectWithCallBackResult() : + 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_policy(std::move(toMove.m_policy)), + m_serverSideEncryption(ServerSideEncryption::NOT_SET), + m_bucketKeyEnabled(false), + m_requestCharged(RequestCharged::NOT_SET) { } @@ -44,7 +50,7 @@ PutObjectWithCallBackResult::PutObjectWithCallBackResult(Aws::AmazonWebServiceRe PutObjectWithCallBackResult& PutObjectWithCallBackResult::operator =(Aws::AmazonWebServiceResult&& result) { m_policy = result.TakeOwnershipOfPayload(); - Aws::Http::HeaderValueCollection head = result.GetHeaderValueCollection(); + /*Aws::Http::HeaderValueCollection head = result.GetHeaderValueCollection(); for(auto item = head.begin();item!=head.end();item++){ Aws::String key = item->first; @@ -60,7 +66,68 @@ PutObjectWithCallBackResult& PutObjectWithCallBackResult::operator =(Aws::Amazon //std::cout<second; + } + + const auto& eTagIter = headers.find("etag"); + if(eTagIter != headers.end()) + { + m_eTag = eTagIter->second; + } + + const auto& serverSideEncryptionIter = headers.find("x-amz-server-side-encryption"); + if(serverSideEncryptionIter != headers.end()) + { + m_serverSideEncryption = ServerSideEncryptionMapper::GetServerSideEncryptionForName(serverSideEncryptionIter->second); + } + + const auto& versionIdIter = headers.find("x-amz-version-id"); + if(versionIdIter != headers.end()) + { + m_versionId = versionIdIter->second; + } + + const auto& sSECustomerAlgorithmIter = headers.find("x-amz-server-side-encryption-customer-algorithm"); + if(sSECustomerAlgorithmIter != headers.end()) + { + m_sSECustomerAlgorithm = sSECustomerAlgorithmIter->second; + } + + const auto& sSECustomerKeyMD5Iter = headers.find("x-amz-server-side-encryption-customer-key-md5"); + if(sSECustomerKeyMD5Iter != headers.end()) + { + m_sSECustomerKeyMD5 = sSECustomerKeyMD5Iter->second; + } + + const auto& sSEKMSKeyIdIter = headers.find("x-amz-server-side-encryption-aws-kms-key-id"); + if(sSEKMSKeyIdIter != headers.end()) + { + m_sSEKMSKeyId = sSEKMSKeyIdIter->second; + } + + const auto& sSEKMSEncryptionContextIter = headers.find("x-amz-server-side-encryption-context"); + if(sSEKMSEncryptionContextIter != headers.end()) + { + m_sSEKMSEncryptionContext = sSEKMSEncryptionContextIter->second; + } + + const auto& bucketKeyEnabledIter = headers.find("x-amz-server-side-encryption-bucket-key-enabled"); + if(bucketKeyEnabledIter != headers.end()) + { + m_bucketKeyEnabled = StringUtils::ConvertToBool(bucketKeyEnabledIter->second.c_str()); + } + + const auto& requestChargedIter = headers.find("x-amz-request-charged"); + if(requestChargedIter != headers.end()) + { + m_requestCharged = RequestChargedMapper::GetRequestChargedForName(requestChargedIter->second); + } return *this; } -- Gitee From 9fdb35b672a57c924eae725663f95a13c27f5d98 Mon Sep 17 00:00:00 2001 From: luxy Date: Wed, 19 Jul 2023 12:03:39 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=89=B9=E9=87=8F=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=A1=B6=E5=AD=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aws-cpp-sdk-s3/include/aws/s3/S3Client.h | 12 +- .../include/aws/s3/model/BucketStorageInfo.h | 186 +++++++++++++++++ .../s3/model/GetBucketStorageInfosRequest.h | 189 ++++++++++++++++++ .../s3/model/GetBucketStorageInfosResult.h | 108 ++++++++++ .../aws-cpp-sdk-s3/source/S3Client.cpp | 33 +++ .../source/model/BucketStorageInfo.cpp | 76 +++++++ .../model/GetBucketStorageInfoRequest.cpp | 7 +- .../model/GetBucketStorageInfosRequest.cpp | 78 ++++++++ .../model/GetBucketStorageInfosResult .cpp | 53 +++++ .../source/model/PutBucketLoggingRequest.cpp | 5 +- 10 files changed, 739 insertions(+), 8 deletions(-) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosResult .cpp 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 d8aea787b..8da9bd3e4 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 @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -168,6 +169,7 @@ namespace Aws class GetBucketAclRequest; class GetBucketQuotaRequest; class GetBucketStorageInfoRequest; + class GetBucketStorageInfosRequest; class GetBucketAnalyticsConfigurationRequest; class GetBucketCorsRequest; class GetBucketEncryptionRequest; @@ -284,6 +286,7 @@ namespace Aws typedef Aws::Utils::Outcome GetBucketAclOutcome; typedef Aws::Utils::Outcome GetBucketQuotaOutcome; typedef Aws::Utils::Outcome GetBucketStorageInfoOutcome; + typedef Aws::Utils::Outcome GetBucketStorageInfosOutcome; typedef Aws::Utils::Outcome GetBucketAnalyticsConfigurationOutcome; typedef Aws::Utils::Outcome GetBucketCorsOutcome; typedef Aws::Utils::Outcome GetBucketEncryptionOutcome; @@ -403,6 +406,7 @@ namespace Aws typedef std::future GetBucketAclOutcomeCallable; typedef std::future GetBucketQuotaOutcomeCallable; typedef std::futureGetBucketStorageInfoOutcomeCallable; + typedef std::futureGetBucketStorageInfosOutcomeCallable; typedef std::future GetBucketAnalyticsConfigurationOutcomeCallable; typedef std::future GetBucketCorsOutcomeCallable; typedef std::future GetBucketEncryptionOutcomeCallable; @@ -551,6 +555,7 @@ namespace Aws typedef std::function&) > GetBucketStorageInfoResponseReceivedHandler; + typedef std::function&) > GetBucketStorageInfosResponseReceivedHandler; typedef std::function&) > GetBucketAnalyticsConfigurationResponseReceivedHandler; typedef std::function&) > GetBucketCorsResponseReceivedHandler; @@ -3467,6 +3472,7 @@ namespace Aws */ virtual Model::GetBucketAclOutcome GetBucketAcl(const Model::GetBucketAclRequest& request) const; virtual Model::GetBucketStorageInfoOutcome GetBucketStorageInfo(const Model::GetBucketStorageInfoRequest& request) const; + virtual Model::GetBucketStorageInfosOutcome GetBucketStorageInfos(const Model::GetBucketStorageInfosRequest& request) const; virtual Model::GetBucketQuotaOutcome GetBucketQuota(const Model::GetBucketQuotaRequest& request) const; /** @@ -3486,6 +3492,7 @@ namespace Aws */ virtual Model::GetBucketAclOutcomeCallable GetBucketAclCallable(const Model::GetBucketAclRequest& request) const; virtual Model::GetBucketStorageInfoOutcomeCallable GetBucketStorageInfoCallable(const Model::GetBucketStorageInfoRequest& request) const; + virtual Model::GetBucketStorageInfosOutcomeCallable GetBucketStorageInfosCallable(const Model::GetBucketStorageInfosRequest& request) const; virtual Model::GetBucketQuotaOutcomeCallable GetBucketQuotaCallable(const Model::GetBucketQuotaRequest& request) const; /** @@ -3505,7 +3512,9 @@ namespace Aws */ virtual void GetBucketAclAsync(const Model::GetBucketAclRequest& request, const GetBucketAclResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; virtual void GetBucketStorageInfoAsync(const Model::GetBucketStorageInfoRequest& request, const GetBucketStorageInfoResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; - virtual void GetBucketQuotaAsync(const Model::GetBucketQuotaRequest& request, const GetBucketQuotaResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + virtual void GetBucketStorageInfosAsync(const Model::GetBucketStorageInfosRequest& request, const GetBucketStorageInfosResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual void GetBucketQuotaAsync(const Model::GetBucketQuotaRequest& request, const GetBucketQuotaResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** @@ -11400,6 +11409,7 @@ namespace Aws void GetBucketStorageInfoAsyncHelper(const Model::GetBucketStorageInfoRequest& request, const GetBucketStorageInfoResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void GetBucketStorageInfosAsyncHelper(const Model::GetBucketStorageInfosRequest& request, const GetBucketStorageInfosResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetBucketAnalyticsConfigurationAsyncHelper(const Model::GetBucketAnalyticsConfigurationRequest& request, const GetBucketAnalyticsConfigurationResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetBucketCorsAsyncHelper(const Model::GetBucketCorsRequest& request, const GetBucketCorsResponseReceivedHandler& 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/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 new file mode 100644 index 000000000..1e71fe7e3 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/BucketStorageInfo.h @@ -0,0 +1,186 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace Utils +{ +namespace Xml +{ + class XmlNode; +} // namespace Xml +} // namespace Utils +namespace S3 +{ +namespace Model +{ + + /** + *

Container for the person being granted permissions.

See Also:

+ * AWS API + * Reference

+ */ + class AWS_S3_API BucketStorageInfo + { + public: + BucketStorageInfo(); + BucketStorageInfo(const Aws::Utils::Xml::XmlNode& xmlNode); + BucketStorageInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); + + void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; + + + /** + *

Container for the ID of the owner.

+ */ + inline const Aws::String& GetSize() const{ return m_size; } + + /** + *

Container for the ID of the owner.

+ */ + inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetSize(const Aws::String& value) { m_sizeHasBeenSet = true; m_size = value; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetSize(Aws::String&& value) { m_sizeHasBeenSet = true; m_size = std::move(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetSize(const char* value) { m_sizeHasBeenSet = true; m_size.assign(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSize(const Aws::String& value) { SetSize(value); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSize(Aws::String&& value) { SetSize(std::move(value)); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSize(const char* value) { SetSize(value); return *this;} + + + + + /** + *

Container for the ID of the owner.

+ */ + inline const Aws::String& GetPhysicalSize() const{ return m_physicalSize; } + + /** + *

Container for the ID of the owner.

+ */ + inline bool PhysicalSizeHasBeenSet() const { return m_physicalSizeHasBeenSet; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetPhysicalSize(const Aws::String& value) { m_sizeHasBeenSet = true; m_physicalSize = value; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetPhysicalSize(Aws::String&& value) { m_sizeHasBeenSet = true; m_physicalSize = std::move(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetPhysicalSize(const char* value) { m_sizeHasBeenSet = true; m_physicalSize.assign(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSetPhysicalSize(const Aws::String& value) { SetPhysicalSize(value); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSetPhysicalSize(Aws::String&& value) { SetPhysicalSize(std::move(value)); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithSetPhysicalSize(const char* value) { SetPhysicalSize(value); return *this;} + + + + + /** + *

Container for the ID of the owner.

+ */ + inline const Aws::String& GetObjectNumber() const{ return m_objectNumber; } + + /** + *

Container for the ID of the owner.

+ */ + inline bool ObjectNumberHasBeenSet() const { return m_objectNumberHasBeenSet; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetObjectNumber(const Aws::String& value) { m_objectNumberHasBeenSet = true; m_objectNumber = value; } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetObjectNumber(Aws::String&& value) { m_objectNumberHasBeenSet = true; m_objectNumber = std::move(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline void SetObjectNumber(const char* value) { m_objectNumberHasBeenSet = true; m_objectNumber.assign(value); } + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithObjectNumber(const Aws::String& value) { SetObjectNumber(value); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithObjectNumber(Aws::String&& value) { SetObjectNumber(std::move(value)); return *this;} + + /** + *

Container for the ID of the owner.

+ */ + inline BucketStorageInfo& WithObjectNumber(const char* value) { SetObjectNumber(value); return *this;} + + + + + private: + Aws::String m_objectNumber; + bool m_objectNumberHasBeenSet; + + + Aws::String m_physicalSize; + bool m_physicalSizeHasBeenSet; + + + Aws::String m_size; + bool m_sizeHasBeenSet; + + }; + +} // namespace Model +} // namespace S3 +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosRequest.h new file mode 100644 index 000000000..7cea1a830 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosRequest.h @@ -0,0 +1,189 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace Http +{ + class URI; +} //namespace Http +namespace S3 +{ +namespace Model +{ + + /** + */ + class AWS_S3_API GetBucketStorageInfosRequest : public S3Request + { + public: + GetBucketStorageInfosRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "GetBucketStorageInfo"; } + + Aws::String SerializePayload() const override; + + void AddQueryStringParameters(Aws::Http::URI& uri) const override; + + Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; } + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; } + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; } + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); } + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); } + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline GetBucketStorageInfosRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;} + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline GetBucketStorageInfosRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;} + + /** + *

The account ID of the expected bucket owner. If the bucket is owned by a + * different account, the request will fail with an HTTP 403 (Access + * Denied) error.

+ */ + inline GetBucketStorageInfosRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;} + + + + inline const Aws::Map& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } + + + inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } + + + inline void SetCustomizedAccessLogTag(const Aws::Map& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } + + + inline void SetCustomizedAccessLogTag(Aws::Map&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } + + + inline GetBucketStorageInfosRequest& WithCustomizedAccessLogTag(const Aws::Map& value) { SetCustomizedAccessLogTag(value); return *this;} + + + inline GetBucketStorageInfosRequest& WithCustomizedAccessLogTag(Aws::Map&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } + + + inline GetBucketStorageInfosRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } + + /** + *

A list of grants.

+ */ + inline const Aws::Vector& GetBuckets() const{ return m_buckets; } + + /** + *

A list of grants.

+ */ + inline void SetBuckets(const Aws::Vector& value) { m_buckets = value; } + + /** + *

A list of grants.

+ */ + inline void SetBuckets(Aws::Vector&& value) { m_buckets = std::move(value); } + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosRequest& WithBuckets(const Aws::Vector& value) { SetBuckets(value); return *this;} + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosRequest& WithBuckets(Aws::Vector&& value) { SetBuckets(std::move(value)); return *this;} + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosRequest& AddBuckets(const Aws::String& value) { m_buckets.push_back(value); return *this; } + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosRequest& AddBuckets(Aws::String&& value) { m_buckets.push_back(std::move(value)); return *this; } + + + + private: + + Aws::Vector m_buckets; + + Aws::String m_expectedBucketOwner; + bool m_expectedBucketOwnerHasBeenSet; + + Aws::Map m_customizedAccessLogTag; + bool m_customizedAccessLogTagHasBeenSet; + }; + +} // namespace Model +} // namespace S3 +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosResult.h new file mode 100644 index 000000000..e83738519 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/include/aws/s3/model/GetBucketStorageInfosResult.h @@ -0,0 +1,108 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#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 GetBucketStorageInfosResult + { + public: + GetBucketStorageInfosResult(); + GetBucketStorageInfosResult(const Aws::AmazonWebServiceResult& result); + GetBucketStorageInfosResult& operator=(const Aws::AmazonWebServiceResult& result); + + + /** + *

Container for the bucket owner's display name and ID.

+ */ + inline const Owner& GetOwner() const{ return m_owner; } + + /** + *

Container for the bucket owner's display name and ID.

+ */ + inline void SetOwner(const Owner& value) { m_owner = value; } + + /** + *

Container for the bucket owner's display name and ID.

+ */ + inline void SetOwner(Owner&& value) { m_owner = std::move(value); } + + /** + *

Container for the bucket owner's display name and ID.

+ */ + inline GetBucketStorageInfosResult& WithOwner(const Owner& value) { SetOwner(value); return *this;} + + /** + *

Container for the bucket owner's display name and ID.

+ */ + inline GetBucketStorageInfosResult& WithOwner(Owner&& value) { SetOwner(std::move(value)); return *this;} + + + /** + *

A list of grants.

+ */ + inline const Aws::Vector& GetBucketStorageInfos() const{ return m_storageInfos; } + + /** + *

A list of grants.

+ */ + inline void SetBucketStorageInfos(const Aws::Vector& value) { m_storageInfos = value; } + + /** + *

A list of grants.

+ */ + inline void SetBucketStorageInfos(Aws::Vector&& value) { m_storageInfos = std::move(value); } + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosResult& WithBucketStorageInfos(const Aws::Vector& value) { SetBucketStorageInfos(value); return *this;} + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosResult& WithBucketStorageInfos(Aws::Vector&& value) { SetBucketStorageInfos(std::move(value)); return *this;} + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosResult& AddBucketStorageInfos(const BucketStorageInfo& value) { m_storageInfos.push_back(value); return *this; } + + /** + *

A list of grants.

+ */ + inline GetBucketStorageInfosResult& AddBucketStorageInfos(BucketStorageInfo&& value) { m_storageInfos.push_back(std::move(value)); return *this; } + + + private: + + Owner m_owner; + + Aws::Vector m_storageInfos; + }; + +} // namespace Model +} // namespace S3 +} // namespace Aws 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 5ae6e845f..130fea5d2 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 @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -1523,6 +1524,38 @@ void S3Client::GetBucketStorageInfoAsyncHelper(const GetBucketStorageInfoRequest +GetBucketStorageInfosOutcome S3Client::GetBucketStorageInfos(const GetBucketStorageInfosRequest& request) const +{ + ComputeEndpointOutcome computeEndpointOutcome = ComputeEndpointString(); + if (!computeEndpointOutcome.IsSuccess()) + { + return GetBucketStorageInfosOutcome(computeEndpointOutcome.GetError()); + } + Aws::Http::URI uri = computeEndpointOutcome.GetResult().endpoint; + Aws::StringStream ss; + ss.str("?storageinfo"); + uri.SetQueryString(ss.str()); + return GetBucketStorageInfosOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER, computeEndpointOutcome.GetResult().signerRegion.c_str() /*signerRegionOverride*/, computeEndpointOutcome.GetResult().signerServiceName.c_str() /*signerServiceNameOverride*/)); +} + +GetBucketStorageInfosOutcomeCallable S3Client::GetBucketStorageInfosCallable(const GetBucketStorageInfosRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< GetBucketStorageInfosOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetBucketStorageInfos(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void S3Client::GetBucketStorageInfosAsync(const GetBucketStorageInfosRequest& request, const GetBucketStorageInfosResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->GetBucketStorageInfosAsyncHelper( request, handler, context ); } ); +} + +void S3Client::GetBucketStorageInfosAsyncHelper(const GetBucketStorageInfosRequest& request, const GetBucketStorageInfosResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, GetBucketStorageInfos(request), context); +} + 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 new file mode 100644 index 000000000..c86bbc206 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/BucketStorageInfo.cpp @@ -0,0 +1,76 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +#include + +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; + +namespace Aws +{ +namespace S3 +{ +namespace Model +{ + +BucketStorageInfo::BucketStorageInfo() : + m_objectNumberHasBeenSet(false), + m_physicalSizeHasBeenSet(false), + m_sizeHasBeenSet(false) +{ +} + +BucketStorageInfo::BucketStorageInfo(const XmlNode& xmlNode) : + m_objectNumberHasBeenSet(false), + m_physicalSizeHasBeenSet(false), + m_sizeHasBeenSet(false) +{ + *this = xmlNode; +} + +BucketStorageInfo& BucketStorageInfo::operator =(const XmlNode& xmlNode) +{ + XmlNode resultNode = xmlNode; + + if(!resultNode.IsNull()) + { + XmlNode sizeNode = resultNode.FirstChild("Size"); + if(!sizeNode.IsNull()) + { + m_size = Aws::Utils::Xml::DecodeEscapedXmlText(sizeNode.GetText()); + m_sizeHasBeenSet = true; + } + XmlNode physicalNode = resultNode.FirstChild("PhysicalSize"); + if(!physicalNode.IsNull()) + { + m_physicalSize = Aws::Utils::Xml::DecodeEscapedXmlText(physicalNode.GetText()); + m_physicalSizeHasBeenSet = true; + } + XmlNode objectNumberNode = resultNode.FirstChild("ObjectNumber"); + if(!physicalNode.IsNull()) + { + m_objectNumber = Aws::Utils::Xml::DecodeEscapedXmlText(objectNumberNode.GetText()); + m_objectNumberHasBeenSet = true; + } + } + + return *this; +} + +void BucketStorageInfo::AddToNode(XmlNode& parentNode) const +{ + Aws::StringStream ss; + + +} + +} // namespace Model +} // namespace S3 +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp index 2b0444887..5d082c9e3 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp @@ -16,16 +16,13 @@ using namespace Aws::Utils::Xml; using namespace Aws::Utils; using namespace Aws::Http; -GetBucketStorageInfoRequest::GetBucketStorageInfoRequest() : - m_bucketHasBeenSet(false), - m_expectedBucketOwnerHasBeenSet(false), - m_customizedAccessLogTagHasBeenSet(false) +GetBucketStorageInfoRequest::GetBucketStorageInfoRequest() { } Aws::String GetBucketStorageInfoRequest::SerializePayload() const { - return {}; + return {}; } void GetBucketStorageInfoRequest::AddQueryStringParameters(URI& uri) const diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp new file mode 100644 index 000000000..3246a7a1a --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp @@ -0,0 +1,78 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::S3::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; +using namespace Aws::Http; + +GetBucketStorageInfosRequest::GetBucketStorageInfosRequest() +{ +} + +Aws::String GetBucketStorageInfosRequest::SerializePayload() const +{ + XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("Get"); + + XmlNode parentNode = payloadDoc.GetRootElement(); + parentNode.SetAttributeValue("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + for(Aws::String bkt:m_buckets) + { + XmlNode bktNode = parentNode.CreateChildElement("Bucket"); + XmlNode keyNode = parentNode.CreateChildElement("Key"); + keyNode.SetText(bkt); + } + + if(parentNode.HasChildren()) + { + return payloadDoc.ConvertToString(); + } + + return {}; +} + +void GetBucketStorageInfosRequest::AddQueryStringParameters(URI& uri) const +{ + Aws::StringStream ss; + if(!m_customizedAccessLogTag.empty()) + { + // only accept customized LogTag which starts with "x-" + Aws::Map collectedLogTags; + for(const auto& entry: m_customizedAccessLogTag) + { + if (!entry.first.empty() && !entry.second.empty() && entry.first.substr(0, 2) == "x-") + { + collectedLogTags.emplace(entry.first, entry.second); + } + } + + if (!collectedLogTags.empty()) + { + uri.AddQueryStringParameter(collectedLogTags); + } + } +} + +Aws::Http::HeaderValueCollection GetBucketStorageInfosRequest::GetRequestSpecificHeaders() const +{ + Aws::Http::HeaderValueCollection headers; + Aws::StringStream ss; + if(m_expectedBucketOwnerHasBeenSet) + { + ss << m_expectedBucketOwner; + headers.emplace("x-amz-expected-bucket-owner", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosResult .cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosResult .cpp new file mode 100644 index 000000000..8d45f4d46 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosResult .cpp @@ -0,0 +1,53 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +#include + +using namespace Aws::S3::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; +using namespace Aws; + +GetBucketStorageInfosResult::GetBucketStorageInfosResult() +{ +} + +GetBucketStorageInfosResult::GetBucketStorageInfosResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +GetBucketStorageInfosResult& GetBucketStorageInfosResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode resultNode = xmlDocument.GetRootElement(); + + if(!resultNode.IsNull()) + { + + XmlNode ownerNode = resultNode.FirstChild("Owner"); + if(!ownerNode.IsNull()) + { + m_owner = ownerNode; + } + XmlNode storageinfsNode = resultNode.FirstChild("GetBucketStorageInfoResult"); + if(!storageinfsNode.IsNull()) + { + XmlNode storageinfoMember = storageinfsNode.FirstChild("BucketStorageInfo"); + while(!storageinfoMember.IsNull()) + { + m_storageInfos.push_back(storageinfoMember); + storageinfoMember = storageinfoMember.NextNode("BucketStorageInfo"); + } + } + } + + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketLoggingRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketLoggingRequest.cpp index cfd236509..881b51d84 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketLoggingRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/PutBucketLoggingRequest.cpp @@ -33,12 +33,13 @@ Aws::String PutBucketLoggingRequest::SerializePayload() const parentNode.SetAttributeValue("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); m_bucketLoggingStatus.AddToNode(parentNode); - if(parentNode.HasChildren()) + /*if(parentNode.HasChildren()) { return payloadDoc.ConvertToString(); } - return {}; + return {};*/ + return payloadDoc.ConvertToString(); } void PutBucketLoggingRequest::AddQueryStringParameters(URI& uri) const -- Gitee From 8252eaf587a6dc0299a8b0d11f2e6c37853a8e8e Mon Sep 17 00:00:00 2001 From: luxy Date: Wed, 19 Jul 2023 12:05:40 +0800 Subject: [PATCH 09/10] a --- .../source/model/GetBucketStorageInfoRequest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp index 5d082c9e3..ff0d14cb1 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfoRequest.cpp @@ -16,13 +16,16 @@ using namespace Aws::Utils::Xml; using namespace Aws::Utils; using namespace Aws::Http; -GetBucketStorageInfoRequest::GetBucketStorageInfoRequest() +GetBucketStorageInfoRequest::GetBucketStorageInfoRequest() : + m_bucketHasBeenSet(false), + m_expectedBucketOwnerHasBeenSet(false), + m_customizedAccessLogTagHasBeenSet(false) { } Aws::String GetBucketStorageInfoRequest::SerializePayload() const { - return {}; + return {}; } void GetBucketStorageInfoRequest::AddQueryStringParameters(URI& uri) const -- Gitee From 97dce920364e816412a2c53256bcef20150af62d Mon Sep 17 00:00:00 2001 From: luxy Date: Wed, 19 Jul 2023 14:18:46 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=89=B9=E9=87=8F=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=A1=B6=E5=AD=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/model/GetBucketStorageInfosRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp index 3246a7a1a..e280d2b06 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-s3/source/model/GetBucketStorageInfosRequest.cpp @@ -29,7 +29,7 @@ Aws::String GetBucketStorageInfosRequest::SerializePayload() const for(Aws::String bkt:m_buckets) { XmlNode bktNode = parentNode.CreateChildElement("Bucket"); - XmlNode keyNode = parentNode.CreateChildElement("Key"); + XmlNode keyNode = bktNode.CreateChildElement("Key"); keyNode.SetText(bkt); } -- Gitee