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

92 lines
1.5 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/rekognition/model/CustomLabel.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
{
CustomLabel::CustomLabel() :
m_nameHasBeenSet(false),
m_confidence(0.0),
m_confidenceHasBeenSet(false),
m_geometryHasBeenSet(false)
{
}
CustomLabel::CustomLabel(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_confidence(0.0),
m_confidenceHasBeenSet(false),
m_geometryHasBeenSet(false)
{
*this = jsonValue;
}
CustomLabel& CustomLabel::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Confidence"))
{
m_confidence = jsonValue.GetDouble("Confidence");
m_confidenceHasBeenSet = true;
}
if(jsonValue.ValueExists("Geometry"))
{
m_geometry = jsonValue.GetObject("Geometry");
m_geometryHasBeenSet = true;
}
return *this;
}
JsonValue CustomLabel::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_confidenceHasBeenSet)
{
payload.WithDouble("Confidence", m_confidence);
}
if(m_geometryHasBeenSet)
{
payload.WithObject("Geometry", m_geometry.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Rekognition
} // namespace Aws