/** * 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 AutoScaling { namespace Model { Alarm::Alarm() : m_alarmNameHasBeenSet(false), m_alarmARNHasBeenSet(false) { } Alarm::Alarm(const XmlNode& xmlNode) : m_alarmNameHasBeenSet(false), m_alarmARNHasBeenSet(false) { *this = xmlNode; } Alarm& Alarm::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode alarmNameNode = resultNode.FirstChild("AlarmName"); if(!alarmNameNode.IsNull()) { m_alarmName = Aws::Utils::Xml::DecodeEscapedXmlText(alarmNameNode.GetText()); m_alarmNameHasBeenSet = true; } XmlNode alarmARNNode = resultNode.FirstChild("AlarmARN"); if(!alarmARNNode.IsNull()) { m_alarmARN = Aws::Utils::Xml::DecodeEscapedXmlText(alarmARNNode.GetText()); m_alarmARNHasBeenSet = true; } } return *this; } void Alarm::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_alarmNameHasBeenSet) { oStream << location << index << locationValue << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&"; } if(m_alarmARNHasBeenSet) { oStream << location << index << locationValue << ".AlarmARN=" << StringUtils::URLEncode(m_alarmARN.c_str()) << "&"; } } void Alarm::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_alarmNameHasBeenSet) { oStream << location << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&"; } if(m_alarmARNHasBeenSet) { oStream << location << ".AlarmARN=" << StringUtils::URLEncode(m_alarmARN.c_str()) << "&"; } } } // namespace Model } // namespace AutoScaling } // namespace Aws