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,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearch/model/AccessPoliciesStatus.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 CloudSearch
{
namespace Model
{
AccessPoliciesStatus::AccessPoliciesStatus() :
m_optionsHasBeenSet(false),
m_statusHasBeenSet(false)
{
}
AccessPoliciesStatus::AccessPoliciesStatus(const XmlNode& xmlNode) :
m_optionsHasBeenSet(false),
m_statusHasBeenSet(false)
{
*this = xmlNode;
}
AccessPoliciesStatus& AccessPoliciesStatus::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode optionsNode = resultNode.FirstChild("Options");
if(!optionsNode.IsNull())
{
m_options = Aws::Utils::Xml::DecodeEscapedXmlText(optionsNode.GetText());
m_optionsHasBeenSet = true;
}
XmlNode statusNode = resultNode.FirstChild("Status");
if(!statusNode.IsNull())
{
m_status = statusNode;
m_statusHasBeenSet = true;
}
}
return *this;
}
void AccessPoliciesStatus::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_optionsHasBeenSet)
{
oStream << location << index << locationValue << ".Options=" << StringUtils::URLEncode(m_options.c_str()) << "&";
}
if(m_statusHasBeenSet)
{
Aws::StringStream statusLocationAndMemberSs;
statusLocationAndMemberSs << location << index << locationValue << ".Status";
m_status.OutputToStream(oStream, statusLocationAndMemberSs.str().c_str());
}
}
void AccessPoliciesStatus::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_optionsHasBeenSet)
{
oStream << location << ".Options=" << StringUtils::URLEncode(m_options.c_str()) << "&";
}
if(m_statusHasBeenSet)
{
Aws::String statusLocationAndMember(location);
statusLocationAndMember += ".Status";
m_status.OutputToStream(oStream, statusLocationAndMember.c_str());
}
}
} // namespace Model
} // namespace CloudSearch
} // namespace Aws