75 lines
1.1 KiB
C++
75 lines
1.1 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/polly/model/Lexicon.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Polly
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
Lexicon::Lexicon() :
|
|
m_contentHasBeenSet(false),
|
|
m_nameHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Lexicon::Lexicon(JsonView jsonValue) :
|
|
m_contentHasBeenSet(false),
|
|
m_nameHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
Lexicon& Lexicon::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("Content"))
|
|
{
|
|
m_content = jsonValue.GetString("Content");
|
|
|
|
m_contentHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("Name"))
|
|
{
|
|
m_name = jsonValue.GetString("Name");
|
|
|
|
m_nameHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue Lexicon::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_contentHasBeenSet)
|
|
{
|
|
payload.WithString("Content", m_content);
|
|
|
|
}
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("Name", m_name);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Polly
|
|
} // namespace Aws
|