/** * 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::Route53::Model; using namespace Aws::Utils::Xml; using namespace Aws::Utils; using namespace Aws; ListReusableDelegationSetsResult::ListReusableDelegationSetsResult() : m_isTruncated(false) { } ListReusableDelegationSetsResult::ListReusableDelegationSetsResult(const Aws::AmazonWebServiceResult& result) : m_isTruncated(false) { *this = result; } ListReusableDelegationSetsResult& ListReusableDelegationSetsResult::operator =(const Aws::AmazonWebServiceResult& result) { const XmlDocument& xmlDocument = result.GetPayload(); XmlNode resultNode = xmlDocument.GetRootElement(); if(!resultNode.IsNull()) { XmlNode delegationSetsNode = resultNode.FirstChild("DelegationSets"); if(!delegationSetsNode.IsNull()) { XmlNode delegationSetsMember = delegationSetsNode.FirstChild("DelegationSet"); while(!delegationSetsMember.IsNull()) { m_delegationSets.push_back(delegationSetsMember); delegationSetsMember = delegationSetsMember.NextNode("DelegationSet"); } } 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()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }