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/StartBgpFailoverTestRequest.cpp

64 lines
1.5 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/directconnect/model/StartBgpFailoverTestRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::DirectConnect::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
StartBgpFailoverTestRequest::StartBgpFailoverTestRequest() :
m_virtualInterfaceIdHasBeenSet(false),
m_bgpPeersHasBeenSet(false),
m_testDurationInMinutes(0),
m_testDurationInMinutesHasBeenSet(false)
{
}
Aws::String StartBgpFailoverTestRequest::SerializePayload() const
{
JsonValue payload;
if(m_virtualInterfaceIdHasBeenSet)
{
payload.WithString("virtualInterfaceId", m_virtualInterfaceId);
}
if(m_bgpPeersHasBeenSet)
{
Array<JsonValue> bgpPeersJsonList(m_bgpPeers.size());
for(unsigned bgpPeersIndex = 0; bgpPeersIndex < bgpPeersJsonList.GetLength(); ++bgpPeersIndex)
{
bgpPeersJsonList[bgpPeersIndex].AsString(m_bgpPeers[bgpPeersIndex]);
}
payload.WithArray("bgpPeers", std::move(bgpPeersJsonList));
}
if(m_testDurationInMinutesHasBeenSet)
{
payload.WithInteger("testDurationInMinutes", m_testDurationInMinutes);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection StartBgpFailoverTestRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "OvertureService.StartBgpFailoverTest"));
return headers;
}