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-connect/source/model/CurrentMetricData.cpp

77 lines
1.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/connect/model/CurrentMetricData.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Connect
{
namespace Model
{
CurrentMetricData::CurrentMetricData() :
m_metricHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false)
{
}
CurrentMetricData::CurrentMetricData(JsonView jsonValue) :
m_metricHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
CurrentMetricData& CurrentMetricData::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Metric"))
{
m_metric = jsonValue.GetObject("Metric");
m_metricHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetDouble("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue CurrentMetricData::Jsonize() const
{
JsonValue payload;
if(m_metricHasBeenSet)
{
payload.WithObject("Metric", m_metric.Jsonize());
}
if(m_valueHasBeenSet)
{
payload.WithDouble("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace Connect
} // namespace Aws