/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace XRay { namespace Model { HistogramEntry::HistogramEntry() : m_value(0.0), m_valueHasBeenSet(false), m_count(0), m_countHasBeenSet(false) { } HistogramEntry::HistogramEntry(JsonView jsonValue) : m_value(0.0), m_valueHasBeenSet(false), m_count(0), m_countHasBeenSet(false) { *this = jsonValue; } HistogramEntry& HistogramEntry::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Value")) { m_value = jsonValue.GetDouble("Value"); m_valueHasBeenSet = true; } if(jsonValue.ValueExists("Count")) { m_count = jsonValue.GetInteger("Count"); m_countHasBeenSet = true; } return *this; } JsonValue HistogramEntry::Jsonize() const { JsonValue payload; if(m_valueHasBeenSet) { payload.WithDouble("Value", m_value); } if(m_countHasBeenSet) { payload.WithInteger("Count", m_count); } return payload; } } // namespace Model } // namespace XRay } // namespace Aws