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-ecr/source/model/BatchDeleteImageRequest.cpp

63 lines
1.4 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ecr/model/BatchDeleteImageRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::ECR::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchDeleteImageRequest::BatchDeleteImageRequest() :
m_registryIdHasBeenSet(false),
m_repositoryNameHasBeenSet(false),
m_imageIdsHasBeenSet(false)
{
}
Aws::String BatchDeleteImageRequest::SerializePayload() const
{
JsonValue payload;
if(m_registryIdHasBeenSet)
{
payload.WithString("registryId", m_registryId);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_imageIdsHasBeenSet)
{
Array<JsonValue> imageIdsJsonList(m_imageIds.size());
for(unsigned imageIdsIndex = 0; imageIdsIndex < imageIdsJsonList.GetLength(); ++imageIdsIndex)
{
imageIdsJsonList[imageIdsIndex].AsObject(m_imageIds[imageIdsIndex].Jsonize());
}
payload.WithArray("imageIds", std::move(imageIdsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchDeleteImageRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonEC2ContainerRegistry_V20150921.BatchDeleteImage"));
return headers;
}