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,148 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/DomainDetails.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
{
DomainDetails::DomainDetails() :
m_domainArnHasBeenSet(false),
m_domainIdHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
DomainDetails::DomainDetails(JsonView jsonValue) :
m_domainArnHasBeenSet(false),
m_domainIdHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
DomainDetails& DomainDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("DomainArn"))
{
m_domainArn = jsonValue.GetString("DomainArn");
m_domainArnHasBeenSet = true;
}
if(jsonValue.ValueExists("DomainId"))
{
m_domainId = jsonValue.GetString("DomainId");
m_domainIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DomainName"))
{
m_domainName = jsonValue.GetString("DomainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = DomainStatusMapper::GetDomainStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationTime"))
{
m_creationTime = jsonValue.GetDouble("CreationTime");
m_creationTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("LastModifiedTime"))
{
m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime");
m_lastModifiedTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("Url"))
{
m_url = jsonValue.GetString("Url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue DomainDetails::Jsonize() const
{
JsonValue payload;
if(m_domainArnHasBeenSet)
{
payload.WithString("DomainArn", m_domainArn);
}
if(m_domainIdHasBeenSet)
{
payload.WithString("DomainId", m_domainId);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("DomainName", m_domainName);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", DomainStatusMapper::GetNameForDomainStatus(m_status));
}
if(m_creationTimeHasBeenSet)
{
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
}
if(m_lastModifiedTimeHasBeenSet)
{
payload.WithDouble("LastModifiedTime", m_lastModifiedTime.SecondsWithMSPrecision());
}
if(m_urlHasBeenSet)
{
payload.WithString("Url", m_url);
}
return payload;
}
} // namespace Model
} // namespace SageMaker
} // namespace Aws