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-datapipeline/source/model/ValidationWarning.cpp

83 lines
1.7 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/datapipeline/model/ValidationWarning.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataPipeline
{
namespace Model
{
ValidationWarning::ValidationWarning() :
m_idHasBeenSet(false),
m_warningsHasBeenSet(false)
{
}
ValidationWarning::ValidationWarning(JsonView jsonValue) :
m_idHasBeenSet(false),
m_warningsHasBeenSet(false)
{
*this = jsonValue;
}
ValidationWarning& ValidationWarning::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("warnings"))
{
Array<JsonView> warningsJsonList = jsonValue.GetArray("warnings");
for(unsigned warningsIndex = 0; warningsIndex < warningsJsonList.GetLength(); ++warningsIndex)
{
m_warnings.push_back(warningsJsonList[warningsIndex].AsString());
}
m_warningsHasBeenSet = true;
}
return *this;
}
JsonValue ValidationWarning::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_warningsHasBeenSet)
{
Array<JsonValue> warningsJsonList(m_warnings.size());
for(unsigned warningsIndex = 0; warningsIndex < warningsJsonList.GetLength(); ++warningsIndex)
{
warningsJsonList[warningsIndex].AsString(m_warnings[warningsIndex]);
}
payload.WithArray("warnings", std::move(warningsJsonList));
}
return payload;
}
} // namespace Model
} // namespace DataPipeline
} // namespace Aws