This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-iotsitewise/source/model/PropertyNotification.cpp

76 lines
1.5 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iotsitewise/model/PropertyNotification.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
{
PropertyNotification::PropertyNotification() :
m_topicHasBeenSet(false),
m_state(PropertyNotificationState::NOT_SET),
m_stateHasBeenSet(false)
{
}
PropertyNotification::PropertyNotification(JsonView jsonValue) :
m_topicHasBeenSet(false),
m_state(PropertyNotificationState::NOT_SET),
m_stateHasBeenSet(false)
{
*this = jsonValue;
}
PropertyNotification& PropertyNotification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("topic"))
{
m_topic = jsonValue.GetString("topic");
m_topicHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = PropertyNotificationStateMapper::GetPropertyNotificationStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
return *this;
}
JsonValue PropertyNotification::Jsonize() const
{
JsonValue payload;
if(m_topicHasBeenSet)
{
payload.WithString("topic", m_topic);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", PropertyNotificationStateMapper::GetNameForPropertyNotificationState(m_state));
}
return payload;
}
} // namespace Model
} // namespace IoTSiteWise
} // namespace Aws