86 lines
2.0 KiB
C++
86 lines
2.0 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/config/model/ListDiscoveredResourcesRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::ConfigService::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
ListDiscoveredResourcesRequest::ListDiscoveredResourcesRequest() :
|
|
m_resourceType(ResourceType::NOT_SET),
|
|
m_resourceTypeHasBeenSet(false),
|
|
m_resourceIdsHasBeenSet(false),
|
|
m_resourceNameHasBeenSet(false),
|
|
m_limit(0),
|
|
m_limitHasBeenSet(false),
|
|
m_includeDeletedResources(false),
|
|
m_includeDeletedResourcesHasBeenSet(false),
|
|
m_nextTokenHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String ListDiscoveredResourcesRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_resourceTypeHasBeenSet)
|
|
{
|
|
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
|
|
}
|
|
|
|
if(m_resourceIdsHasBeenSet)
|
|
{
|
|
Array<JsonValue> resourceIdsJsonList(m_resourceIds.size());
|
|
for(unsigned resourceIdsIndex = 0; resourceIdsIndex < resourceIdsJsonList.GetLength(); ++resourceIdsIndex)
|
|
{
|
|
resourceIdsJsonList[resourceIdsIndex].AsString(m_resourceIds[resourceIdsIndex]);
|
|
}
|
|
payload.WithArray("resourceIds", std::move(resourceIdsJsonList));
|
|
|
|
}
|
|
|
|
if(m_resourceNameHasBeenSet)
|
|
{
|
|
payload.WithString("resourceName", m_resourceName);
|
|
|
|
}
|
|
|
|
if(m_limitHasBeenSet)
|
|
{
|
|
payload.WithInteger("limit", m_limit);
|
|
|
|
}
|
|
|
|
if(m_includeDeletedResourcesHasBeenSet)
|
|
{
|
|
payload.WithBool("includeDeletedResources", m_includeDeletedResources);
|
|
|
|
}
|
|
|
|
if(m_nextTokenHasBeenSet)
|
|
{
|
|
payload.WithString("nextToken", m_nextToken);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection ListDiscoveredResourcesRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "StarlingDoveService.ListDiscoveredResources"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|