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

68 lines
1.9 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/rekognition/model/HumanLoopDataAttributes.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
{
HumanLoopDataAttributes::HumanLoopDataAttributes() :
m_contentClassifiersHasBeenSet(false)
{
}
HumanLoopDataAttributes::HumanLoopDataAttributes(JsonView jsonValue) :
m_contentClassifiersHasBeenSet(false)
{
*this = jsonValue;
}
HumanLoopDataAttributes& HumanLoopDataAttributes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ContentClassifiers"))
{
Array<JsonView> contentClassifiersJsonList = jsonValue.GetArray("ContentClassifiers");
for(unsigned contentClassifiersIndex = 0; contentClassifiersIndex < contentClassifiersJsonList.GetLength(); ++contentClassifiersIndex)
{
m_contentClassifiers.push_back(ContentClassifierMapper::GetContentClassifierForName(contentClassifiersJsonList[contentClassifiersIndex].AsString()));
}
m_contentClassifiersHasBeenSet = true;
}
return *this;
}
JsonValue HumanLoopDataAttributes::Jsonize() const
{
JsonValue payload;
if(m_contentClassifiersHasBeenSet)
{
Array<JsonValue> contentClassifiersJsonList(m_contentClassifiers.size());
for(unsigned contentClassifiersIndex = 0; contentClassifiersIndex < contentClassifiersJsonList.GetLength(); ++contentClassifiersIndex)
{
contentClassifiersJsonList[contentClassifiersIndex].AsString(ContentClassifierMapper::GetNameForContentClassifier(m_contentClassifiers[contentClassifiersIndex]));
}
payload.WithArray("ContentClassifiers", std::move(contentClassifiersJsonList));
}
return payload;
}
} // namespace Model
} // namespace Rekognition
} // namespace Aws