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,238 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/Patch.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
Patch::Patch() :
m_idHasBeenSet(false),
m_releaseDateHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_contentUrlHasBeenSet(false),
m_vendorHasBeenSet(false),
m_productFamilyHasBeenSet(false),
m_productHasBeenSet(false),
m_classificationHasBeenSet(false),
m_msrcSeverityHasBeenSet(false),
m_kbNumberHasBeenSet(false),
m_msrcNumberHasBeenSet(false),
m_languageHasBeenSet(false)
{
}
Patch::Patch(JsonView jsonValue) :
m_idHasBeenSet(false),
m_releaseDateHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_contentUrlHasBeenSet(false),
m_vendorHasBeenSet(false),
m_productFamilyHasBeenSet(false),
m_productHasBeenSet(false),
m_classificationHasBeenSet(false),
m_msrcSeverityHasBeenSet(false),
m_kbNumberHasBeenSet(false),
m_msrcNumberHasBeenSet(false),
m_languageHasBeenSet(false)
{
*this = jsonValue;
}
Patch& Patch::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("ReleaseDate"))
{
m_releaseDate = jsonValue.GetDouble("ReleaseDate");
m_releaseDateHasBeenSet = true;
}
if(jsonValue.ValueExists("Title"))
{
m_title = jsonValue.GetString("Title");
m_titleHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("ContentUrl"))
{
m_contentUrl = jsonValue.GetString("ContentUrl");
m_contentUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("Vendor"))
{
m_vendor = jsonValue.GetString("Vendor");
m_vendorHasBeenSet = true;
}
if(jsonValue.ValueExists("ProductFamily"))
{
m_productFamily = jsonValue.GetString("ProductFamily");
m_productFamilyHasBeenSet = true;
}
if(jsonValue.ValueExists("Product"))
{
m_product = jsonValue.GetString("Product");
m_productHasBeenSet = true;
}
if(jsonValue.ValueExists("Classification"))
{
m_classification = jsonValue.GetString("Classification");
m_classificationHasBeenSet = true;
}
if(jsonValue.ValueExists("MsrcSeverity"))
{
m_msrcSeverity = jsonValue.GetString("MsrcSeverity");
m_msrcSeverityHasBeenSet = true;
}
if(jsonValue.ValueExists("KbNumber"))
{
m_kbNumber = jsonValue.GetString("KbNumber");
m_kbNumberHasBeenSet = true;
}
if(jsonValue.ValueExists("MsrcNumber"))
{
m_msrcNumber = jsonValue.GetString("MsrcNumber");
m_msrcNumberHasBeenSet = true;
}
if(jsonValue.ValueExists("Language"))
{
m_language = jsonValue.GetString("Language");
m_languageHasBeenSet = true;
}
return *this;
}
JsonValue Patch::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_releaseDateHasBeenSet)
{
payload.WithDouble("ReleaseDate", m_releaseDate.SecondsWithMSPrecision());
}
if(m_titleHasBeenSet)
{
payload.WithString("Title", m_title);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_contentUrlHasBeenSet)
{
payload.WithString("ContentUrl", m_contentUrl);
}
if(m_vendorHasBeenSet)
{
payload.WithString("Vendor", m_vendor);
}
if(m_productFamilyHasBeenSet)
{
payload.WithString("ProductFamily", m_productFamily);
}
if(m_productHasBeenSet)
{
payload.WithString("Product", m_product);
}
if(m_classificationHasBeenSet)
{
payload.WithString("Classification", m_classification);
}
if(m_msrcSeverityHasBeenSet)
{
payload.WithString("MsrcSeverity", m_msrcSeverity);
}
if(m_kbNumberHasBeenSet)
{
payload.WithString("KbNumber", m_kbNumber);
}
if(m_msrcNumberHasBeenSet)
{
payload.WithString("MsrcNumber", m_msrcNumber);
}
if(m_languageHasBeenSet)
{
payload.WithString("Language", m_language);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws