/** * 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 RDS { namespace Model { OptionVersion::OptionVersion() : m_versionHasBeenSet(false), m_isDefault(false), m_isDefaultHasBeenSet(false) { } OptionVersion::OptionVersion(const XmlNode& xmlNode) : m_versionHasBeenSet(false), m_isDefault(false), m_isDefaultHasBeenSet(false) { *this = xmlNode; } OptionVersion& OptionVersion::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode versionNode = resultNode.FirstChild("Version"); if(!versionNode.IsNull()) { m_version = Aws::Utils::Xml::DecodeEscapedXmlText(versionNode.GetText()); m_versionHasBeenSet = true; } XmlNode isDefaultNode = resultNode.FirstChild("IsDefault"); if(!isDefaultNode.IsNull()) { m_isDefault = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isDefaultNode.GetText()).c_str()).c_str()); m_isDefaultHasBeenSet = true; } } return *this; } void OptionVersion::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_versionHasBeenSet) { oStream << location << index << locationValue << ".Version=" << StringUtils::URLEncode(m_version.c_str()) << "&"; } if(m_isDefaultHasBeenSet) { oStream << location << index << locationValue << ".IsDefault=" << std::boolalpha << m_isDefault << "&"; } } void OptionVersion::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_versionHasBeenSet) { oStream << location << ".Version=" << StringUtils::URLEncode(m_version.c_str()) << "&"; } if(m_isDefaultHasBeenSet) { oStream << location << ".IsDefault=" << std::boolalpha << m_isDefault << "&"; } } } // namespace Model } // namespace RDS } // namespace Aws