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,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling/model/NotificationConfiguration.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 AutoScaling
{
namespace Model
{
NotificationConfiguration::NotificationConfiguration() :
m_autoScalingGroupNameHasBeenSet(false),
m_topicARNHasBeenSet(false),
m_notificationTypeHasBeenSet(false)
{
}
NotificationConfiguration::NotificationConfiguration(const XmlNode& xmlNode) :
m_autoScalingGroupNameHasBeenSet(false),
m_topicARNHasBeenSet(false),
m_notificationTypeHasBeenSet(false)
{
*this = xmlNode;
}
NotificationConfiguration& NotificationConfiguration::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode autoScalingGroupNameNode = resultNode.FirstChild("AutoScalingGroupName");
if(!autoScalingGroupNameNode.IsNull())
{
m_autoScalingGroupName = Aws::Utils::Xml::DecodeEscapedXmlText(autoScalingGroupNameNode.GetText());
m_autoScalingGroupNameHasBeenSet = true;
}
XmlNode topicARNNode = resultNode.FirstChild("TopicARN");
if(!topicARNNode.IsNull())
{
m_topicARN = Aws::Utils::Xml::DecodeEscapedXmlText(topicARNNode.GetText());
m_topicARNHasBeenSet = true;
}
XmlNode notificationTypeNode = resultNode.FirstChild("NotificationType");
if(!notificationTypeNode.IsNull())
{
m_notificationType = Aws::Utils::Xml::DecodeEscapedXmlText(notificationTypeNode.GetText());
m_notificationTypeHasBeenSet = true;
}
}
return *this;
}
void NotificationConfiguration::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_autoScalingGroupNameHasBeenSet)
{
oStream << location << index << locationValue << ".AutoScalingGroupName=" << StringUtils::URLEncode(m_autoScalingGroupName.c_str()) << "&";
}
if(m_topicARNHasBeenSet)
{
oStream << location << index << locationValue << ".TopicARN=" << StringUtils::URLEncode(m_topicARN.c_str()) << "&";
}
if(m_notificationTypeHasBeenSet)
{
oStream << location << index << locationValue << ".NotificationType=" << StringUtils::URLEncode(m_notificationType.c_str()) << "&";
}
}
void NotificationConfiguration::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_autoScalingGroupNameHasBeenSet)
{
oStream << location << ".AutoScalingGroupName=" << StringUtils::URLEncode(m_autoScalingGroupName.c_str()) << "&";
}
if(m_topicARNHasBeenSet)
{
oStream << location << ".TopicARN=" << StringUtils::URLEncode(m_topicARN.c_str()) << "&";
}
if(m_notificationTypeHasBeenSet)
{
oStream << location << ".NotificationType=" << StringUtils::URLEncode(m_notificationType.c_str()) << "&";
}
}
} // namespace Model
} // namespace AutoScaling
} // namespace Aws