75 lines
1.2 KiB
C++
75 lines
1.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/logs/model/ResultField.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace CloudWatchLogs
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
ResultField::ResultField() :
|
|
m_fieldHasBeenSet(false),
|
|
m_valueHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
ResultField::ResultField(JsonView jsonValue) :
|
|
m_fieldHasBeenSet(false),
|
|
m_valueHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
ResultField& ResultField::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("field"))
|
|
{
|
|
m_field = jsonValue.GetString("field");
|
|
|
|
m_fieldHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("value"))
|
|
{
|
|
m_value = jsonValue.GetString("value");
|
|
|
|
m_valueHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue ResultField::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_fieldHasBeenSet)
|
|
{
|
|
payload.WithString("field", m_field);
|
|
|
|
}
|
|
|
|
if(m_valueHasBeenSet)
|
|
{
|
|
payload.WithString("value", m_value);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace CloudWatchLogs
|
|
} // namespace Aws
|