/** * 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 { PrivateDnsNameConfiguration::PrivateDnsNameConfiguration() : m_state(DnsNameState::NOT_SET), m_stateHasBeenSet(false), m_typeHasBeenSet(false), m_valueHasBeenSet(false), m_nameHasBeenSet(false) { } PrivateDnsNameConfiguration::PrivateDnsNameConfiguration(const XmlNode& xmlNode) : m_state(DnsNameState::NOT_SET), m_stateHasBeenSet(false), m_typeHasBeenSet(false), m_valueHasBeenSet(false), m_nameHasBeenSet(false) { *this = xmlNode; } PrivateDnsNameConfiguration& PrivateDnsNameConfiguration::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode stateNode = resultNode.FirstChild("state"); if(!stateNode.IsNull()) { m_state = DnsNameStateMapper::GetDnsNameStateForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateNode.GetText()).c_str()).c_str()); m_stateHasBeenSet = true; } XmlNode typeNode = resultNode.FirstChild("type"); if(!typeNode.IsNull()) { m_type = Aws::Utils::Xml::DecodeEscapedXmlText(typeNode.GetText()); m_typeHasBeenSet = true; } XmlNode valueNode = resultNode.FirstChild("value"); if(!valueNode.IsNull()) { m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText()); m_valueHasBeenSet = true; } XmlNode nameNode = resultNode.FirstChild("name"); if(!nameNode.IsNull()) { m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText()); m_nameHasBeenSet = true; } } return *this; } void PrivateDnsNameConfiguration::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_stateHasBeenSet) { oStream << location << index << locationValue << ".State=" << DnsNameStateMapper::GetNameForDnsNameState(m_state) << "&"; } if(m_typeHasBeenSet) { oStream << location << index << locationValue << ".Type=" << StringUtils::URLEncode(m_type.c_str()) << "&"; } if(m_valueHasBeenSet) { oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&"; } if(m_nameHasBeenSet) { oStream << location << index << locationValue << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&"; } } void PrivateDnsNameConfiguration::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_stateHasBeenSet) { oStream << location << ".State=" << DnsNameStateMapper::GetNameForDnsNameState(m_state) << "&"; } if(m_typeHasBeenSet) { oStream << location << ".Type=" << StringUtils::URLEncode(m_type.c_str()) << "&"; } if(m_valueHasBeenSet) { oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&"; } if(m_nameHasBeenSet) { oStream << location << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&"; } } } // namespace Model } // namespace EC2 } // namespace Aws