81 lines
1.5 KiB
C++
81 lines
1.5 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/lambda/model/UpdateFunctionCodeRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/utils/HashingUtils.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Lambda::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
UpdateFunctionCodeRequest::UpdateFunctionCodeRequest() :
|
|
m_functionNameHasBeenSet(false),
|
|
m_zipFileHasBeenSet(false),
|
|
m_s3BucketHasBeenSet(false),
|
|
m_s3KeyHasBeenSet(false),
|
|
m_s3ObjectVersionHasBeenSet(false),
|
|
m_publish(false),
|
|
m_publishHasBeenSet(false),
|
|
m_dryRun(false),
|
|
m_dryRunHasBeenSet(false),
|
|
m_revisionIdHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String UpdateFunctionCodeRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_zipFileHasBeenSet)
|
|
{
|
|
payload.WithString("ZipFile", HashingUtils::Base64Encode(m_zipFile));
|
|
}
|
|
|
|
if(m_s3BucketHasBeenSet)
|
|
{
|
|
payload.WithString("S3Bucket", m_s3Bucket);
|
|
|
|
}
|
|
|
|
if(m_s3KeyHasBeenSet)
|
|
{
|
|
payload.WithString("S3Key", m_s3Key);
|
|
|
|
}
|
|
|
|
if(m_s3ObjectVersionHasBeenSet)
|
|
{
|
|
payload.WithString("S3ObjectVersion", m_s3ObjectVersion);
|
|
|
|
}
|
|
|
|
if(m_publishHasBeenSet)
|
|
{
|
|
payload.WithBool("Publish", m_publish);
|
|
|
|
}
|
|
|
|
if(m_dryRunHasBeenSet)
|
|
{
|
|
payload.WithBool("DryRun", m_dryRun);
|
|
|
|
}
|
|
|
|
if(m_revisionIdHasBeenSet)
|
|
{
|
|
payload.WithString("RevisionId", m_revisionId);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
|
|
|
|
|