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,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/securityhub/model/AwsS3BucketDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SecurityHub
{
namespace Model
{
AwsS3BucketDetails::AwsS3BucketDetails() :
m_ownerIdHasBeenSet(false),
m_ownerNameHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_serverSideEncryptionConfigurationHasBeenSet(false)
{
}
AwsS3BucketDetails::AwsS3BucketDetails(JsonView jsonValue) :
m_ownerIdHasBeenSet(false),
m_ownerNameHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_serverSideEncryptionConfigurationHasBeenSet(false)
{
*this = jsonValue;
}
AwsS3BucketDetails& AwsS3BucketDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("OwnerId"))
{
m_ownerId = jsonValue.GetString("OwnerId");
m_ownerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("OwnerName"))
{
m_ownerName = jsonValue.GetString("OwnerName");
m_ownerNameHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedAt"))
{
m_createdAt = jsonValue.GetString("CreatedAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("ServerSideEncryptionConfiguration"))
{
m_serverSideEncryptionConfiguration = jsonValue.GetObject("ServerSideEncryptionConfiguration");
m_serverSideEncryptionConfigurationHasBeenSet = true;
}
return *this;
}
JsonValue AwsS3BucketDetails::Jsonize() const
{
JsonValue payload;
if(m_ownerIdHasBeenSet)
{
payload.WithString("OwnerId", m_ownerId);
}
if(m_ownerNameHasBeenSet)
{
payload.WithString("OwnerName", m_ownerName);
}
if(m_createdAtHasBeenSet)
{
payload.WithString("CreatedAt", m_createdAt);
}
if(m_serverSideEncryptionConfigurationHasBeenSet)
{
payload.WithObject("ServerSideEncryptionConfiguration", m_serverSideEncryptionConfiguration.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SecurityHub
} // namespace Aws