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-dax/source/model/CreateSubnetGroupRequest.cpp

63 lines
1.4 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dax/model/CreateSubnetGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DAX::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateSubnetGroupRequest::CreateSubnetGroupRequest() :
m_subnetGroupNameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_subnetIdsHasBeenSet(false)
{
}
Aws::String CreateSubnetGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_subnetGroupNameHasBeenSet)
{
payload.WithString("SubnetGroupName", m_subnetGroupName);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateSubnetGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonDAXV3.CreateSubnetGroup"));
return headers;
}