54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/cloudfront/model/UpdateDistribution2020_05_31Request.h>
|
|||
|
|
#include <aws/core/utils/xml/XmlSerializer.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSStringStream.h>
|
|||
|
|
#include <aws/core/utils/memory/stl/AWSStringStream.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::CloudFront::Model;
|
|||
|
|
using namespace Aws::Utils::Xml;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
UpdateDistribution2020_05_31Request::UpdateDistribution2020_05_31Request() :
|
|||
|
|
m_distributionConfigHasBeenSet(false),
|
|||
|
|
m_idHasBeenSet(false),
|
|||
|
|
m_ifMatchHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String UpdateDistribution2020_05_31Request::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("DistributionConfig");
|
|||
|
|
|
|||
|
|
XmlNode parentNode = payloadDoc.GetRootElement();
|
|||
|
|
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
|
|||
|
|
|
|||
|
|
m_distributionConfig.AddToNode(parentNode);
|
|||
|
|
if(parentNode.HasChildren())
|
|||
|
|
{
|
|||
|
|
return payloadDoc.ConvertToString();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return {};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection UpdateDistribution2020_05_31Request::GetRequestSpecificHeaders() const
|
|||
|
|
{
|
|||
|
|
Aws::Http::HeaderValueCollection headers;
|
|||
|
|
Aws::StringStream ss;
|
|||
|
|
if(m_ifMatchHasBeenSet)
|
|||
|
|
{
|
|||
|
|
ss << m_ifMatch;
|
|||
|
|
headers.emplace("if-match", ss.str());
|
|||
|
|
ss.str("");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return headers;
|
|||
|
|
}
|