85 lines
1.8 KiB
C++
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|