105 lines
1.8 KiB
C++
105 lines
1.8 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/synthetics/model/CanaryRun.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Synthetics
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
CanaryRun::CanaryRun() :
|
|
m_nameHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_timelineHasBeenSet(false),
|
|
m_artifactS3LocationHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
CanaryRun::CanaryRun(JsonView jsonValue) :
|
|
m_nameHasBeenSet(false),
|
|
m_statusHasBeenSet(false),
|
|
m_timelineHasBeenSet(false),
|
|
m_artifactS3LocationHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
CanaryRun& CanaryRun::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("Name"))
|
|
{
|
|
m_name = jsonValue.GetString("Name");
|
|
|
|
m_nameHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Status"))
|
|
{
|
|
m_status = jsonValue.GetObject("Status");
|
|
|
|
m_statusHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Timeline"))
|
|
{
|
|
m_timeline = jsonValue.GetObject("Timeline");
|
|
|
|
m_timelineHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ArtifactS3Location"))
|
|
{
|
|
m_artifactS3Location = jsonValue.GetString("ArtifactS3Location");
|
|
|
|
m_artifactS3LocationHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue CanaryRun::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("Name", m_name);
|
|
|
|
}
|
|
|
|
if(m_statusHasBeenSet)
|
|
{
|
|
payload.WithObject("Status", m_status.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_timelineHasBeenSet)
|
|
{
|
|
payload.WithObject("Timeline", m_timeline.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_artifactS3LocationHasBeenSet)
|
|
{
|
|
payload.WithString("ArtifactS3Location", m_artifactS3Location);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Synthetics
|
|
} // namespace Aws
|