90 lines
1.7 KiB
C++
90 lines
1.7 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/robomaker/model/RobotApplicationConfig.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace RoboMaker
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
RobotApplicationConfig::RobotApplicationConfig() :
|
|
m_applicationHasBeenSet(false),
|
|
m_applicationVersionHasBeenSet(false),
|
|
m_launchConfigHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
RobotApplicationConfig::RobotApplicationConfig(JsonView jsonValue) :
|
|
m_applicationHasBeenSet(false),
|
|
m_applicationVersionHasBeenSet(false),
|
|
m_launchConfigHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
RobotApplicationConfig& RobotApplicationConfig::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("application"))
|
|
{
|
|
m_application = jsonValue.GetString("application");
|
|
|
|
m_applicationHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("applicationVersion"))
|
|
{
|
|
m_applicationVersion = jsonValue.GetString("applicationVersion");
|
|
|
|
m_applicationVersionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("launchConfig"))
|
|
{
|
|
m_launchConfig = jsonValue.GetObject("launchConfig");
|
|
|
|
m_launchConfigHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue RobotApplicationConfig::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_applicationHasBeenSet)
|
|
{
|
|
payload.WithString("application", m_application);
|
|
|
|
}
|
|
|
|
if(m_applicationVersionHasBeenSet)
|
|
{
|
|
payload.WithString("applicationVersion", m_applicationVersion);
|
|
|
|
}
|
|
|
|
if(m_launchConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("launchConfig", m_launchConfig.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace RoboMaker
|
|
} // namespace Aws
|