118 lines
2.2 KiB
C++
118 lines
2.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/inspector/model/AssessmentTarget.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Inspector
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
AssessmentTarget::AssessmentTarget() :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_resourceGroupArnHasBeenSet(false),
|
|
m_createdAtHasBeenSet(false),
|
|
m_updatedAtHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
AssessmentTarget::AssessmentTarget(JsonView jsonValue) :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_resourceGroupArnHasBeenSet(false),
|
|
m_createdAtHasBeenSet(false),
|
|
m_updatedAtHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
AssessmentTarget& AssessmentTarget::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("arn"))
|
|
{
|
|
m_arn = jsonValue.GetString("arn");
|
|
|
|
m_arnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("name"))
|
|
{
|
|
m_name = jsonValue.GetString("name");
|
|
|
|
m_nameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("resourceGroupArn"))
|
|
{
|
|
m_resourceGroupArn = jsonValue.GetString("resourceGroupArn");
|
|
|
|
m_resourceGroupArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("createdAt"))
|
|
{
|
|
m_createdAt = jsonValue.GetDouble("createdAt");
|
|
|
|
m_createdAtHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("updatedAt"))
|
|
{
|
|
m_updatedAt = jsonValue.GetDouble("updatedAt");
|
|
|
|
m_updatedAtHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue AssessmentTarget::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_arnHasBeenSet)
|
|
{
|
|
payload.WithString("arn", m_arn);
|
|
|
|
}
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("name", m_name);
|
|
|
|
}
|
|
|
|
if(m_resourceGroupArnHasBeenSet)
|
|
{
|
|
payload.WithString("resourceGroupArn", m_resourceGroupArn);
|
|
|
|
}
|
|
|
|
if(m_createdAtHasBeenSet)
|
|
{
|
|
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_updatedAtHasBeenSet)
|
|
{
|
|
payload.WithDouble("updatedAt", m_updatedAt.SecondsWithMSPrecision());
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Inspector
|
|
} // namespace Aws
|