/** * 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 EC2 { namespace Model { VolumeStatusAction::VolumeStatusAction() : m_codeHasBeenSet(false), m_descriptionHasBeenSet(false), m_eventIdHasBeenSet(false), m_eventTypeHasBeenSet(false) { } VolumeStatusAction::VolumeStatusAction(const XmlNode& xmlNode) : m_codeHasBeenSet(false), m_descriptionHasBeenSet(false), m_eventIdHasBeenSet(false), m_eventTypeHasBeenSet(false) { *this = xmlNode; } VolumeStatusAction& VolumeStatusAction::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 descriptionNode = resultNode.FirstChild("description"); if(!descriptionNode.IsNull()) { m_description = Aws::Utils::Xml::DecodeEscapedXmlText(descriptionNode.GetText()); m_descriptionHasBeenSet = true; } XmlNode eventIdNode = resultNode.FirstChild("eventId"); if(!eventIdNode.IsNull()) { m_eventId = Aws::Utils::Xml::DecodeEscapedXmlText(eventIdNode.GetText()); m_eventIdHasBeenSet = true; } XmlNode eventTypeNode = resultNode.FirstChild("eventType"); if(!eventTypeNode.IsNull()) { m_eventType = Aws::Utils::Xml::DecodeEscapedXmlText(eventTypeNode.GetText()); m_eventTypeHasBeenSet = true; } } return *this; } void VolumeStatusAction::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_descriptionHasBeenSet) { oStream << location << index << locationValue << ".Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; } if(m_eventIdHasBeenSet) { oStream << location << index << locationValue << ".EventId=" << StringUtils::URLEncode(m_eventId.c_str()) << "&"; } if(m_eventTypeHasBeenSet) { oStream << location << index << locationValue << ".EventType=" << StringUtils::URLEncode(m_eventType.c_str()) << "&"; } } void VolumeStatusAction::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_codeHasBeenSet) { oStream << location << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&"; } if(m_descriptionHasBeenSet) { oStream << location << ".Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; } if(m_eventIdHasBeenSet) { oStream << location << ".EventId=" << StringUtils::URLEncode(m_eventId.c_str()) << "&"; } if(m_eventTypeHasBeenSet) { oStream << location << ".EventType=" << StringUtils::URLEncode(m_eventType.c_str()) << "&"; } } } // namespace Model } // namespace EC2 } // namespace Aws