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,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeguruprofiler/model/ProfilingStatus.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeGuruProfiler
{
namespace Model
{
ProfilingStatus::ProfilingStatus() :
m_latestAgentOrchestratedAtHasBeenSet(false),
m_latestAgentProfileReportedAtHasBeenSet(false),
m_latestAggregatedProfileHasBeenSet(false)
{
}
ProfilingStatus::ProfilingStatus(JsonView jsonValue) :
m_latestAgentOrchestratedAtHasBeenSet(false),
m_latestAgentProfileReportedAtHasBeenSet(false),
m_latestAggregatedProfileHasBeenSet(false)
{
*this = jsonValue;
}
ProfilingStatus& ProfilingStatus::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("latestAgentOrchestratedAt"))
{
m_latestAgentOrchestratedAt = jsonValue.GetString("latestAgentOrchestratedAt");
m_latestAgentOrchestratedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("latestAgentProfileReportedAt"))
{
m_latestAgentProfileReportedAt = jsonValue.GetString("latestAgentProfileReportedAt");
m_latestAgentProfileReportedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("latestAggregatedProfile"))
{
m_latestAggregatedProfile = jsonValue.GetObject("latestAggregatedProfile");
m_latestAggregatedProfileHasBeenSet = true;
}
return *this;
}
JsonValue ProfilingStatus::Jsonize() const
{
JsonValue payload;
if(m_latestAgentOrchestratedAtHasBeenSet)
{
payload.WithString("latestAgentOrchestratedAt", m_latestAgentOrchestratedAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_latestAgentProfileReportedAtHasBeenSet)
{
payload.WithString("latestAgentProfileReportedAt", m_latestAgentProfileReportedAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_latestAggregatedProfileHasBeenSet)
{
payload.WithObject("latestAggregatedProfile", m_latestAggregatedProfile.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace CodeGuruProfiler
} // namespace Aws