60 lines
999 B
C++
60 lines
999 B
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iotsitewise/model/Attribute.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace IoTSiteWise
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
Attribute::Attribute() :
|
|
m_defaultValueHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Attribute::Attribute(JsonView jsonValue) :
|
|
m_defaultValueHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
Attribute& Attribute::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("defaultValue"))
|
|
{
|
|
m_defaultValue = jsonValue.GetString("defaultValue");
|
|
|
|
m_defaultValueHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue Attribute::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_defaultValueHasBeenSet)
|
|
{
|
|
payload.WithString("defaultValue", m_defaultValue);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace IoTSiteWise
|
|
} // namespace Aws
|