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,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sesv2/model/InboxPlacementTrackingOption.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SESV2
{
namespace Model
{
InboxPlacementTrackingOption::InboxPlacementTrackingOption() :
m_global(false),
m_globalHasBeenSet(false),
m_trackedIspsHasBeenSet(false)
{
}
InboxPlacementTrackingOption::InboxPlacementTrackingOption(JsonView jsonValue) :
m_global(false),
m_globalHasBeenSet(false),
m_trackedIspsHasBeenSet(false)
{
*this = jsonValue;
}
InboxPlacementTrackingOption& InboxPlacementTrackingOption::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Global"))
{
m_global = jsonValue.GetBool("Global");
m_globalHasBeenSet = true;
}
if(jsonValue.ValueExists("TrackedIsps"))
{
Array<JsonView> trackedIspsJsonList = jsonValue.GetArray("TrackedIsps");
for(unsigned trackedIspsIndex = 0; trackedIspsIndex < trackedIspsJsonList.GetLength(); ++trackedIspsIndex)
{
m_trackedIsps.push_back(trackedIspsJsonList[trackedIspsIndex].AsString());
}
m_trackedIspsHasBeenSet = true;
}
return *this;
}
JsonValue InboxPlacementTrackingOption::Jsonize() const
{
JsonValue payload;
if(m_globalHasBeenSet)
{
payload.WithBool("Global", m_global);
}
if(m_trackedIspsHasBeenSet)
{
Array<JsonValue> trackedIspsJsonList(m_trackedIsps.size());
for(unsigned trackedIspsIndex = 0; trackedIspsIndex < trackedIspsJsonList.GetLength(); ++trackedIspsIndex)
{
trackedIspsJsonList[trackedIspsIndex].AsString(m_trackedIsps[trackedIspsIndex]);
}
payload.WithArray("TrackedIsps", std::move(trackedIspsJsonList));
}
return payload;
}
} // namespace Model
} // namespace SESV2
} // namespace Aws