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,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/ExperimentConfig.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SageMaker
{
namespace Model
{
ExperimentConfig::ExperimentConfig() :
m_experimentNameHasBeenSet(false),
m_trialNameHasBeenSet(false),
m_trialComponentDisplayNameHasBeenSet(false)
{
}
ExperimentConfig::ExperimentConfig(JsonView jsonValue) :
m_experimentNameHasBeenSet(false),
m_trialNameHasBeenSet(false),
m_trialComponentDisplayNameHasBeenSet(false)
{
*this = jsonValue;
}
ExperimentConfig& ExperimentConfig::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExperimentName"))
{
m_experimentName = jsonValue.GetString("ExperimentName");
m_experimentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("TrialName"))
{
m_trialName = jsonValue.GetString("TrialName");
m_trialNameHasBeenSet = true;
}
if(jsonValue.ValueExists("TrialComponentDisplayName"))
{
m_trialComponentDisplayName = jsonValue.GetString("TrialComponentDisplayName");
m_trialComponentDisplayNameHasBeenSet = true;
}
return *this;
}
JsonValue ExperimentConfig::Jsonize() const
{
JsonValue payload;
if(m_experimentNameHasBeenSet)
{
payload.WithString("ExperimentName", m_experimentName);
}
if(m_trialNameHasBeenSet)
{
payload.WithString("TrialName", m_trialName);
}
if(m_trialComponentDisplayNameHasBeenSet)
{
payload.WithString("TrialComponentDisplayName", m_trialComponentDisplayName);
}
return payload;
}
} // namespace Model
} // namespace SageMaker
} // namespace Aws