diff options
author | dakovalkov <dakovalkov@yandex-team.com> | 2023-12-03 13:33:55 +0300 |
---|---|---|
committer | dakovalkov <dakovalkov@yandex-team.com> | 2023-12-03 14:04:39 +0300 |
commit | 2a718325637e5302334b6d0a6430f63168f8dbb3 (patch) | |
tree | 64be81080b7df9ec1d86d053a0c394ae53fcf1fe /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp | |
parent | e0d94a470142d95c3007e9c5d80380994940664a (diff) | |
download | ydb-2a718325637e5302334b6d0a6430f63168f8dbb3.tar.gz |
Update contrib/libs/aws-sdk-cpp to 1.11.37
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp')
-rw-r--r-- | contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp new file mode 100644 index 0000000000..87e567b7d5 --- /dev/null +++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/GetObjectAttributesRequest.cpp @@ -0,0 +1,144 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include <aws/s3/model/GetObjectAttributesRequest.h> +#include <aws/core/utils/xml/XmlSerializer.h> +#include <aws/core/utils/memory/stl/AWSStringStream.h> +#include <aws/core/http/URI.h> +#include <aws/core/utils/memory/stl/AWSStringStream.h> + +#include <utility> + +using namespace Aws::S3::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; +using namespace Aws::Http; + +GetObjectAttributesRequest::GetObjectAttributesRequest() : + m_bucketHasBeenSet(false), + m_keyHasBeenSet(false), + m_versionIdHasBeenSet(false), + m_maxParts(0), + m_maxPartsHasBeenSet(false), + m_partNumberMarker(0), + m_partNumberMarkerHasBeenSet(false), + m_sSECustomerAlgorithmHasBeenSet(false), + m_sSECustomerKeyHasBeenSet(false), + m_sSECustomerKeyMD5HasBeenSet(false), + m_requestPayer(RequestPayer::NOT_SET), + m_requestPayerHasBeenSet(false), + m_expectedBucketOwnerHasBeenSet(false), + m_objectAttributesHasBeenSet(false), + m_customizedAccessLogTagHasBeenSet(false) +{ +} + +Aws::String GetObjectAttributesRequest::SerializePayload() const +{ + return {}; +} + +void GetObjectAttributesRequest::AddQueryStringParameters(URI& uri) const +{ + Aws::StringStream ss; + if(m_versionIdHasBeenSet) + { + ss << m_versionId; + uri.AddQueryStringParameter("versionId", ss.str()); + ss.str(""); + } + + if(!m_customizedAccessLogTag.empty()) + { + // only accept customized LogTag which starts with "x-" + Aws::Map<Aws::String, Aws::String> 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 GetObjectAttributesRequest::GetRequestSpecificHeaders() const +{ + Aws::Http::HeaderValueCollection headers; + Aws::StringStream ss; + if(m_maxPartsHasBeenSet) + { + ss << m_maxParts; + headers.emplace("x-amz-max-parts", ss.str()); + ss.str(""); + } + + if(m_partNumberMarkerHasBeenSet) + { + ss << m_partNumberMarker; + headers.emplace("x-amz-part-number-marker", ss.str()); + ss.str(""); + } + + if(m_sSECustomerAlgorithmHasBeenSet) + { + ss << m_sSECustomerAlgorithm; + headers.emplace("x-amz-server-side-encryption-customer-algorithm", ss.str()); + ss.str(""); + } + + if(m_sSECustomerKeyHasBeenSet) + { + ss << m_sSECustomerKey; + headers.emplace("x-amz-server-side-encryption-customer-key", ss.str()); + ss.str(""); + } + + if(m_sSECustomerKeyMD5HasBeenSet) + { + ss << m_sSECustomerKeyMD5; + headers.emplace("x-amz-server-side-encryption-customer-key-md5", ss.str()); + ss.str(""); + } + + if(m_requestPayerHasBeenSet) + { + headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer)); + } + + if(m_expectedBucketOwnerHasBeenSet) + { + ss << m_expectedBucketOwner; + headers.emplace("x-amz-expected-bucket-owner", ss.str()); + ss.str(""); + } + + if(m_objectAttributesHasBeenSet) + { + for(const auto& item : m_objectAttributes) + { + ss << ObjectAttributesMapper::GetNameForObjectAttributes(item); + headers.emplace("x-amz-object-attributes", ss.str()); + ss.str(""); + } + } + + return headers; +} + +GetObjectAttributesRequest::EndpointParameters GetObjectAttributesRequest::GetEndpointContextParams() const +{ + EndpointParameters parameters; + // Operation context parameters + if (BucketHasBeenSet()) { + parameters.emplace_back(Aws::String("Bucket"), this->GetBucket(), Aws::Endpoint::EndpointParameter::ParameterOrigin::OPERATION_CONTEXT); + } + return parameters; +} |