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-comprehend/source/model/DominantLanguage.cpp

77 lines
1.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/comprehend/model/DominantLanguage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Comprehend
{
namespace Model
{
DominantLanguage::DominantLanguage() :
m_languageCodeHasBeenSet(false),
m_score(0.0),
m_scoreHasBeenSet(false)
{
}
DominantLanguage::DominantLanguage(JsonView jsonValue) :
m_languageCodeHasBeenSet(false),
m_score(0.0),
m_scoreHasBeenSet(false)
{
*this = jsonValue;
}
DominantLanguage& DominantLanguage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("LanguageCode"))
{
m_languageCode = jsonValue.GetString("LanguageCode");
m_languageCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("Score"))
{
m_score = jsonValue.GetDouble("Score");
m_scoreHasBeenSet = true;
}
return *this;
}
JsonValue DominantLanguage::Jsonize() const
{
JsonValue payload;
if(m_languageCodeHasBeenSet)
{
payload.WithString("LanguageCode", m_languageCode);
}
if(m_scoreHasBeenSet)
{
payload.WithDouble("Score", m_score);
}
return payload;
}
} // namespace Model
} // namespace Comprehend
} // namespace Aws