106 lines
1.9 KiB
C++
106 lines
1.9 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/devicefarm/model/Project.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace DeviceFarm
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
Project::Project() :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_defaultJobTimeoutMinutes(0),
|
|
m_defaultJobTimeoutMinutesHasBeenSet(false),
|
|
m_createdHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Project::Project(JsonView jsonValue) :
|
|
m_arnHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_defaultJobTimeoutMinutes(0),
|
|
m_defaultJobTimeoutMinutesHasBeenSet(false),
|
|
m_createdHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
Project& Project::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("defaultJobTimeoutMinutes"))
|
|
{
|
|
m_defaultJobTimeoutMinutes = jsonValue.GetInteger("defaultJobTimeoutMinutes");
|
|
|
|
m_defaultJobTimeoutMinutesHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("created"))
|
|
{
|
|
m_created = jsonValue.GetDouble("created");
|
|
|
|
m_createdHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue Project::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_arnHasBeenSet)
|
|
{
|
|
payload.WithString("arn", m_arn);
|
|
|
|
}
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("name", m_name);
|
|
|
|
}
|
|
|
|
if(m_defaultJobTimeoutMinutesHasBeenSet)
|
|
{
|
|
payload.WithInteger("defaultJobTimeoutMinutes", m_defaultJobTimeoutMinutes);
|
|
|
|
}
|
|
|
|
if(m_createdHasBeenSet)
|
|
{
|
|
payload.WithDouble("created", m_created.SecondsWithMSPrecision());
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace DeviceFarm
|
|
} // namespace Aws
|