/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include using namespace Aws::Utils::Xml; using namespace Aws::Utils; namespace Aws { namespace CloudWatch { namespace Model { MessageData::MessageData() : m_codeHasBeenSet(false), m_valueHasBeenSet(false) { } MessageData::MessageData(const XmlNode& xmlNode) : m_codeHasBeenSet(false), m_valueHasBeenSet(false) { *this = xmlNode; } MessageData& MessageData::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode codeNode = resultNode.FirstChild("Code"); if(!codeNode.IsNull()) { m_code = Aws::Utils::Xml::DecodeEscapedXmlText(codeNode.GetText()); m_codeHasBeenSet = true; } XmlNode valueNode = resultNode.FirstChild("Value"); if(!valueNode.IsNull()) { m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText()); m_valueHasBeenSet = true; } } return *this; } void MessageData::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_codeHasBeenSet) { oStream << location << index << locationValue << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&"; } if(m_valueHasBeenSet) { oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&"; } } void MessageData::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_codeHasBeenSet) { oStream << location << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&"; } if(m_valueHasBeenSet) { oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&"; } } } // namespace Model } // namespace CloudWatch } // namespace Aws