GetBucketIntelligentTieringConfigurationRequest.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. * SPDX-License-Identifier: Apache-2.0.
  4. */
  5. #include <aws/s3/model/GetBucketIntelligentTieringConfigurationRequest.h>
  6. #include <aws/core/utils/xml/XmlSerializer.h>
  7. #include <aws/core/utils/memory/stl/AWSStringStream.h>
  8. #include <aws/core/http/URI.h>
  9. #include <aws/core/utils/memory/stl/AWSStringStream.h>
  10. #include <utility>
  11. using namespace Aws::S3::Model;
  12. using namespace Aws::Utils::Xml;
  13. using namespace Aws::Utils;
  14. using namespace Aws::Http;
  15. GetBucketIntelligentTieringConfigurationRequest::GetBucketIntelligentTieringConfigurationRequest() :
  16. m_bucketHasBeenSet(false),
  17. m_idHasBeenSet(false),
  18. m_customizedAccessLogTagHasBeenSet(false)
  19. {
  20. }
  21. Aws::String GetBucketIntelligentTieringConfigurationRequest::SerializePayload() const
  22. {
  23. return {};
  24. }
  25. void GetBucketIntelligentTieringConfigurationRequest::AddQueryStringParameters(URI& uri) const
  26. {
  27. Aws::StringStream ss;
  28. if(m_idHasBeenSet)
  29. {
  30. ss << m_id;
  31. uri.AddQueryStringParameter("id", ss.str());
  32. ss.str("");
  33. }
  34. if(!m_customizedAccessLogTag.empty())
  35. {
  36. // only accept customized LogTag which starts with "x-"
  37. Aws::Map<Aws::String, Aws::String> collectedLogTags;
  38. for(const auto& entry: m_customizedAccessLogTag)
  39. {
  40. if (!entry.first.empty() && !entry.second.empty() && entry.first.substr(0, 2) == "x-")
  41. {
  42. collectedLogTags.emplace(entry.first, entry.second);
  43. }
  44. }
  45. if (!collectedLogTags.empty())
  46. {
  47. uri.AddQueryStringParameter(collectedLogTags);
  48. }
  49. }
  50. }