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-honeycode/source/model/ResultRow.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/honeycode/model/ResultRow.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Honeycode
{
namespace Model
{
ResultRow::ResultRow() :
m_rowIdHasBeenSet(false),
m_dataItemsHasBeenSet(false)
{
}
ResultRow::ResultRow(JsonView jsonValue) :
m_rowIdHasBeenSet(false),
m_dataItemsHasBeenSet(false)
{
*this = jsonValue;
}
ResultRow& ResultRow::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("rowId"))
{
m_rowId = jsonValue.GetString("rowId");
m_rowIdHasBeenSet = true;
}
if(jsonValue.ValueExists("dataItems"))
{
Array<JsonView> dataItemsJsonList = jsonValue.GetArray("dataItems");
for(unsigned dataItemsIndex = 0; dataItemsIndex < dataItemsJsonList.GetLength(); ++dataItemsIndex)
{
m_dataItems.push_back(dataItemsJsonList[dataItemsIndex].AsObject());
}
m_dataItemsHasBeenSet = true;
}
return *this;
}
JsonValue ResultRow::Jsonize() const
{
JsonValue payload;
if(m_rowIdHasBeenSet)
{
payload.WithString("rowId", m_rowId);
}
if(m_dataItemsHasBeenSet)
{
Array<JsonValue> dataItemsJsonList(m_dataItems.size());
for(unsigned dataItemsIndex = 0; dataItemsIndex < dataItemsJsonList.GetLength(); ++dataItemsIndex)
{
dataItemsJsonList[dataItemsIndex].AsObject(m_dataItems[dataItemsIndex].Jsonize());
}
payload.WithArray("dataItems", std::move(dataItemsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Honeycode
} // namespace Aws