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-connectparticipant/source/model/CreateParticipantConnectionRequest.cpp

58 lines
1.4 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/connectparticipant/model/CreateParticipantConnectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::ConnectParticipant::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateParticipantConnectionRequest::CreateParticipantConnectionRequest() :
m_typeHasBeenSet(false),
m_participantTokenHasBeenSet(false)
{
}
Aws::String CreateParticipantConnectionRequest::SerializePayload() const
{
JsonValue payload;
if(m_typeHasBeenSet)
{
Array<JsonValue> typeJsonList(m_type.size());
for(unsigned typeIndex = 0; typeIndex < typeJsonList.GetLength(); ++typeIndex)
{
typeJsonList[typeIndex].AsString(ConnectionTypeMapper::GetNameForConnectionType(m_type[typeIndex]));
}
payload.WithArray("Type", std::move(typeJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateParticipantConnectionRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_participantTokenHasBeenSet)
{
ss << m_participantToken;
headers.emplace("x-amz-bearer", ss.str());
ss.str("");
}
return headers;
}