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-directconnect/source/model/AllocateHostedConnectionRequest.cpp

85 lines
1.8 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/directconnect/model/AllocateHostedConnectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DirectConnect::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AllocateHostedConnectionRequest::AllocateHostedConnectionRequest() :
m_connectionIdHasBeenSet(false),
m_ownerAccountHasBeenSet(false),
m_bandwidthHasBeenSet(false),
m_connectionNameHasBeenSet(false),
m_vlan(0),
m_vlanHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String AllocateHostedConnectionRequest::SerializePayload() const
{
JsonValue payload;
if(m_connectionIdHasBeenSet)
{
payload.WithString("connectionId", m_connectionId);
}
if(m_ownerAccountHasBeenSet)
{
payload.WithString("ownerAccount", m_ownerAccount);
}
if(m_bandwidthHasBeenSet)
{
payload.WithString("bandwidth", m_bandwidth);
}
if(m_connectionNameHasBeenSet)
{
payload.WithString("connectionName", m_connectionName);
}
if(m_vlanHasBeenSet)
{
payload.WithInteger("vlan", m_vlan);
}
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 AllocateHostedConnectionRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "OvertureService.AllocateHostedConnection"));
return headers;
}