57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/iotthingsgraph/model/GetEntitiesRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::IoTThingsGraph::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
GetEntitiesRequest::GetEntitiesRequest() :
|
|
m_idsHasBeenSet(false),
|
|
m_namespaceVersion(0),
|
|
m_namespaceVersionHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String GetEntitiesRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_idsHasBeenSet)
|
|
{
|
|
Array<JsonValue> idsJsonList(m_ids.size());
|
|
for(unsigned idsIndex = 0; idsIndex < idsJsonList.GetLength(); ++idsIndex)
|
|
{
|
|
idsJsonList[idsIndex].AsString(m_ids[idsIndex]);
|
|
}
|
|
payload.WithArray("ids", std::move(idsJsonList));
|
|
|
|
}
|
|
|
|
if(m_namespaceVersionHasBeenSet)
|
|
{
|
|
payload.WithInt64("namespaceVersion", m_namespaceVersion);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection GetEntitiesRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "IotThingsGraphFrontEndService.GetEntities"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|