feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,138 @@
/**
* 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