/** * 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; GetAccountLimitResult::GetAccountLimitResult() : m_count(0) { } GetAccountLimitResult::GetAccountLimitResult(const Aws::AmazonWebServiceResult& result) : m_count(0) { *this = result; } GetAccountLimitResult& GetAccountLimitResult::operator =(const Aws::AmazonWebServiceResult& result) { const XmlDocument& xmlDocument = result.GetPayload(); XmlNode resultNode = xmlDocument.GetRootElement(); if(!resultNode.IsNull()) { XmlNode limitNode = resultNode.FirstChild("Limit"); if(!limitNode.IsNull()) { m_limit = limitNode; } XmlNode countNode = resultNode.FirstChild("Count"); if(!countNode.IsNull()) { m_count = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(countNode.GetText()).c_str()).c_str()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }