70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iotsitewise/model/CreateProjectRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::IoTSiteWise::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateProjectRequest::CreateProjectRequest() :
|
|
m_portalIdHasBeenSet(false),
|
|
m_projectNameHasBeenSet(false),
|
|
m_projectDescriptionHasBeenSet(false),
|
|
m_clientToken(Aws::Utils::UUID::RandomUUID()),
|
|
m_clientTokenHasBeenSet(true),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateProjectRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_portalIdHasBeenSet)
|
|
{
|
|
payload.WithString("portalId", m_portalId);
|
|
|
|
}
|
|
|
|
if(m_projectNameHasBeenSet)
|
|
{
|
|
payload.WithString("projectName", m_projectName);
|
|
|
|
}
|
|
|
|
if(m_projectDescriptionHasBeenSet)
|
|
{
|
|
payload.WithString("projectDescription", m_projectDescription);
|
|
|
|
}
|
|
|
|
if(m_clientTokenHasBeenSet)
|
|
{
|
|
payload.WithString("clientToken", m_clientToken);
|
|
|
|
}
|
|
|
|
if(m_tagsHasBeenSet)
|
|
{
|
|
JsonValue tagsJsonMap;
|
|
for(auto& tagsItem : m_tags)
|
|
{
|
|
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
|
|
}
|
|
payload.WithObject("tags", std::move(tagsJsonMap));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
|
|
|
|
|