78 lines
1.4 KiB
C++
78 lines
1.4 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/comprehendmedical/model/ICD10CMTrait.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace ComprehendMedical
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
ICD10CMTrait::ICD10CMTrait() :
|
|||
|
|
m_name(ICD10CMTraitName::NOT_SET),
|
|||
|
|
m_nameHasBeenSet(false),
|
|||
|
|
m_score(0.0),
|
|||
|
|
m_scoreHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ICD10CMTrait::ICD10CMTrait(JsonView jsonValue) :
|
|||
|
|
m_name(ICD10CMTraitName::NOT_SET),
|
|||
|
|
m_nameHasBeenSet(false),
|
|||
|
|
m_score(0.0),
|
|||
|
|
m_scoreHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ICD10CMTrait& ICD10CMTrait::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("Name"))
|
|||
|
|
{
|
|||
|
|
m_name = ICD10CMTraitNameMapper::GetICD10CMTraitNameForName(jsonValue.GetString("Name"));
|
|||
|
|
|
|||
|
|
m_nameHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(jsonValue.ValueExists("Score"))
|
|||
|
|
{
|
|||
|
|
m_score = jsonValue.GetDouble("Score");
|
|||
|
|
|
|||
|
|
m_scoreHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue ICD10CMTrait::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_nameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Name", ICD10CMTraitNameMapper::GetNameForICD10CMTraitName(m_name));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_scoreHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithDouble("Score", m_score);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace ComprehendMedical
|
|||
|
|
} // namespace Aws
|