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,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DescribePatchGroupStateResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribePatchGroupStateResult::DescribePatchGroupStateResult() :
m_instances(0),
m_instancesWithInstalledPatches(0),
m_instancesWithInstalledOtherPatches(0),
m_instancesWithInstalledPendingRebootPatches(0),
m_instancesWithInstalledRejectedPatches(0),
m_instancesWithMissingPatches(0),
m_instancesWithFailedPatches(0),
m_instancesWithNotApplicablePatches(0),
m_instancesWithUnreportedNotApplicablePatches(0)
{
}
DescribePatchGroupStateResult::DescribePatchGroupStateResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_instances(0),
m_instancesWithInstalledPatches(0),
m_instancesWithInstalledOtherPatches(0),
m_instancesWithInstalledPendingRebootPatches(0),
m_instancesWithInstalledRejectedPatches(0),
m_instancesWithMissingPatches(0),
m_instancesWithFailedPatches(0),
m_instancesWithNotApplicablePatches(0),
m_instancesWithUnreportedNotApplicablePatches(0)
{
*this = result;
}
DescribePatchGroupStateResult& DescribePatchGroupStateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Instances"))
{
m_instances = jsonValue.GetInteger("Instances");
}
if(jsonValue.ValueExists("InstancesWithInstalledPatches"))
{
m_instancesWithInstalledPatches = jsonValue.GetInteger("InstancesWithInstalledPatches");
}
if(jsonValue.ValueExists("InstancesWithInstalledOtherPatches"))
{
m_instancesWithInstalledOtherPatches = jsonValue.GetInteger("InstancesWithInstalledOtherPatches");
}
if(jsonValue.ValueExists("InstancesWithInstalledPendingRebootPatches"))
{
m_instancesWithInstalledPendingRebootPatches = jsonValue.GetInteger("InstancesWithInstalledPendingRebootPatches");
}
if(jsonValue.ValueExists("InstancesWithInstalledRejectedPatches"))
{
m_instancesWithInstalledRejectedPatches = jsonValue.GetInteger("InstancesWithInstalledRejectedPatches");
}
if(jsonValue.ValueExists("InstancesWithMissingPatches"))
{
m_instancesWithMissingPatches = jsonValue.GetInteger("InstancesWithMissingPatches");
}
if(jsonValue.ValueExists("InstancesWithFailedPatches"))
{
m_instancesWithFailedPatches = jsonValue.GetInteger("InstancesWithFailedPatches");
}
if(jsonValue.ValueExists("InstancesWithNotApplicablePatches"))
{
m_instancesWithNotApplicablePatches = jsonValue.GetInteger("InstancesWithNotApplicablePatches");
}
if(jsonValue.ValueExists("InstancesWithUnreportedNotApplicablePatches"))
{
m_instancesWithUnreportedNotApplicablePatches = jsonValue.GetInteger("InstancesWithUnreportedNotApplicablePatches");
}
return *this;
}