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/UnprocessedUpdateAction.cpp

139 lines
4.3 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/elasticache/model/UnprocessedUpdateAction.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
{
UnprocessedUpdateAction::UnprocessedUpdateAction() :
m_replicationGroupIdHasBeenSet(false),
m_cacheClusterIdHasBeenSet(false),
m_serviceUpdateNameHasBeenSet(false),
m_errorTypeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
}
UnprocessedUpdateAction::UnprocessedUpdateAction(const XmlNode& xmlNode) :
m_replicationGroupIdHasBeenSet(false),
m_cacheClusterIdHasBeenSet(false),
m_serviceUpdateNameHasBeenSet(false),
m_errorTypeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
*this = xmlNode;
}
UnprocessedUpdateAction& UnprocessedUpdateAction::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode replicationGroupIdNode = resultNode.FirstChild("ReplicationGroupId");
if(!replicationGroupIdNode.IsNull())
{
m_replicationGroupId = Aws::Utils::Xml::DecodeEscapedXmlText(replicationGroupIdNode.GetText());
m_replicationGroupIdHasBeenSet = true;
}
XmlNode cacheClusterIdNode = resultNode.FirstChild("CacheClusterId");
if(!cacheClusterIdNode.IsNull())
{
m_cacheClusterId = Aws::Utils::Xml::DecodeEscapedXmlText(cacheClusterIdNode.GetText());
m_cacheClusterIdHasBeenSet = true;
}
XmlNode serviceUpdateNameNode = resultNode.FirstChild("ServiceUpdateName");
if(!serviceUpdateNameNode.IsNull())
{
m_serviceUpdateName = Aws::Utils::Xml::DecodeEscapedXmlText(serviceUpdateNameNode.GetText());
m_serviceUpdateNameHasBeenSet = true;
}
XmlNode errorTypeNode = resultNode.FirstChild("ErrorType");
if(!errorTypeNode.IsNull())
{
m_errorType = Aws::Utils::Xml::DecodeEscapedXmlText(errorTypeNode.GetText());
m_errorTypeHasBeenSet = true;
}
XmlNode errorMessageNode = resultNode.FirstChild("ErrorMessage");
if(!errorMessageNode.IsNull())
{
m_errorMessage = Aws::Utils::Xml::DecodeEscapedXmlText(errorMessageNode.GetText());
m_errorMessageHasBeenSet = true;
}
}
return *this;
}
void UnprocessedUpdateAction::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_replicationGroupIdHasBeenSet)
{
oStream << location << index << locationValue << ".ReplicationGroupId=" << StringUtils::URLEncode(m_replicationGroupId.c_str()) << "&";
}
if(m_cacheClusterIdHasBeenSet)
{
oStream << location << index << locationValue << ".CacheClusterId=" << StringUtils::URLEncode(m_cacheClusterId.c_str()) << "&";
}
if(m_serviceUpdateNameHasBeenSet)
{
oStream << location << index << locationValue << ".ServiceUpdateName=" << StringUtils::URLEncode(m_serviceUpdateName.c_str()) << "&";
}
if(m_errorTypeHasBeenSet)
{
oStream << location << index << locationValue << ".ErrorType=" << StringUtils::URLEncode(m_errorType.c_str()) << "&";
}
if(m_errorMessageHasBeenSet)
{
oStream << location << index << locationValue << ".ErrorMessage=" << StringUtils::URLEncode(m_errorMessage.c_str()) << "&";
}
}
void UnprocessedUpdateAction::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_replicationGroupIdHasBeenSet)
{
oStream << location << ".ReplicationGroupId=" << StringUtils::URLEncode(m_replicationGroupId.c_str()) << "&";
}
if(m_cacheClusterIdHasBeenSet)
{
oStream << location << ".CacheClusterId=" << StringUtils::URLEncode(m_cacheClusterId.c_str()) << "&";
}
if(m_serviceUpdateNameHasBeenSet)
{
oStream << location << ".ServiceUpdateName=" << StringUtils::URLEncode(m_serviceUpdateName.c_str()) << "&";
}
if(m_errorTypeHasBeenSet)
{
oStream << location << ".ErrorType=" << StringUtils::URLEncode(m_errorType.c_str()) << "&";
}
if(m_errorMessageHasBeenSet)
{
oStream << location << ".ErrorMessage=" << StringUtils::URLEncode(m_errorMessage.c_str()) << "&";
}
}
} // namespace Model
} // namespace ElastiCache
} // namespace Aws