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,166 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/pinpoint/model/APNSVoipSandboxChannelRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Pinpoint
{
namespace Model
{
APNSVoipSandboxChannelRequest::APNSVoipSandboxChannelRequest() :
m_bundleIdHasBeenSet(false),
m_certificateHasBeenSet(false),
m_defaultAuthenticationMethodHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_privateKeyHasBeenSet(false),
m_teamIdHasBeenSet(false),
m_tokenKeyHasBeenSet(false),
m_tokenKeyIdHasBeenSet(false)
{
}
APNSVoipSandboxChannelRequest::APNSVoipSandboxChannelRequest(JsonView jsonValue) :
m_bundleIdHasBeenSet(false),
m_certificateHasBeenSet(false),
m_defaultAuthenticationMethodHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_privateKeyHasBeenSet(false),
m_teamIdHasBeenSet(false),
m_tokenKeyHasBeenSet(false),
m_tokenKeyIdHasBeenSet(false)
{
*this = jsonValue;
}
APNSVoipSandboxChannelRequest& APNSVoipSandboxChannelRequest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("BundleId"))
{
m_bundleId = jsonValue.GetString("BundleId");
m_bundleIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Certificate"))
{
m_certificate = jsonValue.GetString("Certificate");
m_certificateHasBeenSet = true;
}
if(jsonValue.ValueExists("DefaultAuthenticationMethod"))
{
m_defaultAuthenticationMethod = jsonValue.GetString("DefaultAuthenticationMethod");
m_defaultAuthenticationMethodHasBeenSet = true;
}
if(jsonValue.ValueExists("Enabled"))
{
m_enabled = jsonValue.GetBool("Enabled");
m_enabledHasBeenSet = true;
}
if(jsonValue.ValueExists("PrivateKey"))
{
m_privateKey = jsonValue.GetString("PrivateKey");
m_privateKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("TeamId"))
{
m_teamId = jsonValue.GetString("TeamId");
m_teamIdHasBeenSet = true;
}
if(jsonValue.ValueExists("TokenKey"))
{
m_tokenKey = jsonValue.GetString("TokenKey");
m_tokenKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("TokenKeyId"))
{
m_tokenKeyId = jsonValue.GetString("TokenKeyId");
m_tokenKeyIdHasBeenSet = true;
}
return *this;
}
JsonValue APNSVoipSandboxChannelRequest::Jsonize() const
{
JsonValue payload;
if(m_bundleIdHasBeenSet)
{
payload.WithString("BundleId", m_bundleId);
}
if(m_certificateHasBeenSet)
{
payload.WithString("Certificate", m_certificate);
}
if(m_defaultAuthenticationMethodHasBeenSet)
{
payload.WithString("DefaultAuthenticationMethod", m_defaultAuthenticationMethod);
}
if(m_enabledHasBeenSet)
{
payload.WithBool("Enabled", m_enabled);
}
if(m_privateKeyHasBeenSet)
{
payload.WithString("PrivateKey", m_privateKey);
}
if(m_teamIdHasBeenSet)
{
payload.WithString("TeamId", m_teamId);
}
if(m_tokenKeyHasBeenSet)
{
payload.WithString("TokenKey", m_tokenKey);
}
if(m_tokenKeyIdHasBeenSet)
{
payload.WithString("TokenKeyId", m_tokenKeyId);
}
return payload;
}
} // namespace Model
} // namespace Pinpoint
} // namespace Aws