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/EvaluationResult.cpp

83 lines
1.8 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/forecast/model/EvaluationResult.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
{
EvaluationResult::EvaluationResult() :
m_algorithmArnHasBeenSet(false),
m_testWindowsHasBeenSet(false)
{
}
EvaluationResult::EvaluationResult(JsonView jsonValue) :
m_algorithmArnHasBeenSet(false),
m_testWindowsHasBeenSet(false)
{
*this = jsonValue;
}
EvaluationResult& EvaluationResult::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AlgorithmArn"))
{
m_algorithmArn = jsonValue.GetString("AlgorithmArn");
m_algorithmArnHasBeenSet = true;
}
if(jsonValue.ValueExists("TestWindows"))
{
Array<JsonView> testWindowsJsonList = jsonValue.GetArray("TestWindows");
for(unsigned testWindowsIndex = 0; testWindowsIndex < testWindowsJsonList.GetLength(); ++testWindowsIndex)
{
m_testWindows.push_back(testWindowsJsonList[testWindowsIndex].AsObject());
}
m_testWindowsHasBeenSet = true;
}
return *this;
}
JsonValue EvaluationResult::Jsonize() const
{
JsonValue payload;
if(m_algorithmArnHasBeenSet)
{
payload.WithString("AlgorithmArn", m_algorithmArn);
}
if(m_testWindowsHasBeenSet)
{
Array<JsonValue> testWindowsJsonList(m_testWindows.size());
for(unsigned testWindowsIndex = 0; testWindowsIndex < testWindowsJsonList.GetLength(); ++testWindowsIndex)
{
testWindowsJsonList[testWindowsIndex].AsObject(m_testWindows[testWindowsIndex].Jsonize());
}
payload.WithArray("TestWindows", std::move(testWindowsJsonList));
}
return payload;
}
} // namespace Model
} // namespace ForecastService
} // namespace Aws