75 lines
2.0 KiB
C++
75 lines
2.0 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/dms/model/CreateReplicationSubnetGroupRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::DatabaseMigrationService::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateReplicationSubnetGroupRequest::CreateReplicationSubnetGroupRequest() :
|
|
m_replicationSubnetGroupIdentifierHasBeenSet(false),
|
|
m_replicationSubnetGroupDescriptionHasBeenSet(false),
|
|
m_subnetIdsHasBeenSet(false),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateReplicationSubnetGroupRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_replicationSubnetGroupIdentifierHasBeenSet)
|
|
{
|
|
payload.WithString("ReplicationSubnetGroupIdentifier", m_replicationSubnetGroupIdentifier);
|
|
|
|
}
|
|
|
|
if(m_replicationSubnetGroupDescriptionHasBeenSet)
|
|
{
|
|
payload.WithString("ReplicationSubnetGroupDescription", m_replicationSubnetGroupDescription);
|
|
|
|
}
|
|
|
|
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_tagsHasBeenSet)
|
|
{
|
|
Array<JsonValue> tagsJsonList(m_tags.size());
|
|
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
|
|
{
|
|
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
|
|
}
|
|
payload.WithArray("Tags", std::move(tagsJsonList));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection CreateReplicationSubnetGroupRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonDMSv20160101.CreateReplicationSubnetGroup"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|