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-forecast/source/model/WeightedQuantileLoss.cpp

79 lines
1.4 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/forecast/model/WeightedQuantileLoss.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace ForecastService
{
namespace Model
{
WeightedQuantileLoss::WeightedQuantileLoss() :
m_quantile(0.0),
m_quantileHasBeenSet(false),
m_lossValue(0.0),
m_lossValueHasBeenSet(false)
{
}
WeightedQuantileLoss::WeightedQuantileLoss(JsonView jsonValue) :
m_quantile(0.0),
m_quantileHasBeenSet(false),
m_lossValue(0.0),
m_lossValueHasBeenSet(false)
{
*this = jsonValue;
}
WeightedQuantileLoss& WeightedQuantileLoss::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Quantile"))
{
m_quantile = jsonValue.GetDouble("Quantile");
m_quantileHasBeenSet = true;
}
if(jsonValue.ValueExists("LossValue"))
{
m_lossValue = jsonValue.GetDouble("LossValue");
m_lossValueHasBeenSet = true;
}
return *this;
}
JsonValue WeightedQuantileLoss::Jsonize() const
{
JsonValue payload;
if(m_quantileHasBeenSet)
{
payload.WithDouble("Quantile", m_quantile);
}
if(m_lossValueHasBeenSet)
{
payload.WithDouble("LossValue", m_lossValue);
}
return payload;
}
} // namespace Model
} // namespace ForecastService
} // namespace Aws