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-cloudhsmv2/source/model/CreateClusterRequest.cpp

75 lines
1.7 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudhsmv2/model/CreateClusterRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CloudHSMV2::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateClusterRequest::CreateClusterRequest() :
m_subnetIdsHasBeenSet(false),
m_hsmTypeHasBeenSet(false),
m_sourceBackupIdHasBeenSet(false),
m_tagListHasBeenSet(false)
{
}
Aws::String CreateClusterRequest::SerializePayload() const
{
JsonValue payload;
if(m_subnetIdsHasBeenSet)
{
Array<JsonValue> subnetIdsJsonList(m_subnetIds.size());
for(unsigned subnetIdsIndex = 0; subnetIdsIndex < subnetIdsJsonList.GetLength(); ++subnetIdsIndex)
{
subnetIdsJsonList[subnetIdsIndex].AsString(m_subnetIds[subnetIdsIndex]);
}
payload.WithArray("SubnetIds", std::move(subnetIdsJsonList));
}
if(m_hsmTypeHasBeenSet)
{
payload.WithString("HsmType", m_hsmType);
}
if(m_sourceBackupIdHasBeenSet)
{
payload.WithString("SourceBackupId", m_sourceBackupId);
}
if(m_tagListHasBeenSet)
{
Array<JsonValue> tagListJsonList(m_tagList.size());
for(unsigned tagListIndex = 0; tagListIndex < tagListJsonList.GetLength(); ++tagListIndex)
{
tagListJsonList[tagListIndex].AsObject(m_tagList[tagListIndex].Jsonize());
}
payload.WithArray("TagList", std::move(tagListJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateClusterRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "BaldrApiService.CreateCluster"));
return headers;
}