104 lines
3.0 KiB
C++
104 lines
3.0 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/medialive/model/UpdateInputRequest.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::MediaLive::Model;
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
UpdateInputRequest::UpdateInputRequest() :
|
|||
|
|
m_destinationsHasBeenSet(false),
|
|||
|
|
m_inputDevicesHasBeenSet(false),
|
|||
|
|
m_inputIdHasBeenSet(false),
|
|||
|
|
m_inputSecurityGroupsHasBeenSet(false),
|
|||
|
|
m_mediaConnectFlowsHasBeenSet(false),
|
|||
|
|
m_nameHasBeenSet(false),
|
|||
|
|
m_roleArnHasBeenSet(false),
|
|||
|
|
m_sourcesHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String UpdateInputRequest::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_destinationsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> destinationsJsonList(m_destinations.size());
|
|||
|
|
for(unsigned destinationsIndex = 0; destinationsIndex < destinationsJsonList.GetLength(); ++destinationsIndex)
|
|||
|
|
{
|
|||
|
|
destinationsJsonList[destinationsIndex].AsObject(m_destinations[destinationsIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("destinations", std::move(destinationsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_inputDevicesHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> inputDevicesJsonList(m_inputDevices.size());
|
|||
|
|
for(unsigned inputDevicesIndex = 0; inputDevicesIndex < inputDevicesJsonList.GetLength(); ++inputDevicesIndex)
|
|||
|
|
{
|
|||
|
|
inputDevicesJsonList[inputDevicesIndex].AsObject(m_inputDevices[inputDevicesIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("inputDevices", std::move(inputDevicesJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_inputSecurityGroupsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> inputSecurityGroupsJsonList(m_inputSecurityGroups.size());
|
|||
|
|
for(unsigned inputSecurityGroupsIndex = 0; inputSecurityGroupsIndex < inputSecurityGroupsJsonList.GetLength(); ++inputSecurityGroupsIndex)
|
|||
|
|
{
|
|||
|
|
inputSecurityGroupsJsonList[inputSecurityGroupsIndex].AsString(m_inputSecurityGroups[inputSecurityGroupsIndex]);
|
|||
|
|
}
|
|||
|
|
payload.WithArray("inputSecurityGroups", std::move(inputSecurityGroupsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_mediaConnectFlowsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> mediaConnectFlowsJsonList(m_mediaConnectFlows.size());
|
|||
|
|
for(unsigned mediaConnectFlowsIndex = 0; mediaConnectFlowsIndex < mediaConnectFlowsJsonList.GetLength(); ++mediaConnectFlowsIndex)
|
|||
|
|
{
|
|||
|
|
mediaConnectFlowsJsonList[mediaConnectFlowsIndex].AsObject(m_mediaConnectFlows[mediaConnectFlowsIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("mediaConnectFlows", std::move(mediaConnectFlowsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_nameHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("name", m_name);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_roleArnHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("roleArn", m_roleArn);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_sourcesHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> sourcesJsonList(m_sources.size());
|
|||
|
|
for(unsigned sourcesIndex = 0; sourcesIndex < sourcesJsonList.GetLength(); ++sourcesIndex)
|
|||
|
|
{
|
|||
|
|
sourcesJsonList[sourcesIndex].AsObject(m_sources[sourcesIndex].Jsonize());
|
|||
|
|
}
|
|||
|
|
payload.WithArray("sources", std::move(sourcesJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload.View().WriteReadable();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|