77 lines
1.3 KiB
C++
77 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/health/model/EntityAggregate.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Health
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
EntityAggregate::EntityAggregate() :
|
|
m_eventArnHasBeenSet(false),
|
|
m_count(0),
|
|
m_countHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
EntityAggregate::EntityAggregate(JsonView jsonValue) :
|
|
m_eventArnHasBeenSet(false),
|
|
m_count(0),
|
|
m_countHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
EntityAggregate& EntityAggregate::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("eventArn"))
|
|
{
|
|
m_eventArn = jsonValue.GetString("eventArn");
|
|
|
|
m_eventArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("count"))
|
|
{
|
|
m_count = jsonValue.GetInteger("count");
|
|
|
|
m_countHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue EntityAggregate::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_eventArnHasBeenSet)
|
|
{
|
|
payload.WithString("eventArn", m_eventArn);
|
|
|
|
}
|
|
|
|
if(m_countHasBeenSet)
|
|
{
|
|
payload.WithInteger("count", m_count);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Health
|
|
} // namespace Aws
|