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-rekognition/source/model/TrainingData.cpp

68 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/rekognition/model/TrainingData.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Rekognition
{
namespace Model
{
TrainingData::TrainingData() :
m_assetsHasBeenSet(false)
{
}
TrainingData::TrainingData(JsonView jsonValue) :
m_assetsHasBeenSet(false)
{
*this = jsonValue;
}
TrainingData& TrainingData::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Assets"))
{
Array<JsonView> assetsJsonList = jsonValue.GetArray("Assets");
for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex)
{
m_assets.push_back(assetsJsonList[assetsIndex].AsObject());
}
m_assetsHasBeenSet = true;
}
return *this;
}
JsonValue TrainingData::Jsonize() const
{
JsonValue payload;
if(m_assetsHasBeenSet)
{
Array<JsonValue> assetsJsonList(m_assets.size());
for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex)
{
assetsJsonList[assetsIndex].AsObject(m_assets[assetsIndex].Jsonize());
}
payload.WithArray("Assets", std::move(assetsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Rekognition
} // namespace Aws