71 lines
2.1 KiB
C++
71 lines
2.1 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/route53/model/ListHostedZonesResult.h>
|
|
#include <aws/core/utils/xml/XmlSerializer.h>
|
|
#include <aws/core/AmazonWebServiceResult.h>
|
|
#include <aws/core/utils/StringUtils.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Route53::Model;
|
|
using namespace Aws::Utils::Xml;
|
|
using namespace Aws::Utils;
|
|
using namespace Aws;
|
|
|
|
ListHostedZonesResult::ListHostedZonesResult() :
|
|
m_isTruncated(false)
|
|
{
|
|
}
|
|
|
|
ListHostedZonesResult::ListHostedZonesResult(const Aws::AmazonWebServiceResult<XmlDocument>& result) :
|
|
m_isTruncated(false)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
ListHostedZonesResult& ListHostedZonesResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
|
|
{
|
|
const XmlDocument& xmlDocument = result.GetPayload();
|
|
XmlNode resultNode = xmlDocument.GetRootElement();
|
|
|
|
if(!resultNode.IsNull())
|
|
{
|
|
XmlNode hostedZonesNode = resultNode.FirstChild("HostedZones");
|
|
if(!hostedZonesNode.IsNull())
|
|
{
|
|
XmlNode hostedZonesMember = hostedZonesNode.FirstChild("HostedZone");
|
|
while(!hostedZonesMember.IsNull())
|
|
{
|
|
m_hostedZones.push_back(hostedZonesMember);
|
|
hostedZonesMember = hostedZonesMember.NextNode("HostedZone");
|
|
}
|
|
|
|
}
|
|
XmlNode markerNode = resultNode.FirstChild("Marker");
|
|
if(!markerNode.IsNull())
|
|
{
|
|
m_marker = Aws::Utils::Xml::DecodeEscapedXmlText(markerNode.GetText());
|
|
}
|
|
XmlNode isTruncatedNode = resultNode.FirstChild("IsTruncated");
|
|
if(!isTruncatedNode.IsNull())
|
|
{
|
|
m_isTruncated = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isTruncatedNode.GetText()).c_str()).c_str());
|
|
}
|
|
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
|
|
if(!nextMarkerNode.IsNull())
|
|
{
|
|
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
|
|
}
|
|
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
|
|
if(!maxItemsNode.IsNull())
|
|
{
|
|
m_maxItems = Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText());
|
|
}
|
|
}
|
|
|
|
return *this;
|
|
}
|