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-lambda/source/model/PublishLayerVersionRequest.cpp

63 lines
1.5 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lambda/model/PublishLayerVersionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lambda::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PublishLayerVersionRequest::PublishLayerVersionRequest() :
m_layerNameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_contentHasBeenSet(false),
m_compatibleRuntimesHasBeenSet(false),
m_licenseInfoHasBeenSet(false)
{
}
Aws::String PublishLayerVersionRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_contentHasBeenSet)
{
payload.WithObject("Content", m_content.Jsonize());
}
if(m_compatibleRuntimesHasBeenSet)
{
Array<JsonValue> compatibleRuntimesJsonList(m_compatibleRuntimes.size());
for(unsigned compatibleRuntimesIndex = 0; compatibleRuntimesIndex < compatibleRuntimesJsonList.GetLength(); ++compatibleRuntimesIndex)
{
compatibleRuntimesJsonList[compatibleRuntimesIndex].AsString(RuntimeMapper::GetNameForRuntime(m_compatibleRuntimes[compatibleRuntimesIndex]));
}
payload.WithArray("CompatibleRuntimes", std::move(compatibleRuntimesJsonList));
}
if(m_licenseInfoHasBeenSet)
{
payload.WithString("LicenseInfo", m_licenseInfo);
}
return payload.View().WriteReadable();
}