83 lines
1.8 KiB
C++
83 lines
1.8 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/appstream/model/DescribeImagesRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::AppStream::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
DescribeImagesRequest::DescribeImagesRequest() :
|
|
m_namesHasBeenSet(false),
|
|
m_arnsHasBeenSet(false),
|
|
m_type(VisibilityType::NOT_SET),
|
|
m_typeHasBeenSet(false),
|
|
m_nextTokenHasBeenSet(false),
|
|
m_maxResults(0),
|
|
m_maxResultsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String DescribeImagesRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_namesHasBeenSet)
|
|
{
|
|
Array<JsonValue> namesJsonList(m_names.size());
|
|
for(unsigned namesIndex = 0; namesIndex < namesJsonList.GetLength(); ++namesIndex)
|
|
{
|
|
namesJsonList[namesIndex].AsString(m_names[namesIndex]);
|
|
}
|
|
payload.WithArray("Names", std::move(namesJsonList));
|
|
|
|
}
|
|
|
|
if(m_arnsHasBeenSet)
|
|
{
|
|
Array<JsonValue> arnsJsonList(m_arns.size());
|
|
for(unsigned arnsIndex = 0; arnsIndex < arnsJsonList.GetLength(); ++arnsIndex)
|
|
{
|
|
arnsJsonList[arnsIndex].AsString(m_arns[arnsIndex]);
|
|
}
|
|
payload.WithArray("Arns", std::move(arnsJsonList));
|
|
|
|
}
|
|
|
|
if(m_typeHasBeenSet)
|
|
{
|
|
payload.WithString("Type", VisibilityTypeMapper::GetNameForVisibilityType(m_type));
|
|
}
|
|
|
|
if(m_nextTokenHasBeenSet)
|
|
{
|
|
payload.WithString("NextToken", m_nextToken);
|
|
|
|
}
|
|
|
|
if(m_maxResultsHasBeenSet)
|
|
{
|
|
payload.WithInteger("MaxResults", m_maxResults);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection DescribeImagesRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "PhotonAdminProxyService.DescribeImages"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|