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-clouddirectory/source/model/PathToObjectIdentifiers.cpp

83 lines
2.0 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/clouddirectory/model/PathToObjectIdentifiers.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudDirectory
{
namespace Model
{
PathToObjectIdentifiers::PathToObjectIdentifiers() :
m_pathHasBeenSet(false),
m_objectIdentifiersHasBeenSet(false)
{
}
PathToObjectIdentifiers::PathToObjectIdentifiers(JsonView jsonValue) :
m_pathHasBeenSet(false),
m_objectIdentifiersHasBeenSet(false)
{
*this = jsonValue;
}
PathToObjectIdentifiers& PathToObjectIdentifiers::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Path"))
{
m_path = jsonValue.GetString("Path");
m_pathHasBeenSet = true;
}
if(jsonValue.ValueExists("ObjectIdentifiers"))
{
Array<JsonView> objectIdentifiersJsonList = jsonValue.GetArray("ObjectIdentifiers");
for(unsigned objectIdentifiersIndex = 0; objectIdentifiersIndex < objectIdentifiersJsonList.GetLength(); ++objectIdentifiersIndex)
{
m_objectIdentifiers.push_back(objectIdentifiersJsonList[objectIdentifiersIndex].AsString());
}
m_objectIdentifiersHasBeenSet = true;
}
return *this;
}
JsonValue PathToObjectIdentifiers::Jsonize() const
{
JsonValue payload;
if(m_pathHasBeenSet)
{
payload.WithString("Path", m_path);
}
if(m_objectIdentifiersHasBeenSet)
{
Array<JsonValue> objectIdentifiersJsonList(m_objectIdentifiers.size());
for(unsigned objectIdentifiersIndex = 0; objectIdentifiersIndex < objectIdentifiersJsonList.GetLength(); ++objectIdentifiersIndex)
{
objectIdentifiersJsonList[objectIdentifiersIndex].AsString(m_objectIdentifiers[objectIdentifiersIndex]);
}
payload.WithArray("ObjectIdentifiers", std::move(objectIdentifiersJsonList));
}
return payload;
}
} // namespace Model
} // namespace CloudDirectory
} // namespace Aws