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-iotthingsgraph/source/model/SearchEntitiesRequest.cpp

84 lines
2.0 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iotthingsgraph/model/SearchEntitiesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::IoTThingsGraph::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SearchEntitiesRequest::SearchEntitiesRequest() :
m_entityTypesHasBeenSet(false),
m_filtersHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_namespaceVersion(0),
m_namespaceVersionHasBeenSet(false)
{
}
Aws::String SearchEntitiesRequest::SerializePayload() const
{
JsonValue payload;
if(m_entityTypesHasBeenSet)
{
Array<JsonValue> entityTypesJsonList(m_entityTypes.size());
for(unsigned entityTypesIndex = 0; entityTypesIndex < entityTypesJsonList.GetLength(); ++entityTypesIndex)
{
entityTypesJsonList[entityTypesIndex].AsString(EntityTypeMapper::GetNameForEntityType(m_entityTypes[entityTypesIndex]));
}
payload.WithArray("entityTypes", std::move(entityTypesJsonList));
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_namespaceVersionHasBeenSet)
{
payload.WithInt64("namespaceVersion", m_namespaceVersion);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection SearchEntitiesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "IotThingsGraphFrontEndService.SearchEntities"));
return headers;
}