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-elasticache/source/model/ParameterNameValue.cpp

88 lines
2.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/elasticache/model/ParameterNameValue.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 ElastiCache
{
namespace Model
{
ParameterNameValue::ParameterNameValue() :
m_parameterNameHasBeenSet(false),
m_parameterValueHasBeenSet(false)
{
}
ParameterNameValue::ParameterNameValue(const XmlNode& xmlNode) :
m_parameterNameHasBeenSet(false),
m_parameterValueHasBeenSet(false)
{
*this = xmlNode;
}
ParameterNameValue& ParameterNameValue::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode parameterNameNode = resultNode.FirstChild("ParameterName");
if(!parameterNameNode.IsNull())
{
m_parameterName = Aws::Utils::Xml::DecodeEscapedXmlText(parameterNameNode.GetText());
m_parameterNameHasBeenSet = true;
}
XmlNode parameterValueNode = resultNode.FirstChild("ParameterValue");
if(!parameterValueNode.IsNull())
{
m_parameterValue = Aws::Utils::Xml::DecodeEscapedXmlText(parameterValueNode.GetText());
m_parameterValueHasBeenSet = true;
}
}
return *this;
}
void ParameterNameValue::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_parameterNameHasBeenSet)
{
oStream << location << index << locationValue << ".ParameterName=" << StringUtils::URLEncode(m_parameterName.c_str()) << "&";
}
if(m_parameterValueHasBeenSet)
{
oStream << location << index << locationValue << ".ParameterValue=" << StringUtils::URLEncode(m_parameterValue.c_str()) << "&";
}
}
void ParameterNameValue::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_parameterNameHasBeenSet)
{
oStream << location << ".ParameterName=" << StringUtils::URLEncode(m_parameterName.c_str()) << "&";
}
if(m_parameterValueHasBeenSet)
{
oStream << location << ".ParameterValue=" << StringUtils::URLEncode(m_parameterValue.c_str()) << "&";
}
}
} // namespace Model
} // namespace ElastiCache
} // namespace Aws