This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-ec2/source/model/PrivateDnsNameConfiguration.cpp

124 lines
3.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ec2/model/PrivateDnsNameConfiguration.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
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