72 lines
1.5 KiB
C++
72 lines
1.5 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iot/model/CreateAuditSuppressionRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::IoT::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateAuditSuppressionRequest::CreateAuditSuppressionRequest() :
|
|
m_checkNameHasBeenSet(false),
|
|
m_resourceIdentifierHasBeenSet(false),
|
|
m_expirationDateHasBeenSet(false),
|
|
m_suppressIndefinitely(false),
|
|
m_suppressIndefinitelyHasBeenSet(false),
|
|
m_descriptionHasBeenSet(false),
|
|
m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
|
|
m_clientRequestTokenHasBeenSet(true)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateAuditSuppressionRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_checkNameHasBeenSet)
|
|
{
|
|
payload.WithString("checkName", m_checkName);
|
|
|
|
}
|
|
|
|
if(m_resourceIdentifierHasBeenSet)
|
|
{
|
|
payload.WithObject("resourceIdentifier", m_resourceIdentifier.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_expirationDateHasBeenSet)
|
|
{
|
|
payload.WithDouble("expirationDate", m_expirationDate.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_suppressIndefinitelyHasBeenSet)
|
|
{
|
|
payload.WithBool("suppressIndefinitely", m_suppressIndefinitely);
|
|
|
|
}
|
|
|
|
if(m_descriptionHasBeenSet)
|
|
{
|
|
payload.WithString("description", m_description);
|
|
|
|
}
|
|
|
|
if(m_clientRequestTokenHasBeenSet)
|
|
{
|
|
payload.WithString("clientRequestToken", m_clientRequestToken);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
|
|
|
|
|